Rabu, 21 September 2016

Cara Mudah Instalasi Server Apache, MySQL & PHP Pada Linux Ubuntu 12.04

Jika di Sistem Operasi Windows, anda bisa dengan mudah untuk menginstall server MySQL, Apache, dan PHP dalam satu paket hanya dengan mendownload dan klik 2x file installer WAMP, XAMPP, atau file installer lainnya yang sejenis yang menyediakan server MySQL, Apache, dan PHP dalam satu paket. Namun, bagaimana jika kita ingin menginstal Server MySQL, Apache, dan PHP dalam satu paket installer di Sistem Operasi Linux (Ubuntu 12.04) ?.

Caranya mudah, lakukan instalasi aplikasi LAMP Server (Linux Apache MySQL PHP Server). Caranya cukup ketikkan perintah "lamp-server^" melalui terminal, kemudian konfirmasi "Yes" (Y), maka secara otomatis ketiga server MySQL, Apache, dan PHP akan terinstall di komputer Linux Ubuntu 12.04 tersebut.

root@ubuntu:/home/it# apt-get install lamp-server^
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'apache2-utils' for task 'lamp-server'
Note, selecting 'libwrap0' for task 'lamp-server'
Note, selecting 'libnet-daemon-perl' for task 'lamp-server'
Note, selecting 'libclass-isa-perl' for task 'lamp-server'
Note, selecting 'libaprutil1-dbd-sqlite3' for task 'lamp-server'
Note, selecting 'libswitch-perl' for task 'lamp-server'
Note, selecting 'perl' for task 'lamp-server'
Note, selecting 'libcap2' for task 'lamp-server'
Note, selecting 'libhtml-template-perl' for task 'lamp-server'
Note, selecting 'libdbi-perl' for task 'lamp-server'
Note, selecting 'apache2.2-bin' for task 'lamp-server'
Note, selecting 'mysql-client-core-5.5' for task 'lamp-server'
Note, selecting 'libdbd-mysql-perl' for task 'lamp-server'
Note, selecting 'mysql-server-5.5' for task 'lamp-server'
Note, selecting 'libapr1' for task 'lamp-server'
Note, selecting 'mysql-common' for task 'lamp-server'
Note, selecting 'mysql-client-5.5' for task 'lamp-server'
Note, selecting 'libaprutil1-ldap' for task 'lamp-server'
Note, selecting 'apache2-mpm-prefork' for task 'lamp-server'
Note, selecting 'libplrpc-perl' for task 'lamp-server'
Note, selecting 'tcpd' for task 'lamp-server'
Note, selecting 'apache2' for task 'lamp-server'
Note, selecting 'mysql-server-core-5.5' for task 'lamp-server'
Note, selecting 'apache2.2-common' for task 'lamp-server'
Note, selecting 'mysql-server' for task 'lamp-server'
Note, selecting 'ssl-cert' for task 'lamp-server'
Note, selecting 'perl-modules' for task 'lamp-server'
Note, selecting 'libmysqlclient18' for task 'lamp-server'
Note, selecting 'php5-mysql' for task 'lamp-server'
Note, selecting 'php5-cli' for task 'lamp-server'
Note, selecting 'libapache2-mod-php5' for task 'lamp-server'
Note, selecting 'libaprutil1' for task 'lamp-server'
Note, selecting 'php5-common' for task 'lamp-server'
libcap2 is already the newest version.
libclass-isa-perl is already the newest version.
libswitch-perl is already the newest version.
libwrap0 is already the newest version.
tcpd is already the newest version.
ssl-cert is already the newest version.
The following package was automatically installed and is no longer required:
  gir1.2-timezonemap-1.0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libperl5.14 libterm-readkey-perl perl-base
Suggested packages:
  apache2-doc apache2-suexec apache2-suexec-custom php-pear
  libipc-sharedcache-perl tinyca perl-doc libterm-readline-gnu-perl
  libterm-readline-perl-perl libpod-plainer-perl php5-suhosin
The following NEW packages will be installed:
  apache2 apache2-mpm-prefork apache2-utils apache2.2-bin apache2.2-common
  libapache2-mod-php5 libapr1 libaprutil1 libaprutil1-dbd-sqlite3
  libaprutil1-ldap libdbd-mysql-perl libdbi-perl libhtml-template-perl
  libnet-daemon-perl libplrpc-perl libterm-readkey-perl mysql-client-5.5
  mysql-client-core-5.5 mysql-server mysql-server-5.5 mysql-server-core-5.5
  php5-cli php5-common php5-mysql
The following packages will be upgraded:
  libmysqlclient18 libperl5.14 mysql-common perl perl-base perl-modules
6 upgraded, 24 newly installed, 0 to remove and 727 not upgraded.
Need to get 44.4 MB of archives.
After this operation, 112 MB of additional disk space will be used.
Do you want to continue [Y/n]? y

Ketika dalam proses instalasi muncul prompt tampilan yang meminta password MySQL untuk user "root", silahkan masukkan pasword yang diinginkan. Kemudian proses akan berlanjut hingga selesai.

Untuk memudahkan dalam administrasi database MySQL Server, lanjutkan dengan menginstall "phpmyadmin". Caranya ketikkan perintah "apt-get install " pada terminal, seperti berikut ini :


root@ubuntu:/home/it# apt-get install phpmyadmin
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  gir1.2-timezonemap-1.0
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  dbconfig-common libmcrypt4 php5-gd php5-mcrypt
Suggested packages:
  libmcrypt-dev mcrypt
The following NEW packages will be installed:
  dbconfig-common libmcrypt4 php5-gd php5-mcrypt phpmyadmin
0 upgraded, 5 newly installed, 0 to remove and 727 not upgraded.
Need to get 5,931 kB of archives.
After this operation, 17.8 MB of additional disk space will be used.
Do you want to continue [Y/n]? y

Dalam proses instalasi akan muncul beberapa tampilan / jendela prompt yang meminta agar anda menentukan beberapa opsi / pilihan, password MySQL dan lain sebagainya, maka seilahkan tentukan pilihan yang tepat dengan membaca instruksi / petunjuk yang turut ditampilkan.

Sampai disini proses instalasi LAMP Server dan PHPMYADMIN sudah selesai. Untuk menguji server Apache pada browser silahkan menuju ke alamat "localhost" jika tampilannya seperti dibawah ini maka berarti server Apache telah berjalan dengan baik. 

It works!

This is the default web page for this server.
The web server software is running but no content has been added, yet.
Untuk menguji aplikasi "phpmyadmin" apakah sudah bisa digunakan untuk meng-administrasi server MySQL, melalui browser silahkan menuju ke alamat "localhost/phpmyadmin". Jika berhasil, anda akan dibawa ke halaman utama PHPMYADMIN, masukkan user MySQL (misal "root"), masukkan password user "root" dari server MySQL, kemudian login (klik tombol "Go").

Demikian artikel ini, terima kasih.

Tidak ada komentar:

Posting Komentar