Zhixian's Tech Blog

2015-01-03

Installing Postgresql using installer from EnterpriseDB on Ubuntu

Filed under: computing — Tags: , , , , , , , — Zhixian @ 17:23:01 pm

This blog post describes installing Postgresql 9.4 and pgAdmin III 1.20.0 using the installer provided by EnterpriseDB.

Background (Or lessons learnt)

I recently installed a copy of Postgresql on Ubuntu based on instructions from the official web site (http://www.postgresql.org/download/linux/ubuntu/).
Unfortunately, the copy of pgAdmin III (a graphical UI to manage Postgresql databases) is outdated.
The version of Postgresql installed was 9.4 but the version of pgAdmin installed was 1.18.1 which has warnings issued when I connect to the database.

pgAdmin III_168

So I decide to do the next best thing mentioned in the page – use the installer from EnterpriseDB in hopes that they have packaged the latest copy of pgAdmin III.

PostgreSQL: Linux downloads (Ubuntu) - Google Chrome_171

Assumptions

I assumed you know how to start a terminal session and execute commands in it.

Summary of Steps

  1. Download Installer
  2. Making Installer executable
  3. Execute the Installer

Download Installer

Clicking the download link in the previous screen shot will bring me to the EnterpriseDB’s Postgresql install download page (http://www.enterprisedb.com/products-services-training/pgdownload).

Because I’m running the 64-bit version of Ubuntu, I clicked on the “Linux x86-64” button to download the installer.

Download PostgreSQL | EnterpriseDB - Google Chrome_172

After you clicked the button, you will be brought to a thank-you page.
Wait for the download to complete.

Thank you for downloading PostgreSQL! | EnterpriseDB - Google Chrome_173

After the download has complete, your download folder should look like the below.

Downloads_174

Making Installer executable

By default, the downloaded file is not executable by double-clicking it.
Attempts to do so, will result in the below dialog:

Untitled window_175

Click on the No button to close the dialog.

To make the downloaded file executable:

1. Start a terminal session and navigate to folder where you saved the downloaded installer.

zhixian@SARA: ~-Downloads_176

2. Run the following command. Replace the text in bold if necessary if you are not using Ubuntu 64-bit.

chmod +x ./postgresql-9.4.0-1-linux-x64.run

zhixian@SARA: ~-Downloads_177

Execute the installer

Now you can execute the installer. From the terminal session, run the following command start the installation wizard:

sudo ./postgresql-9.4.0-1-linux-x64.run

zhixian@SARA: ~-Downloads_180

You will see the welcome screen of the installation wizard.
Click on Next button to proceed to the next step of the installation wizard.

Setup (as superuser)_181

The installation wizard should prompt you for the location to install Postgresql.
Click on Next button to accept the default and proceed to the next step of the installation wizard.

Setup (as superuser)_182

The installation wizard will now prompt you for the directory to store data for Postgresql.
Click on Next button to accept the default and proceed to the next step of the installation wizard.

Setup (as superuser)_183

The installation wizard will now prompt you for a password to the postgres account.
This account is use for starting Postgresql.
Enter your desired password for this account.
Click on Next button to accept the default and proceed to the next step of the installation wizard.

Setup (as superuser)_184

The installation process will then prompt you for a port number that Postgresql will use to host the database server.
Click on Next button to accept the default and proceed to the next step of the installation wizard.

Note The default port that Postgresql use is 5432. However, this port is all in used by the first instance of Postgresql that I installed previously the installation wizard picked the next available port 5433. I accepted the defaults in the screen shot below planning to uninstall the first instance of Postgres and then reconfigure this instance of Postgresql to use port 5432.

Setup (as superuser)_185

The installation wizard will now prompt you for the locale that your database will use.
Click on Next button to accept the default and proceed to the next step of the installation wizard.

Setup (as superuser)_186

The installation will now declare that it has all the information need to install Postgresql.
Click on Next button to accept the default and proceed with installing Postgresql.

Setup (as superuser)_187

The installation wizard will start to install Postgresql.
Wait for the installation process to complete.

Setup (as superuser)_188

After the installation process has complete, you will see the below screen.
Click on Finish button to exit the installer.

Note If you not need to download and install additional software, uncheck the option to start Stack Builder at exit.

Setup (as superuser)_189

After you exit the installation wizard, you should be able to see the Postgresql that you just installed from the desktop menu.

Workspace 1_195

Note If you do not see the menu item, you may need to re-login or restart your system.

The pgadmin installed should be version 1.20 and should work fine with Postgresql 9.4.

Advertisements

4 Comments »

  1. hi,
    I am still not able to get the wizard. Getting error as cannot execute the binary file, even after giving +x permission to the .run file.

    Comment by ijaz — 2017-03-03 @ 23:47:03 pm

    • Sorry for the late reply. Can I know what is the error you received and which version of linux are you using?

      Comment by Zhixian — 2017-03-09 @ 20:47:03 pm

      • Hi,
        Thanks for your reply. The error message is you cannot execute a binary file. Linux is red hat 5.

        Comment by Ijaz — 2017-03-09 @ 20:54:03 pm

      • Sorry. I’m not too familiar with Red Hat Linux. I did a quick search on Google, and it suggests that:
        1. You download a file that is of a different architecture than your machine. For example, if your Red Hat is an 32-bit operating system, you need to download and the corresponding 32-bit installer. If you downloaded a 64-bit installer and attempt to run it on a 32-bit operating system, it may give you the error that you mentioned.

        Comment by Zhixian — 2017-03-10 @ 22:30:03 pm


RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Blog at WordPress.com.

%d bloggers like this: