Linux Fun

Linux itu Mudah, Gratis, Lengkap dan Menyenangkan

Cara Aman Install dan Konfigurasi PHPMyAdmin di Server CentOS

PHPMyAdmin merupakan aplikasi gratis yang ditulis dalam bahasa pemrograman PHP yang digunakan untuk menangani administrasi MySQL menggunakan jarinagn website. phpMyAdmin berguana untuk mempermudah kita dalam melakukan berbagai operasi MySQL, seperti fields, relasi, indeks, pengguna, permissions, mengelola basisdata, tabel, dan sebagainya.

Cpanel seperti Cpanel/WHM, webuzo, Kloxo dan lain-lain telah menggunakan phpmyadmin ini untuk mempermudah pengolahan databases mysql. Dengan bantuan phpMyAdmin kita tidak perlu melakukan atau mengetik baris perintah SQl yang rumit.

Berikut ini saya akan membahas cara install dan konfigurasi phpmyadmin di CentOS

Pertama, Kunjungi halaman epel-release – Extra Packages for Enterprise Linux repository configuration di http://download.fedoraproject.org/pub/epel/6/i386/repoview/epel-release.html. Lihat dan sesuaikan alamat repo terbaru.

Install dan aktifkan EPEL repository, login ke termianl sebagai root

rpm -ivh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/epel-release-6-8.noarch.rpm

 

Hasilnya diserver saya seperti ini:

