THE POLICE LINE

Semakin lama saya hidup, semakin saya sadar Akan pengaruh sikap dalam kehidupan Sikap lebih penting daripada ilmu, daripada uang, daripada kesempatan, daripada kegagalan, daripada keberhasilan, daripada apapun yang mungkin dikatakan atau dilakukan seseorang.

Tutorial untuk install phpMyAdmin dari rpm dan mengkonfigurasi nya sehingga bisa di akses http://host/phpMyAdmin/

1.Install paket phpMyAdmin

[root@cachak-dev ~]# yum install phpMyAdmin
Loaded plugins: fastestmirror
Repository epel is listed more than once in the configuration
Determining fastest mirrors
epel | 2.1 kB 00:00
primary.sqlite.bz2 | 2.6 MB 00:27
myindo | 951 B 00:00
primary.xml.gz | 3.4 kB 00:00
myindo 2/2
base | 1.1 kB 00:00
primary.xml.gz | 878 kB 00:13
base 2508/2508
updates | 951 B 00:00
primary.xml.gz | 185 kB 00:02
updates 287/287
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:2.11.9.5-1.el5 set to be updated
--> Processing Dependency: php-mysql >= 4.1.0 for package: phpMyAdmin
--> Processing Dependency: php >= 4.1.0 for package: phpMyAdmin
--> Processing Dependency: php-mbstring >= 4.1.0 for package: phpMyAdmin
--> Processing Dependency: webserver for package: phpMyAdmin
--> Running transaction check
---> Package php-mbstring.i386 0:5.1.6-23.2.el5_3 set to be updated
--> Processing Dependency: php-common = 5.1.6-23.2.el5_3 for package: php-mbstring
---> Package php-mysql.i386 0:5.1.6-23.2.el5_3 set to be updated
--> Processing Dependency: php-pdo for package: php-mysql
---> Package php.i386 0:5.1.6-23.2.el5_3 set to be updated
--> Processing Dependency: php-cli = 5.1.6-23.2.el5_3 for package: php
--> Processing Dependency: libcurl.so.3 for package: php
--> Processing Dependency: libaspell.so.15 for package: php
--> Processing Dependency: libgmp.so.3 for package: php
--> Processing Dependency: libidn.so.11 for package: php
--> Processing Dependency: libpspell.so.15 for package: php
---> Package httpd.i386 0:2.2.3-22.el5.centos.1 set to be updated
filelists.sqlite.bz2 | 4.0 MB 00:43
filelists.xml.gz | 1.4 kB 00:00
filelists.xml.gz | 2.8 MB 00:29
filelists.xml.gz | 1.3 MB 00:13
--> Processing Dependency: libaprutil-1.so.0 for package: httpd
--> Processing Dependency: libapr-1.so.0 for package: httpd
--> Processing Dependency: /etc/mime.types for package: httpd
--> Running transaction check
---> Package libidn.i386 0:0.6.5-1.1 set to be updated
---> Package php-pdo.i386 0:5.1.6-23.2.el5_3 set to be updated
---> Package curl.i386 0:7.15.5-2.1.el5_3.4 set to be updated
---> Package apr-util.i386 0:1.2.7-7.el5_3.1 set to be updated
---> Package mailcap.noarch 0:2.1.23-1.fc6 set to be updated
---> Package php-cli.i386 0:5.1.6-23.2.el5_3 set to be updated
---> Package php-common.i386 0:5.1.6-23.2.el5_3 set to be updated
---> Package apr.i386 0:1.2.7-11 set to be updated
---> Package gmp.i386 0:4.1.4-10.el5 set to be updated
---> Package aspell.i386 12:0.60.3-7.1 set to be updated
--> Processing Dependency: aspell-en for package: aspell
--> Running transaction check
---> Package aspell-en.i386 50:6.0-2.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================
Package Arch Version Repository Size
=================================================================================
Installing:
phpMyAdmin noarch 2.11.9.5-1.el5 epel 4.2 M
Installing for dependencies:
apr i386 1.2.7-11 base 122 k
apr-util i386 1.2.7-7.el5_3.1 updates 76 k
aspell i386 12:0.60.3-7.1 base 936 k
aspell-en i386 50:6.0-2.1 base 1.6 M
curl i386 7.15.5-2.1.el5_3.4 updates 232 k
gmp i386 4.1.4-10.el5 base 664 k
httpd i386 2.2.3-22.el5.centos.1 updates 1.2 M
libidn i386 0.6.5-1.1 base 194 k
mailcap noarch 2.1.23-1.fc6 base 14 k
php i386 5.1.6-23.2.el5_3 updates 1.1 M
php-cli i386 5.1.6-23.2.el5_3 updates 2.1 M
php-common i386 5.1.6-23.2.el5_3 updates 151 k
php-mbstring i386 5.1.6-23.2.el5_3 updates 994 k
php-mysql i386 5.1.6-23.2.el5_3 updates 85 k
php-pdo i386 5.1.6-23.2.el5_3 updates 64 k

