Install PostgreSQL on Centos/RedHat/Fedora & Ubuntu
In this we will show you how to install PostgreSQL in centos, RedHat, Fedora & ubuntu. You will see how to Install PostgreSQL on centos is very easy and quick to install and use..
Before installing here is short description about PostgreSQL
PostgreSQL is a powerful, open source object-relational database system. It has more than 15 years of active development and a proven architecture that has earned it a strong reputation for reliability, data integrity, and correctness. It runs on all major operating systems, including Linux, UNIX (AIX, BSD, HP-UX, SGI IRIX, Mac OS X, Solaris, Tru64), and Windows. It is fully ACID compliant, has full support for foreign keys, joins, views, triggers, and stored procedures (in multiple languages). It includes most SQL:2008 data types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and TIMESTAMP. It also supports storage of binary large objects, including pictures, sounds, or video. It has native programming interfaces for C/C++, Java, .Net, Perl, Python, Ruby, Tcl, ODBC, among others, and exceptional documentation.
An enterprise class database, PostgreSQL boasts sophisticated features such as Multi-Version Concurrency Control (MVCC), point in time recovery, tablespaces, asynchronous replication, nested transactions (savepoints), online/hot backups, a sophisticated query planner/optimizer, and write ahead logging for fault tolerance.It supports international character sets, multibyte character encodings, Unicode, and it is locale-aware for sorting, case-sensitivity, and formatting. It is highly scalable both in the sheer quantity of data it can manage and in the number of concurrent users it can accommodate. There are active PostgreSQL systems in production environments that manage in excess of 4 terabytes of data. Some general PostgreSQL limits are included in the table below.
Install Postgresql
In centos/Redhat/Fedora
yum install postgresql-server postgresql-contrib -y
In ubuntu:
apt-get install postgresql-server postgresql-contrib -y
Create a new PostgreSQL database cluster
sudo postgresql-setup initdb
Restart the services of postgresql
In centos/Redhat/Fedora
systemctl start postgresql
systemctl enable postgresql
Read Also: How to install postgresql on mac
In Ubuntu
service postgresql start
chkconfig postgresql on
PostgreSQL installation is done. If you want to use postgreSQL log in postgres account by typing following command
su - postgresql
You can get postgres console by typing
psql
Now use the postgresql as you want to use. To get the help use \h command.
If you have any problem using this tutorial feel free to comment.
Read Also: How to backup postgresql database