[root@linuxfun ~]# [root@linuxfun ~]# rpm -ivh http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/epel-release-6-8.noarch.rpm
bash: [root@linuxfun: command not found
[root@linuxfun ~]# Retrieving http://ftp.jaist.ac.jp/pub/Linux/Fedora/epel/6/i386/epel-release-6-8.noarch.rpm
bash: Retrieving: command not found
[root@linuxfun ~]# warning: /var/tmp/rpm-tmp.ME5YL2: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOKEY
bash: warning:: command not found
[root@linuxfun ~]# Preparing...                ########################################### [100%]
bash: Preparing...: command not found
[root@linuxfun ~]#    1:epel-release           ########################################### [100%]
bash: 1:epel-release: command not found
[root@linuxfun ~]# [root@linuxfun ~]#
bash: [root@linuxfun: command not found
[root@linuxfun ~]#

 

Kedua, Install phpMyAdmin dengan cara

yum install phpMyAdmin

Anda perlu melakukan konfirmasi yes beberapa kali untuk proses ini.

Tampilan prosesnya seperti ini

[root@linuxfun ~]# yum install phpMyAdmin
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
epel/metalink                                            |  11 kB     00:00
 * base: mirror.itc.virginia.edu
 * epel: mirror.cs.pitt.edu
 * extras: mirror.cogentco.com
 * updates: mirror.cs.pitt.edu
epel                                                     | 4.4 kB     00:00
epel/primary_db                                          | 5.2 MB     00:03
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:3.5.8.2-1.el6 will be installed
--> Processing Dependency: php-mysql >= 5.2.0 for package: phpMyAdmin-3.5.8.2-1.el6.noarch
--> Processing Dependency: php-mcrypt >= 5.2.0 for package: phpMyAdmin-3.5.8.2-1.el6.noarch
--> Processing Dependency: php-mbstring >= 5.2.0 for package: phpMyAdmin-3.5.8.2-1.el6.noarch
--> Processing Dependency: php-gd >= 5.2.0 for package: phpMyAdmin-3.5.8.2-1.el6.noarch
--> Processing Dependency: php >= 5.2.0 for package: phpMyAdmin-3.5.8.2-1.el6.noarch
--> Processing Dependency: php-php-gettext for package: phpMyAdmin-3.5.8.2-1.el6.noarch
--> Running transaction check
---> Package php.i686 0:5.3.3-27.el6_5 will be installed
--> Processing Dependency: php-common(x86-32) = 5.3.3-27.el6_5 for package: php-5.3.3-27.el6_5.i686
--> Processing Dependency: php-cli(x86-32) = 5.3.3-27.el6_5 for package: php-5.3.3-27.el6_5.i686
---> Package php-gd.i686 0:5.3.3-27.el6_5 will be installed
--> Processing Dependency: libfreetype.so.6 for package: php-gd-5.3.3-27.el6_5.i686
--> Processing Dependency: libXpm.so.4 for package: php-gd-5.3.3-27.el6_5.i686
--> Processing Dependency: libX11.so.6 for package: php-gd-5.3.3-27.el6_5.i686
---> Package php-mbstring.i686 0:5.3.3-27.el6_5 will be installed
---> Package php-mcrypt.i686 0:5.3.3-3.el6 will be installed
--> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt-5.3.3-3.el6.i686
---> Package php-mysql.i686 0:5.3.3-27.el6_5 will be installed
--> Processing Dependency: php-pdo(x86-32) for package: php-mysql-5.3.3-27.el6_5.i686
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16) for package: php-mysql-5.3.3-27.el6_5.i686
--> Processing Dependency: libmysqlclient.so.16 for package: php-mysql-5.3.3-27.el6_5.i686
---> Package php-php-gettext.noarch 0:1.0.11-3.el6 will be installed
--> Running transaction check
---> Package freetype.i686 0:2.3.11-14.el6_3.1 will be installed
---> Package libX11.i686 0:1.5.0-4.el6 will be installed
--> Processing Dependency: libX11-common = 1.5.0-4.el6 for package: libX11-1.5.0-4.el6.i686
--> Processing Dependency: libxcb.so.1 for package: libX11-1.5.0-4.el6.i686
---> Package libXpm.i686 0:3.5.10-2.el6 will be installed
---> Package libmcrypt.i686 0:2.5.8-9.el6 will be installed
---> Package mysql-libs.i686 0:5.1.73-3.el6_5 will be installed
---> Package php-cli.i686 0:5.3.3-27.el6_5 will be installed
---> Package php-common.i686 0:5.3.3-27.el6_5 will be installed
---> Package php-pdo.i686 0:5.3.3-27.el6_5 will be installed
--> Running transaction check
---> Package libX11-common.noarch 0:1.5.0-4.el6 will be installed
---> Package libxcb.i686 0:1.8.1-1.el6 will be installed
--> Processing Dependency: libXau.so.6 for package: libxcb-1.8.1-1.el6.i686
--> Running transaction check
---> Package libXau.i686 0:1.0.6-4.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package               Arch         Version                 Repository     Size
================================================================================
Installing:
 phpMyAdmin            noarch       3.5.8.2-1.el6           epel          4.3 M
Installing for dependencies:
 freetype              i686         2.3.11-14.el6_3.1       base          363 k
 libX11                i686         1.5.0-4.el6             base          590 k
 libX11-common         noarch       1.5.0-4.el6             base          192 k
 libXau                i686         1.0.6-4.el6             base           24 k
 libXpm                i686         3.5.10-2.el6            base           50 k
 libmcrypt             i686         2.5.8-9.el6             epel           94 k
 libxcb                i686         1.8.1-1.el6             base          114 k
 mysql-libs            i686         5.1.73-3.el6_5          updates       1.2 M
 php                   i686         5.3.3-27.el6_5          updates       1.1 M
 php-cli               i686         5.3.3-27.el6_5          updates       2.2 M
 php-common            i686         5.3.3-27.el6_5          updates       526 k
 php-gd                i686         5.3.3-27.el6_5          updates       105 k
 php-mbstring          i686         5.3.3-27.el6_5          updates       455 k
 php-mcrypt            i686         5.3.3-3.el6             epel           18 k
 php-mysql             i686         5.3.3-27.el6_5          updates        79 k
 php-pdo               i686         5.3.3-27.el6_5          updates        74 k
 php-php-gettext       noarch       1.0.11-3.el6            epel           21 k

Transaction Summary
================================================================================
Install      18 Package(s)

Total download size: 12 M
Installed size: 42 M
Is this ok [y/N]: y

Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:3.5.8.2-1.el6 will be installed
--> Processing Dependency: php-mysql >= 5.2.0 for package: phpMyAdmin-3.5.8.2-1.                                                                                        el6.noarch
--> Processing Dependency: php-mcrypt >= 5.2.0 for package: phpMyAdmin-3.5.8.2-1                                                                                        .el6.noarch
--> Processing Dependency: php-mbstring >= 5.2.0 for package: phpMyAdmin-3.5.8.2                                                                                        -1.el6.noarch
--> Processing Dependency: php-gd >= 5.2.0 for package: phpMyAdmin-3.5.8.2-1.el6                                                                                        .noarch
--> Processing Dependency: php >= 5.2.0 for package: phpMyAdmin-3.5.8.2-1.el6.no                                                                                        arch
--> Processing Dependency: php-php-gettext for package: phpMyAdmin-3.5.8.2-1.el6                                                                                        .noarch
--> Running transaction check
---> Package php.i686 0:5.3.3-27.el6_5 will be installed
--> Processing Dependency: php-common(x86-32) = 5.3.3-27.el6_5 for package: php-                                                                                        5.3.3-27.el6_5.i686
--> Processing Dependency: php-cli(x86-32) = 5.3.3-27.el6_5 for package: php-5.3                                                                                        .3-27.el6_5.i686
---> Package php-gd.i686 0:5.3.3-27.el6_5 will be installed
--> Processing Dependency: libfreetype.so.6 for package: php-gd-5.3.3-27.el6_5.i                                                                                        686
--> Processing Dependency: libXpm.so.4 for package: php-gd-5.3.3-27.el6_5.i686
--> Processing Dependency: libX11.so.6 for package: php-gd-5.3.3-27.el6_5.i686
---> Package php-mbstring.i686 0:5.3.3-27.el6_5 will be installed
---> Package php-mcrypt.i686 0:5.3.3-3.el6 will be installed
--> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt-5.3.3-3.el6.i6                                                                                        86
---> Package php-mysql.i686 0:5.3.3-27.el6_5 will be installed
--> Processing Dependency: php-pdo(x86-32) for package: php-mysql-5.3.3-27.el6_5                                                                                        .i686
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16) for package:                                                                                         php-mysql-5.3.3-27.el6_5.i686
--> Processing Dependency: libmysqlclient.so.16 for package: php-mysql-5.3.3-27.                                                                                        el6_5.i686
---> Package php-php-gettext.noarch 0:1.0.11-3.el6 will be installed
--> Running transaction check
---> Package freetype.i686 0:2.3.11-14.el6_3.1 will be installed
---> Package libX11.i686 0:1.5.0-4.el6 will be installed
--> Processing Dependency: libX11-common = 1.5.0-4.el6 for package: libX11-1.5.0                                                                                        -4.el6.i686
--> Processing Dependency: libxcb.so.1 for package: libX11-1.5.0-4.el6.i686
---> Package libXpm.i686 0:3.5.10-2.el6 will be installed
---> Package libmcrypt.i686 0:2.5.8-9.el6 will be installed
---> Package mysql-libs.i686 0:5.1.73-3.el6_5 will be installed
---> Package php-cli.i686 0:5.3.3-27.el6_5 will be installed
---> Package php-common.i686 0:5.3.3-27.el6_5 will be installed
---> Package php-pdo.i686 0:5.3.3-27.el6_5 will be installed
--> Running transaction check
---> Package libX11-common.noarch 0:1.5.0-4.el6 will be installed
---> Package libxcb.i686 0:1.8.1-1.el6 will be installed
--> Processing Dependency: libXau.so.6 for package: libxcb-1.8.1-1.el6.i686
--> Running transaction check
---> Package libXau.i686 0:1.0.6-4.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package               Arch         Version                 Repository     Size
================================================================================
Installing:
 phpMyAdmin            noarch       3.5.8.2-1.el6           epel          4.3 M
