Tuesday, October 14, 2008

How to install a APACHE-PHP-MYSQL-PHPMYADMIN server on Ubuntu Intrepid

First I install the webserver
sudo apt-get install apache2

Then I install PHP5 with all the add ons:
sudo apt-get -f install libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php5-imagick php5-mcrypt php5-memcache php5-mhash php5-mysql php5-pspell php5-snmp

Then I install MySQL database
sudo apt-get -f install mysql-server mysql-client

And finally phpMyadmin to manage your database from a GUI.
sudo apt-get -f install phpmyadmin

NOW TO TEST EVERYTHING

TESTING APACHE2
To test if apache is working open your browser and type:
localhost

If you see the text "It works!" Apache2 is running.

TESTING PHP5
Navigate to /var/www/
and create a text file named test.php which contains:


Now type in your browser:
localhost/test.php

You should see a large table of values that tell information about your server and php setup.

TESTING PHPMYADMIN
Open up your browser and type:
localhost/phpmyadmin

If you are taken to a login screen you can now login and create databased for your sites.

No comments: