April 13, 2010 by Ivan Kristianto
[HowTo] Install Apache, PHP, MySQL, and PHPMyAdmin on Ubuntu
After a while i haven’t write on my blog. Now i’m ready to start writing again. Probably you notice that i changed my theme. Yes i was busy redesign my theme from the start. Anyway i will tell you the story on the next article.
Now i want to show you how to install Ubuntu Karmic Koala 9.10 as a perfect server with Apache, PHP, MySql and Phpmyadmin. Since Ubuntu have a great repositories and the magic application called apt-get then it shouldn’t be hard to make Ubuntu as a perfect server.
Okay let’s begin, please make sure your Ubuntu conneted to the internet:
1. Open your terminal and login as root with this command
2. Update your repositories list:
3. Install Apache:
apt-get install apache2 apache2.2-common apache2-doc apache2-mpm-prefork apache2-utils
4. Install PHP:
apt-get install php5 libapache2-mod-php5 php5-common php5-gd php5-mysql php5-imap php5-cli php5-cgi php-pear php-auth
5. Install MySQL:
apt-get install mysql-server mysql-client
here you will be ask to input root password for the mysql
6. Install PhpMyAdmin:
apt-get install phpmyadmin
here you will be asked some question to configure the phpmyadmin, just go through the wizard after it finish installed.
7. Now your server is ready. Before you test please make sure to restart the server:
/etc/init.d/mysql restart /etc/init.d/apache2 restart
8. Open document root in /var/www , make a file called it with info.php
and fill this:
<?php phpinfo(); ?>
then save the file.
9. Test the server with the browser and type address http://[server-ip]/info.php
If you have the same screenshot as follow than you have the web server on your machine:
That’s it for now. Thank you for visiting my blog. I hope you enjoy. Have a nice day…