[root@localhost ~]# yum -y update
[root@localhost ~]# rpm -Uvh http://yum.postgresql.org/9.1/redhat/rhel-6.3-x86_6
4/pgdg-centos91-9.1-4.noarch.rpm
[root@localhost ~]# yum install postgresql91-server postgresql91-contrib
[root@localhost ~]# yum -y update
[root@localhost ~]# /etc/init.d/postgresql-9.1 initdb
[root@localhost ~]# service postgresql-9.1 restart
[root@localhost ~]# su – postgres
Crear password
Creando un usuario como súper usuario con su respectivo password
postgres=#CREATE USER ctic WITH SUPERUSER LOGIN PASSWORD 'Postprueba15';
CREATE ROLE
[root@localhost ~]# yum install epel-release
yum -y install phpPgAdmin php-pgsql httpd php
vi /etc/httpd/conf.d/phpPgAdmin.conf
[root@localhost ~]# vi /etc/phpPgAdmin/config.inc.php
Cambiamos a
Configure postgres
[root@localhost ~]# vi /var/lib/pgsql/9.1/data/pg_hba.conf
Modificamos
[root@localhost ~]# vi /var/lib/pgsql/9.1/data/postgresql.conf
iptables -I INPUT 5 -i eth0 -p tcp --dport 5432 -m state --state NEW,ESTABLISHED -j
ACCEPT
iptables -I INPUT 5 -i eth0 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j
ACCEPT
service iptables save

Config postgres in linux

  • 1.
    [root@localhost ~]# yum-y update [root@localhost ~]# rpm -Uvh http://yum.postgresql.org/9.1/redhat/rhel-6.3-x86_6 4/pgdg-centos91-9.1-4.noarch.rpm [root@localhost ~]# yum install postgresql91-server postgresql91-contrib [root@localhost ~]# yum -y update [root@localhost ~]# /etc/init.d/postgresql-9.1 initdb [root@localhost ~]# service postgresql-9.1 restart [root@localhost ~]# su – postgres Crear password Creando un usuario como súper usuario con su respectivo password
  • 2.
    postgres=#CREATE USER cticWITH SUPERUSER LOGIN PASSWORD 'Postprueba15'; CREATE ROLE [root@localhost ~]# yum install epel-release yum -y install phpPgAdmin php-pgsql httpd php vi /etc/httpd/conf.d/phpPgAdmin.conf [root@localhost ~]# vi /etc/phpPgAdmin/config.inc.php
  • 3.
    Cambiamos a Configure postgres [root@localhost~]# vi /var/lib/pgsql/9.1/data/pg_hba.conf Modificamos [root@localhost ~]# vi /var/lib/pgsql/9.1/data/postgresql.conf
  • 4.
    iptables -I INPUT5 -i eth0 -p tcp --dport 5432 -m state --state NEW,ESTABLISHED -j ACCEPT iptables -I INPUT 5 -i eth0 -p tcp --dport 80 -m state --state NEW,ESTABLISHED -j ACCEPT service iptables save