Install phpMyAdmin Via yum Pada CentOS http://www.linggih.com | Install phpMyAdmin Via yum Pada CentOS 1 Install phpMyAdmin Via yum Pada CentOS phpMyAdmin adalah script (software) tool php yang dikhususkan untuk meng- handle administrasi database MySQL dan dapat diakses via internet (menggunakan Web Browser) dari seluruh dunia. Script ini dapat handle seluruh MySQL database (diperlukan satu super-user) sehingga memudahkan administrator untuk memanage database-database pada server. Pada posting artikel kali ini, saya akan coba menunjukkan cara mudah install phpMyAdmin pada CentOS (Versi 6.2) menggunakan yum. Download & Install EPEL Repository 1. i386 wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/epel/beta/6/i386/epel-release-6- 5.noarch.rpm 2. x86_64 wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/epel/beta/6/x86_64/epel-release-6- 5.noarch.rpm [root@linggih ~]# wget ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/epel/beta/6/x86_64/epel- release-6-5.noarch.rpm --2012-05-01 14:08:48-- ftp://ftp.pbone.net/mirror/download.fedora.redhat.com/pub/fedora/epel/beta/6/x86_64/epe l-release-6-5.noarch.rpm => âepel-release-6-5.noarch.rpmâ esolving ftp.pbone.net... 85.14.85.4 Connecting to ftp.pbone.net|85.14.85.4|:21... connected. Logging in as anonymous ... Logged in! ==> SYST ... done. ==> PWD ... done. ==> TYPE I ... done. ==> CWD (1) /mirror/download.fedora.redhat.com/pub/fedora/epel/beta/6/x86_64 ... done. ==> SIZE epel-release-6-5.noarch.rpm ... 14064 ==> PASV ... done. ==> RETR epel-release-6-5.noarch.rpm ... done. Length: 14064 (14K) (unauthoritative) 100%[======================================>] 14,064 15.2K/s in 0.9s
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Install phpMyAdmin Via yum Pada CentOS
http://www.linggih.com | Install phpMyAdmin Via yum Pada CentOS 1
Install phpMyAdmin Via yum Pada CentOS
phpMyAdmin adalah script (software) tool php yang dikhususkan untuk meng-handle administrasi database MySQL dan dapat diakses via internet (menggunakan Web Browser) dari seluruh dunia. Script ini dapat handle seluruh MySQL database (diperlukan satu super-user) sehingga memudahkan administrator untuk memanage database-database pada server.
Pada posting artikel kali ini, saya akan coba menunjukkan cara mudah install phpMyAdmin pada CentOS (Versi 6.2) menggunakan yum.
http://www.linggih.com | Install phpMyAdmin Via yum Pada CentOS 5
--> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-gd-5.3.3-
3.el6_2.6.x86_64 --> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-recode-5.3.3-
3.el6_2.6.x86_64 --> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-mbstring-5.3.3-
3.el6_2.6.x86_64 --> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-dba-5.3.3-
3.el6_2.6.x86_64 --> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-snmp-5.3.3-
3.el6_2.6.x86_64 --> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-pdo-5.3.3-
3.el6_2.6.x86_64 --> Processing Dependency: php-common = 5.3.3-3.el6_2.6 for package: php-bcmath-5.3.3-
3.el6_2.6.x86_64 ---> Package php-common.x86_64 0:5.3.11-1.el6.remi will be an update --> Running transaction check ---> Package php.x86_64 0:5.3.3-3.el6_2.6 will be updated --> Processing Dependency: php = 5.3.3-3.el6_2.6 for package: php-devel-5.3.3-
3.el6_2.6.x86_64 ---> Package php.x86_64 0:5.3.11-1.el6.remi will be obsoleting ---> Package php-bcmath.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-bcmath.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-cli.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-cli.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-dba.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-dba.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-embedded.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-embedded.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-enchant.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-enchant.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-gd.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-gd.x86_64 0:5.3.11-1.el6.remi will be an update --> Processing Dependency: libt1.so.5()(64bit) for package: php-gd-5.3.11-
1.el6.remi.x86_64 ---> Package php-imap.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-imap.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-intl.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-intl.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-ldap.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-ldap.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-mbstring.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-mbstring.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-mysql.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-mysql.x86_64 0:5.3.11-1.el6.remi will be an update --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package:
php-mysql-5.3.11-1.el6.remi.x86_64 --> Processing Dependency: libmysqlclient.so.18(libmysqlclient_16)(64bit) for package:
php-mysql-5.3.11-1.el6.remi.x86_64 --> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php-mysql-5.3.11-
1.el6.remi.x86_64 ---> Package php-odbc.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-odbc.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-pdo.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-pdo.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-pgsql.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-pgsql.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-process.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-process.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-pspell.x86_64 0:5.3.3-3.el6_2.6 will be updated
http://www.linggih.com | Install phpMyAdmin Via yum Pada CentOS 6
---> Package php-pspell.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-recode.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-recode.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-snmp.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-snmp.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-soap.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-soap.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-tidy.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-tidy.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-xml.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-xml.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-xmlrpc.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-xmlrpc.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package php-zts.x86_64 0:5.3.3-3.el6_2.6 will be obsoleted --> Running transaction check ---> Package mysql-libs.x86_64 0:5.1.61-1.el6_2.1 will be updated --> Processing Dependency: libmysqlclient.so.16()(64bit) for package: mysql-server-
5.1.61-1.el6_2.1.x86_64 --> Processing Dependency: libmysqlclient.so.16()(64bit) for package: mysql-5.1.61-
1.el6_2.1.x86_64 --> Processing Dependency: libmysqlclient.so.16()(64bit) for package: 2:postfix-2.6.6-
2.2.el6_1.x86_64 --> Processing Dependency: libmysqlclient.so.16()(64bit) for package: perl-DBD-MySQL-
4.013-3.el6.x86_64 --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package:
mysql-server-5.1.61-1.el6_2.1.x86_64 --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package:
mysql-5.1.61-1.el6_2.1.x86_64 --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package:
2:postfix-2.6.6-2.2.el6_1.x86_64 --> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package:
perl-DBD-MySQL-4.013-3.el6.x86_64 --> Processing Dependency: libmysqlclient_r.so.16()(64bit) for package: mysql-server-
5.1.61-1.el6_2.1.x86_64 --> Processing Dependency: libmysqlclient_r.so.16()(64bit) for package: mysql-5.1.61-
1.el6_2.1.x86_64 --> Processing Dependency: libmysqlclient_r.so.16(libmysqlclient_16)(64bit) for package:
mysql-server-5.1.61-1.el6_2.1.x86_64 --> Processing Dependency: libmysqlclient_r.so.16(libmysqlclient_16)(64bit) for package:
mysql-5.1.61-1.el6_2.1.x86_64 --> Processing Dependency: mysql-libs = 5.1.61-1.el6_2.1 for package: mysql-5.1.61-
1.el6_2.1.x86_64 ---> Package mysql-libs.x86_64 0:5.5.23-1.el6.remi will be an update ---> Package php-devel.x86_64 0:5.3.3-3.el6_2.6 will be updated ---> Package php-devel.x86_64 0:5.3.11-1.el6.remi will be an update ---> Package t1lib.x86_64 0:5.1.2-6.el6_2.1 will be installed --> Running transaction check ---> Package compat-mysql51.x86_64 0:5.1.54-1.el6.remi will be installed ---> Package mysql.x86_64 0:5.1.61-1.el6_2.1 will be updated ---> Package mysql.x86_64 0:5.5.23-1.el6.remi will be an update ---> Package mysql-server.x86_64 0:5.1.61-1.el6_2.1 will be updated ---> Package mysql-server.x86_64 0:5.5.23-1.el6.remi will be an update --> Processing Dependency: libaio.so.1(LIBAIO_0.4)(64bit) for package: mysql-server-
5.5.23-1.el6.remi.x86_64 --> Processing Dependency: libaio.so.1(LIBAIO_0.1)(64bit) for package: mysql-server-
5.5.23-1.el6.remi.x86_64 --> Processing Dependency: libaio.so.1()(64bit) for package: mysql-server-5.5.23-
http://www.linggih.com | Install phpMyAdmin Via yum Pada CentOS 8
Install 7 Package(s)
Upgrade 27 Package(s)
Total download size: 34 M Is this ok [y/N]: y Downloading Packages: (1/34): compat-mysql51-5.1.54-1.el6.remi.x86_64.rpm | 1.4 MB 00:12 http://centos.biz.net.id/6.2/os/x86_64/Packages/libaio-0.3.107-10.el6.x86_64.rpm: [Errno
Ketikkan command mysql -u root. Jika keluar pesan error "ERROR 1045 (28000): Access denied for user ‘root’@'localhost’ (using password: NO)" berarti user root sudah ada, pakai command mysql -u root -p. Kemudian ketikkan password root.
Jika anda install phpMyAdmin ini pada fresh install OS (Minimal Install), buat user root terlebih dahulu dengan command:
1. mysql -u root 2. SET PASSWORD FOR ‘root’@'localhost’ = PASSWORD(‘passwordroot’);. Ganti passwordroot dengan password
root anda. 3. Tekan tombol Ctrl + C atau ketikkan exit untuk keluar
[root@linggih ~]# mysql -u root Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.1.61 Source distribution Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> SET PASSWORD FOR 'root'@'localhost' = PASSWORD('passwordroot'); Query OK, 0 rows affected (0.00 sec) mysql> mysql> Ctrl-C -- exit! Aborted [root@linggih ~]#
Buat database phpMyAdmin
Command:
1. mysql -u root -p. Kemudian ketikkan password root
http://www.linggih.com | Install phpMyAdmin Via yum Pada CentOS 12
2. CREATE DATABASE phpmyadmin; → buat database phpmyadmin 3. Tekan tombol Ctrl + C atau ketikkan exit untuk keluar
[root@linggih ~]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 3 Server version: 5.5.23 MySQL Community Server (GPL) by Remi Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> CREATE DATABASE phpmyadmin; Query OK, 1 row affected (0.00 sec) mysql> exit Bye [root@linggih ~]#
Control-User
Setting pma user dan grant akses ke database phpmyadmin
Command:
1. mysql -u root -p, kemudian ketikkan password root. 2. CREATE USER ‘pma’@'localhost’ IDENTIFIED BY ‘pmapass’;. Setting user permission (pma) @ localhost, user
password pmapass 3. GRANT ALL PRIVILEGES ON phpmyadmin.* to pma@localhost;. Setting all privileges database permission
(phpmyadmin) oleh user pma @ localhost 4. Tekan tombol Ctrl + C atau ketikkan exit untuk keluar
[root@linggih phpMyAdmin]# mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 5 Server version: 5.5.23 MySQL Community Server (GPL) by Remi Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> CREATE USER 'pma'@'localhost' IDENTIFIED BY 'pmapass'; Query OK, 0 rows affected (0.00 sec)
http://www.linggih.com | Install phpMyAdmin Via yum Pada CentOS 13
mysql> GRANT ALL PRIVILEGES ON phpmyadmin.* to pma@localhost; Query OK, 0 rows affected (0.00 sec) mysql> exit Bye [root@linggih phpMyAdmin]#
Import Table
Import (execute) create_tables.sql pada direktori "/usr/share/phpMyAdmin/examples/" ke database phpmyadmin.
Command:
1. mysql -u pma -p -h localhost phpmyadmin < /usr/share/phpMyAdmin/examples/create_tables.sql 2. Ketikkan password user pma (password default pmapass), tekan enter
[root@linggih phpMyAdmin]# mysql -u pma -p -h localhost phpmyadmin <
/usr/share/phpMyAdmin/examples/create_tables.sql Enter password: [root@linggih phpMyAdmin]#
Edit File Konfigurasi
Copy file konfigurasi phpMyAdmin "config.sample.inc.php" dengan nama "config.inc.php".
http://www.linggih.com | Install phpMyAdmin Via yum Pada CentOS 15
/* User used to manipulate with storage */ $cfg['Servers'][$i]['controlhost'] = 'localhost'; $cfg['Servers'][$i]['controluser'] = 'pma'; $cfg['Servers'][$i]['controlpass'] = 'pmapass';
Buka file /etc/httpd/conf.d/phpMyAdmin.conf, kemudian edit deny from all ke allow from all untuk menghindari
pesan Error "Forbidden (You don't have permission to access /phpmyadmin on this server.)" .
<Directory /usr/share/phpMyAdmin/> order deny,allow allow from all allow from 127.0.0.1 allow from ::1 </Directory>
Restart Apache Web Server
Restart Apache Web Server, ketikkan command service httpd restart atau /etc/init.d/httpd restart
[root@linggih ~]# service httpd restart Stopping httpd: [ OK ]
Starting httpd: [ OK ] [root@linggih ~]#
Test phpMyAdmin
buka halaman main index/phpmyadmin (http://domain-anda.com/phpmyadmin) pada web browser. Jika phpMyAdmin sukses terinstall, anda akan diminta memasukkan detail user login. Masukkan username dan password root, kemudian klik tombol Go.