2014年1月5日 星期日

[研究] PostgreSQL 9.3.2 (yum) + PgAdminIII 1.18.1(yum)安裝 (CentOS 6.5 x64)

[研究] PostgreSQL 9.3.2 (yum) + PgAdminIII 1.18.1(yum)安裝 (CentOS 6.5 x64)

2014-01-05

參考
http://www.postgresql.org/download/linux/redhat/

安裝 PostgreSQL + PgAdmin

yum -y install http://yum.postgresql.org/9.3/redhat/rhel-6-x86_64/pgdg-centos93-9.3-1.noarch.rpm
yum -y install postgresql93-server postgresql93-contrib pgadmin3_93
service postgresql-9.3 initdb
service postgresql-9.3 start
chkconfig postgresql-9.3 on

檢查安裝設定了甚麼

[root@localhost ~]# cat /etc/passwd
...(略)
postgres:x:26:26:PostgreSQL Server:/var/lib/pgsql:/bin/bash

[root@localhost ~]# ps aux | grep postmaster
postgres  3243  0.0  1.4 324192 14608 ?        S    17:01   0:00 /usr/pgsql-9.3/bin/postmaster -p 5432 -D /var/lib/pgsql/9.3/data
root      3258  0.0  0.0 103248   872 pts/1    S+   17:02   0:00 grep postmaster
[root@localhost ~]#

[root@localhost ~]# find / -name postgres*
/selinux/booleans/postgresql_can_rsync
/usr/pgsql-9.3/bin/postgres
/usr/pgsql-9.3/lib/postgres_fdw.so
/usr/pgsql-9.3/share/postgres.shdescription
/usr/pgsql-9.3/share/postgresql-9.3-libs.conf
/usr/pgsql-9.3/share/extension/postgres_fdw.control
/usr/pgsql-9.3/share/extension/postgres_fdw--1.0.sql
/usr/pgsql-9.3/share/postgres.description
/usr/pgsql-9.3/share/locale/fr/LC_MESSAGES/postgres-9.3.mo
/usr/pgsql-9.3/share/locale/it/LC_MESSAGES/postgres-9.3.mo
/usr/pgsql-9.3/share/locale/zh_CN/LC_MESSAGES/postgres-9.3.mo
/usr/pgsql-9.3/share/locale/ja/LC_MESSAGES/postgres-9.3.mo
/usr/pgsql-9.3/share/locale/de/LC_MESSAGES/postgres-9.3.mo
/usr/pgsql-9.3/share/locale/es/LC_MESSAGES/postgres-9.3.mo
/usr/pgsql-9.3/share/locale/pt_BR/LC_MESSAGES/postgres-9.3.mo
/usr/pgsql-9.3/share/locale/pl/LC_MESSAGES/postgres-9.3.mo
/usr/pgsql-9.3/share/locale/ru/LC_MESSAGES/postgres-9.3.mo
/usr/pgsql-9.3/share/locale/zh_TW/LC_MESSAGES/postgres-9.3.mo
/usr/pgsql-9.3/share/man/man1/postgres.1
/usr/pgsql-9.3/share/postgresql.conf.sample
/usr/pgsql-9.3/share/postgres.bki
/usr/share/selinux/targeted/postgresql.pp.bz2
/usr/share/selinux/devel/include/services/postgresql.if
/usr/share/doc/postgresql-libs-8.4.18
/usr/share/doc/postgresql93-9.3.2
/etc/selinux/targeted/modules/active/modules/postgresql.pp
/etc/rc.d/init.d/postgresql-9.3
/etc/pam.d/postgresql93
/etc/ld.so.conf.d/postgresql-pgdg-libs.conf
/var/run/postgresql-9.3.pid
/var/lib/pgsql/9.3/data/postgresql.conf
/var/lib/pgsql/9.3/data/pg_log/postgresql-Sun.log
/var/lock/subsys/postgresql-9.3
/var/cache/yum/x86_64/6/pgdg93/postgresqldbserver-9.3.xml.gz
[root@localhost ~]#

[root@localhost ~]# find / -name postgres* | grep conf
/usr/pgsql-9.3/share/postgresql-9.3-libs.conf
/usr/pgsql-9.3/share/postgresql.conf.sample
/etc/ld.so.conf.d/postgresql-pgdg-libs.conf
/var/lib/pgsql/9.3/data/postgresql.conf
[root@localhost ~]#