Installing for dependencies:
 freetype              i686         2.3.11-14.el6_3.1       base          363 k
 libX11                i686         1.5.0-4.el6             base          590 k
 libX11-common         noarch       1.5.0-4.el6             base          192 k
 libXau                i686         1.0.6-4.el6             base           24 k
 libXpm                i686         3.5.10-2.el6            base           50 k
 libmcrypt             i686         2.5.8-9.el6             epel           94 k
 libxcb                i686         1.8.1-1.el6             base          114 k
 mysql-libs            i686         5.1.73-3.el6_5          updates       1.2 M
 php                   i686         5.3.3-27.el6_5          updates       1.1 M
 php-cli               i686         5.3.3-27.el6_5          updates       2.2 M
 php-common            i686         5.3.3-27.el6_5          updates       526 k
 php-gd                i686         5.3.3-27.el6_5          updates       105 k
 php-mbstring          i686         5.3.3-27.el6_5          updates       455 k
 php-mcrypt            i686         5.3.3-3.el6             epel           18 k
 php-mysql             i686         5.3.3-27.el6_5          updates        79 k
 php-pdo               i686         5.3.3-27.el6_5          updates        74 k
 php-php-gettext       noarch       1.0.11-3.el6            epel           21 k

Transaction Summary
================================================================================
Install      18 Package(s)

