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 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
- 4. 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