[root@localhost ~]# ls /etc/init.d
abrt-ccpp         firstboot     messagebus      quota_nld    snmptrapd
abrtd             functions     netconsole      rdisc        spice-vdagentd
abrt-oops         haldaemon     netfs           restorecond  sshd
acpid             halt          network         rngd         sssd
atd               htcacheclean  NetworkManager  rpcbind      sysstat
auditd            httpd         nfs             rpcgssd      udev-post
autofs            ip6tables     nfslock         rpcidmapd    wdaemon
blk-availability  iptables      ntpd            rpcsvcgssd   winbind
bluetooth         irqbalance    ntpdate         rsyslog      wpa_supplicant
certmonger        kdump         oddjobd         sandbox      ypbind
cpuspeed          killall       portreserve     saslauthd
crond             lvm2-lvmetad  postfix         single
cups              lvm2-monitor  postgresql-9.3  smartd
dnsmasq           mdmonitor     psacct          snmpd
[root@localhost ~]#


[root@localhost ~]# find / -name pgsql
/etc/sysconfig/pgsql
/var/log/pgsql
/var/lib/pgsql
[root@localhost ~]#

[root@localhost ~]# find / -name psql
/usr/pgsql-9.3/bin/psql
/usr/bin/psql
[root@localhost ~]# ls -al /usr/bin/psql
lrwxrwxrwx. 1 root root 28 Jan  5 17:01 /usr/bin/psql -> /etc/alternatives/pgsql-psql
[root@localhost ~]# ls -al /etc/alternatives/pgsql-psql
lrwxrwxrwx. 1 root root 23 Jan  5 17:01 /etc/alternatives/pgsql-psql -> /usr/pgsql-9.3/bin/psql
[root@localhost ~]#


測試:建立帳號,啟動 PgAdmin

[root@localhost ~]# su - postgres
-bash-4.1$ createuser user3
-bash-4.1$ exit
logout
[root@localhost ~]#

在 X-Window 下執行 pgadmin3 (X-Window 解析度至少要 1024x768,否則按鈕會看不到)







(完)

[研究] PostgreSQL 9.3.2 (yum) + PgAdminIII 1.18.1(yum)安裝 (CentOS 6.5 x64)
http://shaurong.blogspot.com/2014/01/postgresql-932-yum-pgadminiii-1181yum.html

[研究] PostgreSQL 9.3.2 (tgz) + PgAdminIII 1.18.1(tgz)安裝 (CentOS 6.5 x64)
http://shaurong.blogspot.com/2014/01/postgresql-932-tgz-pgadminiii-1181tgz.html

[研究] PostgreSQL 9.2(yum) + PgAdminIII v1.16.0(yum) 安裝 (CentOS 6.5 x64)
http://shaurong.blogspot.com/2014/01/postgresql-92yum-pgadminiii-v1160yum.html

[研究] PostgreSQL 8.4.18(yum) + PgAdminIII v1.16.0(yum) 安裝 (CentOS 6.5 x64)
http://shaurong.blogspot.com/2014/01/postgresql-8.html

[研究] PostgreSQL 9.3.2 安裝(tgz)(CentOS 6.5 x64)
http://shaurong.blogspot.tw/2014/01/postgresql-932-tgzcentos-65-x64.html

[研究] PostgreSQL 9.2 (yum) 安裝 (CentOS 6.5 x64)
http://shaurong.blogspot.tw/2013/12/postgresql-92-yum-centos-65-x64.html

[研究] PgAdminIII v1.12.2 安裝 (rpm)(CentOS 6.0 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=20415

[研究] PgAdminIII v1.8.4 安裝 (rpm)(CentOS 5.6 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=20379

[研究] PostgreSQL 8.4.2-1 binary文字模式安裝 (CentOS 5.4 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=17910

[研究] PostgreSQL 8.4.2-1 binary圖形模式安裝 (CentOS 5.4 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=17911

[研究] PostgreSQL 9.0.2-1 binary版文字模式安裝 (CentOS 5.5 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=19412

[研究] PostgreSQL 9.0.2-1 binary版圖形模式安裝 (CentOS 5.5 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=19413

[研究] PostgreSQL 9.0.2-1 binary圖形版模式安裝 (Fedora 14 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=19414

[研究] PostgreSQL 9.0.2-1 安裝(tgz)(CentOS 5.5 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=19411

[研究] PostgreSQL 9.0.4-1 binary版圖形模式安裝 (CentOS 6.0 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=20251

[研究] postgresql-8.4.2.tar.gz 安裝 (CentOS 5.4 x86)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=17912

[研究] 單機架設 PostgreSQL Cluster (pgpool-II)(CentOS 5.4)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=17906

[研究] 雙機 PostgreSQL 同步(Replication)(tar.gz)(pgpool-II)(CentOS
http://forum.icst.org.tw/phpbb/viewtopic.php?t=17980

[研究] 雙機 PostgreSQL 同步(Replication)(yum)(pgpool-II)(CentOS5)
http://forum.icst.org.tw/phpbb/viewtopic.php?t=17907

沒有留言:

張貼留言