Install LAMP using Tasksel Command Line on Ubuntu
Tasksel is a tool in Ubuntu, which helps to install multiple related packages used for specific tasks. Basic Ubuntu server, OpenSSH server, DNS server, LAMP server, Mail server, Openstack, PostgreSQL database etc.
See Also:
In this guide I will show you the easiest way, how to install a LAMP server on Ubuntu System.
Install Tasksel
Tasksel package is available under default repositories on most of Ubuntu, Use the following command to install it.
# sudo apt-get install tasksel
Install LAMP using Tasksel Command Line
After installing tasksel, Now install LAMP on your Ubuntu using following command:
# sudo tasksel install lamp-server
During installation of MySQL Server by tasksel, It will prompt for MySQL root account password twice.
and your setup will be completed within few minutes.
Uninstall LAMP using Tasksel Command Line
If you requie to uninstall LAMP using Tasksel command line then run following command:
# sudo tasksel remove lamp-server
List of Servers
Run the following command to list all the servers:
# tasksel --list Or # tasksel --list-task
Verify LAMP Server
Now create a phpinfo file info.php using following code.
# vim /var/www/html/info.php
<?php phpinfo(); ?>
Now access below URL in browser.
http://192.168.0.108/info.php
Reference:
Enjoy it!