Mandriva 2010.0 : Apache – PHP – PostgreSQL – PHPPGADMIN


iseng aja..

Install postgreSQL

[root@srempuan box]# urpmi postgresql-server
In order to satisfy the ‘postgresql8.4-server|postgresql8.3-server|postgresql8.3-server|postgresql8.2-server|postgresql8.2-server|postgresql8.4-server’ dependency, one of the following packages is needed:
1- postgresql8.3-server-8.3.9-1mdv2010.0.i586: The programs needed to create and run a PostgreSQL server (to install)
2- postgresql8.2-server-8.2.15-1mdv2010.0.i586: The programs needed to create and run a PostgreSQL server (to install)
3- postgresql8.4-server-8.4.2-0.1mdv2010.0.i586: The programs needed to create and run a PostgreSQL server (to install)
What is your choice? (1-3) 3
The following package has to be removed for others to be upgraded:
postgresql8.3-8.3.9-1mdv2010.0.i586
(due to conflicts with postgresql-virtual[> 8.3]) (y/N) y
To satisfy dependencies, the following packages are going to be installed:
Package Version Release Arch
(medium “arsipMainUpdate”)
postgresql8.4 8.4.2 0.1mdv2010.0 i586
postgresql8.4-server 8.4.2 0.1mdv2010.0 i586
11MB of additional disk space will be used.
3.5MB of packages will be retrieved.
Proceed with the installation of the 2 packages? (Y/n)

http://telkom.arsip.or.id/mandrivalinux/official/2010.0/i586/media/main/updates/postgresql8.4-8.4.2-0.1mdv2010.0.i586.rpm
http://telkom.arsip.or.id/mandrivalinux/official/2010.0/i586/media/main/updates/postgresql8.4-server-8.4.2-0.1mdv2010.0.i586.rpm
installing postgresql8.4-server-8.4.2-0.1mdv2010.0.i586.rpm postgresql8.4-8.4.2-0.1mdv2010.0.i586.rpm from /var/cache/urpmi/rpms
Preparing… ##############################################################################################################################################
1/2: postgresql8.4 ##############################################################################################################################################
2/2: postgresql8.4-server ##############################################################################################################################################
removing package postgresql8.3-8.3.9-1mdv2010.0.i586
———————————————————————-
More information on package postgresql8.4-server-8.4.2-0.1mdv2010.0.i586
You just installed or update postgresql server.
You can found important informations about mandriva postgresql rpms and database
management in:

/usr/share/doc/postgresql8.4-server/postgresql.mdv.releasenote

Please, read it.

———————————————————————-
[root@srempuan box]#

Trus…

Edit file /var/lib/pgsql/data/pg_hba.conf

[root@srempuan box]# nano /var/lib/pgsql/data/pg_hba.conf

# TYPE DATABASE USER CIDR-ADDRESS METHOD

# “local” is for Unix domain socket connections only
local all all password
# IPv4 local connections:
host all all 127.0.0.1/32 password
# IPv6 local connections:
host all all ::1/128 password

kemudian restart server postgreSQL nya

[root@srempuan box]# /etc/init.d/postgresql restart
Stopping postgresql service: [ OK ]
Starting postgresql service: [ OK ]
[root@srempuan box]#

Untuk mempermudah pengelolaan database postgreSQL saya menggunakan tool phppgadmin, install dengan perintah

[root@srempuan box]# urpmi phppgadmin
The following package has to be removed for others to be upgraded:
libpq5-8.2.14-1mdv2010.0.i586
(due to conflicts with libpq8.4_5-8.4.2-0.1mdv2010.0.i586) (y/N) y
To satisfy dependencies, the following packages are going to be installed:
Package Version Release Arch
(medium “arsipContribRilis”)
phppgadmin 4.2.1 3mdv2010.0 noarch
(medium “arsipMainUpdate”)
libpq8.4_5 8.4.2 0.1mdv2010.0 i586
php-pgsql 5.3.1 0.3mdv2010.0 i586
4.1MB of additional disk space will be used.
744KB of packages will be retrieved.
Proceed with the installation of the 3 packages? (Y/n)

http://telkom.arsip.or.id/mandrivalinux/official/2010.0/i586/media/contrib/release/phppgadmin-4.2.1-3mdv2010.0.noarch.rpm
http://telkom.arsip.or.id/mandrivalinux/official/2010.0/i586/media/main/updates/libpq8.4_5-8.4.2-0.1mdv2010.0.i586.rpm
http://telkom.arsip.or.id/mandrivalinux/official/2010.0/i586/media/main/updates/php-pgsql-5.3.1-0.3mdv2010.0.i586.rpm
installing libpq8.4_5-8.4.2-0.1mdv2010.0.i586.rpm php-pgsql-5.3.1-0.3mdv2010.0.i586.rpm phppgadmin-4.2.1-3mdv2010.0.noarch.rpm from /var/cache/urpmi/rpms
Preparing… ##############################################################################################################################################
1/3: libpq8.4_5 ##############################################################################################################################################
2/3: php-pgsql ##############################################################################################################################################
3/3: phppgadmin ##############################################################################################################################################
removing package libpq5-1:8.2.14-1mdv2010.0.i586
[root@srempuan box]#

Edit file /etc/phppgadmin/config.inc.php

[root@srempuan box]# nano /etc/phppgadmin/config.inc.php

cari dan ganti baris ini

$conf[‘extra_login_security’] = false;

Jalankan apache / httpd web server nya

[root@srempuan box]# /etc/init.d/httpd restart
Shutting down httpd: [ OK ]
Starting httpd: [ OK ]
[root@srempuan box]#

Jalankan postgreSQL nya

[root@srempuan box]# /etc/init.d/postgresql
Usage: /etc/init.d/postgresql {start|stop|status|restart|condrestart|reload|force-reload}
[root@srempuan box]#

[root@srempuan box]# /etc/init.d/postgresql start
Initializing database: [ OK ]
Starting postgresql service: [ OK ]
[root@srempuan box]#

Cek untuk memastikan postgreSQL di port berapa

[root@srempuan box]# netstat -pln |grep 5432
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 27534/postmaster
unix 2 [ ACC ] STREAM LISTENING 53796 27534/postmaster /tmp/.s.PGSQL.5432
[root@srempuan box]#

Akses postgreSQL nya melalui web browser

http://localhost/phppgadmin/

masukkan usernamame : postgres
masukkan password : password

OK, postgreSQL sudah jalan dan siap di gunakan.

One comment

  1. Hi, saya mengundang anda untuk bergabung di http://framework.web.id/

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: