PostgreSQL 11.4 is now available for Windows and Mac OS X but it still not available for Linux (when this article is written). The latest version of PostgreSQL 10.6 is available for Linux system. This tutorial will guide you to install PostgreSQL 10 on Ubuntu 19.04. I am using PostgreSQL installer by EnterpriseDB. This includes a GUI installation wizard that is very convenient to use.
Steps to Install PostgreSQL 10 on Ubuntu 19.04
Step 1. Download PostgreSQL Installer
Step 2. Make Executable
Before we can install it, we need to make the file executable. To do this, simply right-click the .run file and then go to Permission tab and enable the Allow execution file as program.
Step 2. Run the Installer
Now we are ready to start the installation process. You have to be a root user to execute this installer. I would prefer run the following command as root in Terminal
Then, the installation window will open up. On the first welcome page, click Next to continue.
Next, specify the installation directory. You can leave the default value if you want.
Now select which components to install. I would check them all since I want all of them are installed on my Ubuntu 19.04.
In the following step you will be asked to type the data directory for PostgreSQL. Change it accordingly or use the default one.
Create a new password for postgres user
Configure PostgreSQL port selection. By default, PostgreSQL will attempt to use the port 5432. You can change the port at this step if you want different port assigned to PostgreSQL Server.
Next, select your locale.
At the following step you will see the installation summary.
Hit Next and the actual installation will start.
Wait until the process is completed.
Connect to PostgreSQL
If you follow my tutorial above, you should also have PgAdmin software installed. Use postgres as user name and password you specify during installation.
Installing software in Ubuntu is getting easier. You’ve just learned how to install PostgreSQL on Ubuntu 19.04 using EnterpriseDb installer. It is very convenient.