data-blog
  • Main Page
  • Blog
    • Using Zookeeper for your Flume configurations
  • Apache Spark
    • Spark Streaming in Action for Click-Stream
    • Querying your Database Data with JdbcRDDs
    • Enhancing your Click-Stream with CRM database
    • Migrating Data From Couchbase to Postgres using Apache Spark
  • PostgreSQL
    • Installing unattended Postgres
    • PostgreSQL Logging
Powered by GitBook
On this page
  • Download Postgresql
  • Install Postgresql Software
  • Create Database

Was this helpful?

  1. PostgreSQL

Installing unattended Postgres

PreviousMigrating Data From Couchbase to Postgres using Apache SparkNextPostgreSQL Logging

Last updated 6 years ago

Was this helpful?

Installing Postgres needs to compile the sources from scratch if you do not prefer a pre-compiled installer such as or . I generally prefer to use enterprise-db installer which I believe is one of the most complete installer for Postgres Database.

Download Postgresql

Simply go to the enterprise-db and select the environment and the version for your compiled Postgres installer.

Install Postgresql Software

After the download completes, copy the downloaded file to your remote OS, or on the server you want to do the installation. Unzip the files and start the installer with the following parameters.

./postgresql-9.6.11-1-linux-x64.run \
--mode unattended \
--prefix /home/hadoop/postgres \
--datadir /home/hadoop/postgres/data \
--serviceaccount postgres \
--superaccount postgres \
--superpassword welcome1 \
--extract-only 1 \
--serverport 5432

This unattended mode does not need an X Window manager for the installing procedure and silently installs Postgres database. As you can also be aware of the --extract-only option is set to true. I usually prefer to install the binaries and then create the databases with the createdb option after running the initdb for initializing the data directory as follows.

Create Database

initdb -D <data directory>

createdb -O <role name> <database name>

enterprise-db
big-sql
download site