A. Sidiq Purnomo

Universitas Mercu Buana Yogyakarta

You are here: » How To Install Apache, PHP, MySQL and PhpMyadmin On Linux (Ubuntu)

How To Install Apache, PHP, MySQL and PhpMyadmin On Linux (Ubuntu)

 

Step 1 : Open Terminal
  1. Go to menu Application -> Accessories -> Terminal.
  2. If the terminal window is already visible, then go to the right of access as root. Inside terminal, execute the following command :
    dnd@riyaniezt:~$ sudo -i
    [sudo] password for dnd:
Step 2 : Installing Apache
Inside Terminal, execute the following command:
root@riyaniezt:~# apt-get install apache2
Step 3 : Installing Php 5
Inside Terminal, execute the following command:
root@riyaniezt:~# apt-get install php5 libapache2-mod-php5
Step 4 : Installing MySQL
Inside Terminal, execute the following command:
root@riyaniezt:~# apt-get install mysql-server libapache2-mod-auth-mysql php5-mysql
Step 5 : Installing PhpMyAdmin
  1. Inside Terminal, execute the following command:
    root@riyaniezt:~# apt-­get install phpmyadmin
  2. Configure :
    root@riyaniezt:~# chmod -R 777 /etc/apache2/
    root@riyaniezt:~# gedit /etc/apache2/apache2.conf
    Insert on the bottom row in apache2.conf following code:
    Include /etc/phpmyadmin/apache.conf
Step 6 : Access Your Php Directory, MySQL and PhpMyAdmin
  1. When setup is complete, you have to restart Apache so that php5 will work on Apache. Execute the following command in Terminal:
    root@riyaniezt:~# /etc/init.d/apache2 restart
  2. You can create a new php file inside your >> /var/www/ directory.
  3. You can view database MySQL inside your >> /var/lib/mysql directory.
  4. You can go to the phpMyAdmin login page by pointing your web browser to >> http://localhost/phpmyadmin or http://127.0.0.1/phpmyadmin.

Step 7 : Test Your Configuration

  • Open your favorite browser and type “http://localhost/” (for php engine) and “http://localhost/phpmyadmin” (for phpmyadmin) in the address bar and press the button enter on the keyboard. If you will see the below page , then your configuration works fine.

Home Page :

  1. Apache : http://httpd.apache.org
  2. PHP : http://www.php.net
  3. MySQL : http://www.mysql.com
  4. phpMyAdmin : http://www.phpmyadmin.net
*… Good Luck ! …*
Print Friendly, PDF & Email
Posted by 2 Responses
 

Free Email Newsletter

Stay Updates with this Blog. Get Free email newsletter updates..

And then confirm your email subcription

   

2 Comments to “How To Install Apache, PHP, MySQL and PhpMyadmin On Linux (Ubuntu)”

  1. nano says:

    nice post.. Pak mau tanya, saya udah install Apache2 dan localhost dah jalan normal, Masalahnya kalo sy write melalui aplikasi .jar ke Database.. kok tidak bisa… (tidak ada pesan erorr apa2), jadi untuk percobaan kemarin saya write manual pada PHPMyAdmin melalui xampp. Dan sunwtk juga udah dapat read database dari MysQL Setelah saya coba pake php ternyata kok juga sama saja gak bisa, saya pake ubuntu pak kira-kira apa yang salah ya pak…

    • dnd says:

      di Ubuntu ya ams …
      Kemarin install XAMPP (LAMPP) atau manual installasi (with apt-get seperti di posting)
      Coba perhatikan file permission nya mas …
      Serta setting AirTime Configuration dari Sun Java Wireless Tolkit nya
      Good Luck

Leave your comment here:

Secure * Time limit is exhausted. Please reload the CAPTCHA.

Nov
14
2011
 


Popular Posts