Skip to main content

Posts

Showing posts with the label Installation. Linux

Installing,Starting,Stopping PostgreSQL Server on Linux OS

In this post, we will see how to Install and Run PostgreSQL on Linux machines. There are three ways to installation procedures to download the software. 1. Binary Installation 2. Yum Installation 3. RPM Installation In this post, will see how to install PostgreSQL using Binary installation. 1. Download the binaries from the official website. $ wget https://get.enterprisedb.com/postgresql/postgresql-9.6.2-4-linux-x64-binaries.tar.gz 2. Untar the downloaded binaries. $ tar -xvzf postgresql-9.6.2-4-linux-x64-binaries.tar.gz 3. Create appropriate data directories and permissions with root user to run PostgreSQL Server. # mkdir -p /var/lib/pgsql/data # chown -R psql /var/lib/pgsql/data # su psql 4. Now change the directory path to the downloaded software path $ cd /home/psql/softwares/pgsql 5. Initialize the data directories required for PostgreSQL to run, there are two ways to initialize the directories. $ initdb -D /usr/local/pgsql/data Alternatively, we can also