PostgreSQL 9.4 - PgAdmin 3 - phpPgAdmin en CentOS 7/6.5/6.4
Introducción
PostgreSQL es un poderoso, sistema de base de datos relacional y de objetos en código abierto. Corre en la mayorpia de sistemas operativos., incluyendo Linux, UNIX (AIX, BSD, HP-UX, SGI IRIX, Mac OS, Solaris, Tru64), y sistemas Windows.
En este tutorial, veremos como instalar PostgreSQL 9.4 sobre un servidor CentOS 7/6.5/6.4.
Go to the PostgreSQL repository download page, and add the PostgreSQL 9.4 repository depending upon your server architecture.
For CentOS 6.x 32bit:
rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-6-i386/pgdg-centos94-9.4-1.noarch.rpm
For CentOS 6.x 64bit:
rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-6-x86_64/pgdg-centos94-9.4-1.noarch.rpm
For CentOS 7 64bit:
rpm -Uvh http://yum.postgresql.org/9.4/redhat/rhel-7-x86_64/pgdg-centos94-9.4-1.noarch.rpm
Update the repository list using command:
yum update
Now, Install postgresql with the following command:
yum install postgresql94-server postgresql94-contrib
Initialize postgresql database using following command:
On CentOS 6.x systems:
service postgresql-9.4 initdb
On CentOS 7 systems:
/usr/pgsql-9.4/bin/postgresql94-setup initdb
Then, start postgresql service and make it to start automatically on every reboot.
On CentOS 6.x systems:
service postgresql-9.4 start chkconfig postgresql-9.4 on
On CentOS 7 systems:
systemctl enable postgresql-9.4 systemctl start postgresql-9.4Access PostgreSQL command prompt
The default database name and database user are “postgres”. Switch to postgres user to perform postgresql related operations:
su - postgres
To login to postgresql, enter the command:
psql
Sample Output:
psql (9.4.0) Type "help" for help. postgres=#
To exit from posgresql prompt, type \q following by quit to return back to the Terminal.
Set “postgres” user passwordLogin to postgresql prompt,
su - postgres psql
… and set postgres password with following command:
postgres=# <strong>\password postgres</strong> Enter new password: Enter it again: postgres=# \q
To install PostgreSQL Adminpack, enter the command in postgresql prompt:
postgres=# <strong>CREATE EXTENSION adminpack;</strong> CREATE EXTENSION<br /><br />
www.unixmen.com/postgresql-9-4-released-install-centos-7/
www.webcorecloud.com/blog/2015/02/03/install-postgresql-94-centos-6x/
0 comentarios