Install Apache, PHP, MYSQL and phpMyAdmin in Ubuntu

This following is the command for installing and configuring Apache, PHP, MySQL and phpMyAdmin in Ubuntu
Open a terminal, you should go to the root before you do the steps that I would give. By typing sudo su 

1. Installing Apache
To install Apache type the following command
# sudo apt-get install apache2


if asked for confirmation like below :
Do you want to continue [y/n]? y

* Type y and press enter key
* When installation is done, open your browser and type http://localhost

2. Installing PHP

To install PHP type the following command
#sudo apt-get install php5 libapache2-mod-php5


if asked for confirmation like below :
Do you want to continue [y/n]? y

* Type y and press enter key
* After the successful installation restart Apache using the below command
# sudo /etc/init.d/apache2 restar


* After the successful restart Apache using the below command
# sudo gedit /var/www/test.php
Please insert the text below
<?php   phpinfo();  ?>

* When installation is done, open your browser and type http://localhost/test

3. Installing MYSQL


To install PHP type the following command
#sudo apt-get install mysql-server



if asked for confirmation like below :
Do you want to continue [y/n]? y

* Type y and press enter key
* During the installation you will be prompted for a password. Choose a secure and type the password and press enter. It will also ask to re enter password.


4. Installing phpMyAdmin
To install PHP type the following command
#sudo apt-get install phpmyadmin 


if asked for confirmation like below :
Do you want to continue [y/n]? y

* Type y and press enter key
* During the installation you will be prompted for a web server configuration. Select Apache2 and press Enter


* Now you will be prompted for phpmyadmin configuration, Select no


* In terminal Run the bellow command
# sudo cp /etc/phpmyadmin/apache.conf /etc/apache2/conf.d

* Restart your apache server
 # sudo /etc/init.d/apache2 restar

* Open your browser and type http://localhost/phpmyadmin
* type in the root username and password with the password





Your Apache, PHP, MYSQL and phpMyAdmin is ready in Ubuntu, start your coding….




Other Articles You May Find:




No comments:

Post a Comment