Monday, August 30, 2010

Installing Apache, MySQL and PHP on ubuntu 10.04...

Hi all,
here i am going to tell you the procedure to install Apache, MySQL and PHP on ubuntu 10.04. Although I have installed it on ubuntu 10.04 it will work for all the ubuntu as well as debian versions as long as you use apt-get since it will automatically check for dependencies and will install them as well.

Also If you are using any of the other linux kernel os like Fedora, CentOS, etc. the procedure is alsomst similar just you to use package installer for respective os instead of apt-get like yum for fedora, etc.

So here I go:

Apache Server version 2:
 sudo apt-get install apache2

MySQL Server:
sudo apt-get install mysql-server-5.1

sudo apt-get install mysql-query-browser # optional ( MySQL query browser)

PHP : 
sudo apt-get install php5

sudo apt-get install libapache2-mod-auth-mysql php5-mysql

vim Editor:
sudo apt-get install vim

phpMyAdmin:

You don't need to install phpMyAdmin, but it's a much easier way to get in and adjust things in your MySQL database if you're not familiar with MySQL's commands. You can install phpMyAdmin from the command line with:


sudo apt-get install phpmyadmin

The installation will prompt you to select a web server for automatic configuration.Use the space bar on your keyboard to select apache2 and then hit .
The next screen will explain some information about database configuration. Hit the key to move on.
Another screen will come up asking if you want to configure a new database called dbconfig-common.  Since this is a fresh installation, use the key to select Yes and hit .
You'll be prompted next to enter the MySQL root password. Enter the MySQL root password that you created earlier, hit to select Ok and hit .
You'll then be prompted to enter a MySQL application password for phpmyadmin. You can hit and a random password will be generated. I chose to use the same password that I used for the root MySQL password.
If you enter your own password, a password confirmation screen will come up. Confirm your password.
Your phpMyAdmin installation and configuration is now complete.
Open your web browser and enter the address http://localhost/phpmyadmin/. You should see a login page.

And now you are done installing Apache, MySQL and PHP on your system.

If get a 404 "Not Found" error when you point your browser to the location of phpMyAdmin (such as: http://localhost/phpmyadmin) this is likely caused by not checking the 'Apache 2' selection during installation. To redo the installation run the following:

sudo dpkg-reconfigure -plow phpmyadmin
 
Then select Apache 2 for the webserver you wish to configure.

No comments:

Post a Comment