Frequently Asked Questions

Apache, MySQL, PHP and PHPMyAdmin on Ubuntu

1. Installing Apache
Open your terminal and type the bellow command
#sudo apt-get install apache2
It will ask for your password, Type your ubuntu password and press enter key, it will ask for confirmation
confirm_install

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

### ERROR: ServerName not recognized
- Edit /etc/apache2/sites-available/000-default.conf for the #ServerName

2. Installing PHP
Open your terminal and type the bellow command
#sudo apt-get install php5 libapache2-mod-php5

It will ask for your password, Type your ubuntu password and press enter key, it will ask for confirmation
confirm_install

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

-Open your /var/www/ directory and create a php file with any name like info.php file, write some php code into the file

-When installation is done and you have to created the php file into the /var/www/ directory, open your browser and type

http://localhost/info.php

-It will execute the file, which confirm that your apache and php installation was successful

3. Installing MYSQL
Open your terminal and type the bellow command
#

-It will ask for your password, Type your ubuntu password and press enter key, it will ask for confirmation
confirm_install
-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
Open your terminal and type the bellow command
#sudo apt-get install phpmyadmin

-It will ask for your password, Type your ubuntu password and press enter key, it will ask for confirmation
confirm_install
-Type y and press enter key
-During the installation you will be prompted for a web server configuration. Select Apache 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 restart

-Open your browser and type
http://localhost/phpmyadmin
http://ip-address/phpmyadmin


 Last updated Tue, Feb 4 2014 3:00pm

Please Wait!

Please wait... it will take a second!