Install Lamp On Ubuntu 15.10 Desktop, using Terminal. Install Apache on Ubuntu, install MySQL on Ubuntu, install PHP MyAdmin on Ubuntu. Install Lamp on Ubuntu Server.
LAMP – Linux, Apache, MySQL & PHP
LAMP is a web service solution stacks, named as an acronym of four components: the Linux operating system, the Apache HTTP Server, the MySQL relational database management system (RDBMS), and the PHP programming language.
Apache
Apache is an open-source multi-platform web server. It provides a full range of web server features including CGI, SSL and virtual domains. To install Apache, run the following commands:
sudo apt-get update
sudo apt-get install apache2
The above commands will install Apache with web root folder under /var/www on your system. To test Apache, open your web browser and type http://localhost/ or http://server-ip-address/ in the URL box and it will test for it. If Apache works, you will see a page that says “It Works!”.
If you are wondering how to find your Server’s IP address, run the following command to know your server’s IP address
ifconfig eth0 | grep inet | awk ‘{ print $2 }’
MySQL
The next step is to install MySQL. MySQL is very popular, widely used open source relation database management system. To install MySQL, we execute the following command:
sudo apt-get install mysql-server
Or
sudo apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
It will install the MySQL server along-with the required libraries. During the installation, enter MySQL root password. Once the installation is complete, run the following command to install MySQL system tables:
sudo mysql_install_db
Once MySQL is installed, you can verify the MySQL server status using the following command: sudo systemctl status mysql or sudo service mysql status
PHP MyAdmin
PHP is an open source general-purpose scripting language for web development which can be embedded into HTML. To install PHP run the following command:
sudo apt-get install php5 libapache2-mod-php5
Run the following commands to install PHP MyAdmin on Linux Ubuntu Systems:
sudo apt-get install phpmyadmin
Follow the on screen instructions and confirm prompts and PHP will be installed automatically. During the installation, you willbe asked for root and confirmations (web server).
Once installed, add phpmyadmin to the apache configuration.
sudo nano /etc/apache2/apache2.conf
Add the phpmyadmin config to the file.
Include /etc/phpmyadmin/apache.conf
Restart Apache by running the following command:
sudo service apache2 restart
You can then access phpmyadmin by going to youripaddress/phpmyadmin or localhost.phpmyadmin/. The screen should look like this. Enter the credentials to access the PHP MyAdmin page.