In this post we will see How To Install Linux, Apache, MySQL, PHP (LAMP) stack on Ubuntu 20.04 .Here we will be looking at step by step process to do this.
1.First open your terminal and update the repository using command :
$ sudo apt update
After entering your password your update will be done .
2.Once your update is done now you can upgrade , here we will be replacing upgrade with update in previous command.
sudo apt upgrade
3.Now as our packages are upgraded let’s install apache 2.Command to do that :
$sudo apt install apache2 .Hit Enter.After successful installation you will se something like this :
4.let’s install the my sql server . Wec an do that with the command :
$ sudo apt install mysql-server . Hit enter .
After entering the command it will ask for permission , where you have to type “y”.After some time you will be able to see that mysql got installed.
We need to do a little bit of configuration here and we can do that with the
$sudo mysql_secure_installation command .
Here you can set your password by entering it and reentering it.Now you can press “y” for all options shown as per the following images
So your password is set now .
5.Now we’re going to install php.Command to do this :
$sudo apt install php libapache2-mod-php php-mysql .Hit enter then type y.
we now have ourthree components of software installed. You can do
$php -v to check the version.
In this way , following these steps you will be able to install LAMP stack and use it .