Total download size: 12 M
Installed size: 42 M
Is this ok [y/N]: y

Downloading Packages:
(1/18): freetype-2.3.11-14.el6_3.1.i686.rpm              | 363 kB     00:00
(2/18): libX11-1.5.0-4.el6.i686.rpm                      | 590 kB     00:00
(3/18): libX11-common-1.5.0-4.el6.noarch.rpm             | 192 kB     00:00
(4/18): libXau-1.0.6-4.el6.i686.rpm                      |  24 kB     00:00
(5/18): libXpm-3.5.10-2.el6.i686.rpm                     |  50 kB     00:00
(6/18): libmcrypt-2.5.8-9.el6.i686.rpm                   |  94 kB     00:00
(7/18): libxcb-1.8.1-1.el6.i686.rpm                      | 114 kB     00:00
(8/18): mysql-libs-5.1.73-3.el6_5.i686.rpm               | 1.2 MB     00:00
(9/18): php-5.3.3-27.el6_5.i686.rpm                      | 1.1 MB     00:00
(10/18): php-cli-5.3.3-27.el6_5.i686.rpm                 | 2.2 MB     00:01
(11/18): php-common-5.3.3-27.el6_5.i686.rpm              | 526 kB     00:00
(12/18): php-gd-5.3.3-27.el6_5.i686.rpm                  | 105 kB     00:00
(13/18): php-mbstring-5.3.3-27.el6_5.i686.rpm            | 455 kB     00:00
(14/18): php-mcrypt-5.3.3-3.el6.i686.rpm                 |  18 kB     00:00
(15/18): php-mysql-5.3.3-27.el6_5.i686.rpm               |  79 kB     00:00
(16/18): php-pdo-5.3.3-27.el6_5.i686.rpm                 |  74 kB     00:00
(17/18): php-php-gettext-1.0.11-3.el6.noarch.rpm         |  21 kB     00:00
(18/18): phpMyAdmin-3.5.8.2-1.el6.noarch.rpm             | 4.3 MB     00:02
--------------------------------------------------------------------------------
Total                                           1.5 MB/s |  12 MB     00:07
warning: rpmts_HdrFromFdno: Header V3 RSA/SHA256 Signature, key ID 0608b895: NOK                                                                                        EY
Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Importing GPG key 0x0608B895:
 Userid : EPEL (6) <epel@fedoraproject.org>
 Package: epel-release-6-8.noarch (installed)
 From   : /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
Is this ok [y/N]: y
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Warning: RPMDB altered outside of yum.
  Installing : libX11-common-1.5.0-4.el6.noarch                            1/18
  Installing : php-common-5.3.3-27.el6_5.i686                              2/18
  Installing : php-mbstring-5.3.3-27.el6_5.i686                            3/18
  Installing : php-php-gettext-1.0.11-3.el6.noarch                         4/18
  Installing : php-pdo-5.3.3-27.el6_5.i686                                 5/18
  Installing : php-cli-5.3.3-27.el6_5.i686                                 6/18
  Installing : php-5.3.3-27.el6_5.i686                                     7/18
  Installing : libmcrypt-2.5.8-9.el6.i686                                  8/18
  Installing : php-mcrypt-5.3.3-3.el6.i686                                 9/18
  Installing : libXau-1.0.6-4.el6.i686                                    10/18
  Installing : libxcb-1.8.1-1.el6.i686                                    11/18
  Installing : libX11-1.5.0-4.el6.i686                                    12/18
  Installing : libXpm-3.5.10-2.el6.i686                                   13/18
  Installing : freetype-2.3.11-14.el6_3.1.i686                            14/18
  Installing : php-gd-5.3.3-27.el6_5.i686                                 15/18
  Installing : mysql-libs-5.1.73-3.el6_5.i686                             16/18