Transaction Summary
=================================================================================
Install 16 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 14 M
Is this ok [y/N]: y
Downloading Packages:
(1/16): mailcap-2.1.23-1.fc6.noarch.rpm | 14 kB 00:00
(2/16): php-pdo-5.1.6-23.2.el5_3.i386.rpm | 64 kB 00:00
(3/16): apr-util-1.2.7-7.el5_3.1.i386.rpm | 76 kB 00:00
(4/16): php-mysql-5.1.6-23.2.el5_3.i386.rpm | 85 kB 00:00
(5/16): apr-1.2.7-11.i386.rpm | 122 kB 00:04
(6/16): php-common-5.1.6-23.2.el5_3.i386.rpm | 151 kB 00:01
(7/16): libidn-0.6.5-1.1.i386.rpm | 194 kB 00:01
(8/16): curl-7.15.5-2.1.el5_3.4.i386.rpm | 232 kB 00:02
(9/16): gmp-4.1.4-10.el5.i386.rpm | 664 kB 00:09
(10/16): aspell-0.60.3-7.1.i386.rpm | 936 kB 00:10
(11/16): php-mbstring-5.1.6-23.2.el5_3.i386.rpm | 994 kB 00:11
(12/16): php-5.1.6-23.2.el5_3.i386.rpm | 1.1 MB 00:13
(13/16): httpd-2.2.3-22.el5.centos.1.i386.rpm | 1.2 MB 00:14
(14/16): aspell-en-6.0-2.1.i386.rpm | 1.6 MB 00:16
(15/16): php-cli-5.1.6-23.2.el5_3.i386.rpm | 2.1 MB 00:29
(16/16): phpMyAdmin-2.11.9.5-1.el5.noarch.rpm | 4.2 MB 00:57
---------------------------------------------------------------------------------
Total 78 kB/s | 14 MB 02:58
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : mailcap [ 1/16]
Installing : php-common [ 2/16]
Installing : libidn [ 3/16]
Installing : curl [ 4/16]
Installing : apr [ 5/16]
Installing : gmp [ 6/16]
Installing : apr-util [ 7/16]
Installing : httpd [ 8/16]
Installing : php-mbstring [ 9/16]
Installing : php-pdo [10/16]
Installing : php-mysql [11/16]
Installing : aspell-en [12/16]
Installing : aspell [13/16]
Installing : php-cli [14/16]
Installing : php [15/16]
Installing : phpMyAdmin [16/16]

Installed: phpMyAdmin.noarch 0:2.11.9.5-1.el5
Dependency Installed: apr.i386 0:1.2.7-11 apr-util.i386 0:1.2.7-7.el5_3.1 aspell.i386 12:0.60.3-7.1 aspell-en.i386 50:6.0-2.1 curl.i386 0:7.15.5-2.1.el5_3.4 gmp.i386 0:4.1.4-10.el5 httpd.i386 0:2.2.3-22.el5.centos.1 libidn.i386 0:0.6.5-1.1 mailcap.noarch 0:2.1.23-1.fc6 php.i386 0:5.1.6-23.2.el5_3 php-cli.i386 0:5.1.6-23.2.el5_3 php-common.i386 0:5.1.6-23.2.el5_3 php-mbstring.i386 0:5.1.6-23.2.el5_3 php-mysql.i386 0:5.1.6-23.2.el5_3 php-pdo.i386 0:5.1.6-23.2.el5_3
Complete!
[root@cachak-dev ~]#


