Configure LAMP Server
![Local PHP MYSQL SERVER 2 Choose linux](https://techstream.org/wp-content/uploads/2024/01/Lamp_Server.jpg)
To start installing LAMP server you need to install tasksel.Tasksel is a Debian/Ubuntu tool that installs multiple related packages as a co-ordinated “task” onto your system. To install tasksel type the following in a terminal.
![Local PHP MYSQL SERVER 3 Install lamp](https://techstream.org/wp-content/uploads/2024/01/LAMP/LAMP1.jpg)
sudo apt-get install tasksel
WARNING: Use tasksel only to install tasks, never to remove any! According to https://launchpad.net/bugs/574287 it will remove each package in the list of that task (and possibly render your system unusable).
You need not install tasksel in server editions and some distributors too since they come with tasksel already installed, if your Linux has it already them the install command would not do anything else that update it if it is an out dated version.
![Local PHP MYSQL SERVER 4 Install lamp](https://techstream.org/wp-content/uploads/2024/01/LAMP/LAMP2.jpg)
After installing tasksel type
tasksel
![Local PHP MYSQL SERVER 5 Install lamp](https://techstream.org/wp-content/uploads/2024/01/LAMP/LAMP3.jpg)
in terminal and the tasksel opens up then navigate down and tick the check box for lamp server .
![Local PHP MYSQL SERVER 6 Install lamp](https://techstream.org/wp-content/uploads/2024/01/LAMP/LAMP4.jpg)
Then click ok then installation begins
After completing the installation you will be prompted for a password for mysql root user. You can enter any password.
![Local PHP MYSQL SERVER 7 Install lamp](https://techstream.org/wp-content/uploads/2024/01/LAMP/LAMP5.jpg)
After installation is complete type this to restart the server.
sudo services apache2 restart
![Local PHP MYSQL SERVER 8 Install lamp](https://techstream.org/wp-content/uploads/2024/01/LAMP/LAMP7.jpg)
Then open a browser and type in the url
http://localhost
![Local PHP MYSQL SERVER 9 Install lamp](https://techstream.org/wp-content/uploads/2024/01/LAMP/LAMP8.jpg)
If the following page appears then you are good to go.
To test your php server configuration open terminal and type sudo gedit
Then type this
Then save it in the
root/ var/ www
As phptest.php or any name
Then open a browser and type
http://localhost/phptest.php
Or any name that you have given
![Local PHP MYSQL SERVER 10 Install lamp](https://techstream.org/wp-content/uploads/2024/01/LAMP/LAMP9.jpg)
If the pages displays like this then you are good to test your pages in your machine.