warning: /etc/my.cnf created as /etc/my.cnf.rpmnew
  Installing : php-mysql-5.3.3-27.el6_5.i686                              17/18
  Installing : phpMyAdmin-3.5.8.2-1.el6.noarch                            18/18
  Verifying  : mysql-libs-5.1.73-3.el6_5.i686                              1/18
  Verifying  : libX11-1.5.0-4.el6.i686                                     2/18
  Verifying  : php-mcrypt-5.3.3-3.el6.i686                                 3/18
  Verifying  : phpMyAdmin-3.5.8.2-1.el6.noarch                             4/18
  Verifying  : php-mysql-5.3.3-27.el6_5.i686                               5/18
  Verifying  : php-php-gettext-1.0.11-3.el6.noarch                         6/18
  Verifying  : php-pdo-5.3.3-27.el6_5.i686                                 7/18
  Verifying  : freetype-2.3.11-14.el6_3.1.i686                             8/18
  Verifying  : libxcb-1.8.1-1.el6.i686                                     9/18
  Verifying  : libXau-1.0.6-4.el6.i686                                    10/18
  Verifying  : php-mbstring-5.3.3-27.el6_5.i686                           11/18
  Verifying  : libX11-common-1.5.0-4.el6.noarch                           12/18
  Verifying  : php-common-5.3.3-27.el6_5.i686                             13/18
  Verifying  : php-gd-5.3.3-27.el6_5.i686                                 14/18
  Verifying  : php-5.3.3-27.el6_5.i686                                    15/18
  Verifying  : php-cli-5.3.3-27.el6_5.i686                                16/18
  Verifying  : libXpm-3.5.10-2.el6.i686                                   17/18
  Verifying  : libmcrypt-2.5.8-9.el6.i686                                 18/18

Installed:
  phpMyAdmin.noarch 0:3.5.8.2-1.el6

Dependency Installed:
  freetype.i686 0:2.3.11-14.el6_3.1         libX11.i686 0:1.5.0-4.el6
  libX11-common.noarch 0:1.5.0-4.el6        libXau.i686 0:1.0.6-4.el6
  libXpm.i686 0:3.5.10-2.el6                libmcrypt.i686 0:2.5.8-9.el6
  libxcb.i686 0:1.8.1-1.el6                 mysql-libs.i686 0:5.1.73-3.el6_5
  php.i686 0:5.3.3-27.el6_5                 php-cli.i686 0:5.3.3-27.el6_5
  php-common.i686 0:5.3.3-27.el6_5          php-gd.i686 0:5.3.3-27.el6_5
  php-mbstring.i686 0:5.3.3-27.el6_5        php-mcrypt.i686 0:5.3.3-3.el6
  php-mysql.i686 0:5.3.3-27.el6_5           php-pdo.i686 0:5.3.3-27.el6_5
  php-php-gettext.noarch 0:1.0.11-3.el6

Complete!
[root@linuxfun ~]#

 

Ketiga, Konfigurasi phpMyAdmin agar dapat diakses oleh server Apache

/etc/httpd/conf.d/phpMyAdmin.conf

Isikan dengan code berikut:

Alias /phpMyAdmin /usr/share/phpMyAdmin
Alias /phpmyadmin /usr/share/phpMyAdmin

## Comment below section to allow everyone 
<Directory /usr/share/phpMyAdmin/>
    <IfModule !mod_authz_core.c>
     Order Deny,Allow
     Deny from All
     Allow from 192.168.1.0/24
     Allow from ::1
   </IfModule>
</Directory>

<Directory /usr/share/phpMyAdmin/libraries/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>

<Directory /usr/share/phpMyAdmin/setup/lib/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>

<Directory /usr/share/phpMyAdmin/setup/frames/>
    Order Deny,Allow
    Deny from All
    Allow from None
</Directory>

Keempat, restart server Anda.

service httpd restart

 

Kelima, Jalankan Access phpMyAdmin in Browser http://IPAnda/phpmyadmin/ gunakan user root dan password root MySQL Anda

 

Recent Posts

Updated: July 13, 2014 — 5:43 pm

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Linux Fun © 2014 RSS