diatas sebenarnya banyak yang harusnya gak ikut keinstall apabila sudah ke install, misalnya httpd
setelah itu jangan lupa install php-mcrypt

[root@cachak-dev ~]# yum install php-mcrypt
Loaded plugins: fastestmirror
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package php-mcrypt.i386 0:5.1.6-5.el5 set to be updated
--> Processing Dependency: libmcrypt.so.4 for package: php-mcrypt
--> Running transaction check
---> Package libmcrypt.i386 0:2.5.7-5.el5 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=================================================================================
Package Arch Version Repository Size
=================================================================================
Installing:
php-mcrypt i386 5.1.6-5.el5 epel 16 k
Installing for dependencies:
libmcrypt i386 2.5.7-5.el5 epel 124 k

Transaction Summary
=================================================================================
Install 2 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 140 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): php-mcrypt-5.1.6-5.el5.i386.rpm | 16 kB 00:00
(2/2): libmcrypt-2.5.7-5.el5.i386.rpm | 124 kB 00:01
---------------------------------------------------------------------------------
Total 62 kB/s | 140 kB 00:02
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : libmcrypt [1/2]
Installing : php-mcrypt [2/2]

Installed: php-mcrypt.i386 0:5.1.6-5.el5
Dependency Installed: libmcrypt.i386 0:2.5.7-5.el5
Complete!
[root@cachak-dev ~]#


2.Konfigurasi phpMyAdmin
Lakukan edit file /etc/httpd/conf.d/phpMyAdmin.conf
dari :

# phpMyAdmin - Web based MySQL browser written in php
#
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL

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

order deny,allow
deny from all
allow from 127.0.0.1

# This directory does not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#

Order Deny,Allow
Deny from All
Allow from None


# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#
#
# SecRuleInheritance Off
#

#


Menjadi

[root@cachak-dev ~]# cat /etc/httpd/conf.d/phpMyAdmin.conf
# phpMyAdmin - Web based MySQL browser written in php
#
# Allows only localhost by default
#
# But allowing phpMyAdmin to anyone other than localhost should be considered
# dangerous unless properly secured by SSL

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

order deny,allow
#deny from all
#allow from 127.0.0.1

# This directory does not require access over HTTP - taken from the original
# phpMyAdmin upstream tarball
#

Order Deny,Allow
Deny from All
Allow from None


# This configuration prevents mod_security at phpMyAdmin directories from
# filtering SQL etc. This may break your mod_security implementation.
#
#
#
# SecRuleInheritance Off
#

#

[root@cachak-dev ~]#


disini saya hanya ngedit bagian
#deny from all
#allow from 127.0.0.1

artinya diallowed dari semua ip, untuk allowed dari ip tertentu, misalnya ip 202.xxx.xxx.10 maka menjadi
deny from all
allow from 202.xxx.xxx.10

setelah itu restart httpd

[root@cachak-dev ~]# /etc/init.d/httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
[root@cachak-dev ~]#


setelah itu setting phpMyAdmin.conf di /etc/phpMyAdmin/config.inc.php
dibawah $i = 0 tambahkan $cfg['blowfish_secret'] = ‘H1PvIjBDbw’; sehingga menjadi :
$i = 0;
$cfg['blowfish_secret'] = 'H1PvIjBDbw';

terus rubah
$cfg['Servers'][$i]['auth_type'] = 'http';
menjadi :
$cfg['Servers'][$i]['auth_type'] = 'cookie';
setelah itu save
setelah itu tinggal http://host/phpMyAdmin




Silahkan mencoba yaw....

Posted By Maychit.....???


0 komentar: