How to Install Apache, Php5 & MySQL on uBuntu
To Install Apache, Php5 & MySQL on Ubuntu, you need to follow the following steps:
1. Open Terminal from Applications>>Accessories>>Terminal
2. Type the following command one by one:
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5
sudo apt-get install mysql-server
sudo apt-get install php5-mysql
sudo /etc/init.d/apache2 restart
After running the above commands, Apache, php5 & MySql would be installed. To run Mysql, you can install a GUI PhpmyAdmin from the following command:
sudo apt-get install phpmyadmin
Now,When you try to run phpmyadmnin from your browser, you may get an error stating “Coluld not load mysqli extension”. Do not panic and follow the following steps:
1. Open the php.ini file using the following line
gksudo gedit /etc/php5/apache2/php.ini
2. Add a new line as:
extension mysql.so
3. restart apache using the following line:
sudo /etc/init.d/apache2 restart
The Phpmyadmin is installed and configured properly.