Do you want to install LAMP-SERVER on Ubuntu Linux ?
LAMP stands for Linux, Apache, Mysql, Php
Its a package containing all required packages which are needed on linux for developing php application with apache server and mysql database server.
You can install each of the packages individually or just install a single package containing all this in one single command.
Which one you will prefer ?
Don’t worry ! I will show you both the methods…. 🙂
But one important thing, just make sure that you are logged in as ADMIN and full access to avoid any further problem.
If you are interested in installing everything in one command then you should check “Ubuntu Linux – Install Full LAMP Package with single command“.
Install all packages separately
Perform following commands
sudo apt-get install apache2
Now one all installation is done, just make sure that it is installed and working properly.
Try http://localhost/ or http://YOUR_IP_ADDRESS
It will show you a message in web page “It Works!” means “It is working”.
Now next step install php and required libraries & modules.
sudo apt-get install php5 libapache2-mod-php5
Once installation is done, restart apache.
sudo /etc/init.d/apache2 restart
Now make sure that PHP is working. Just create a simple php file in /var/www folder.
sudo gedit /var/www/check.php
Once editor is opened then put following code in that file.
<?php
echo "PHP is also working.";
phpinfo();
?>
Save & Close file.
Now open http://localhost/check.php
If you see a message “PHP is also working.” along with some more information about PHP, then its done. Its working.
If its not working then try to restart your computer and then try again.
Now next step is installing MySQL.
sudo apt-get install mysql-server
Now once this is over, first thing is we have to set the root password of MySQL.
mysql -u root
Now you will get a mysql terminal/command prompt.
mysql>SET PASSWORD FOR 'root@'localhost' = PASSWORD('ENTER YOUR PASSWORD');
Thats all ! You are done with installation.
If you like to work with GUI for databases, then you should install “PHPMYADMIN”.
sudo apt-get install libapache2-mod-auth-mysql phpmyadmin
Once installation is started it will ask you for selecting server, there you select apache2 by hitting “SPACE” key and continue installation.
Test phpmyadmin in browser by http://localhost/phpmyadmin
GPT 5.4: The Next-Generation AI Model Transforming Reasoning, Coding, and Productivity Artificial Intelligence is evolving…
GPT-5.3 Instant is OpenAI's latest ChatGPT model update, prioritizing smoother conversations, fewer refusals, and higher…
Are you tired of scrolling endlessly through Google results trying to find clear, trustworthy answers?…
In recent years, the process of software development has rapidly evolved—developers demand smarter tools and…
India has emerged as one of the fastest-growing and most significant markets in the global…
On October 6, 2025, OpenAI unveiled AgentKit, a unified suite of tools designed to help developers and…
This website uses cookies.
View Comments
Nice tutorial.... thanks !!!