How Do You Install PostgreSQL on an EC2 SUSE (AWS Instance of Linux SUSE)?

Problem scenario
You want to install Postgres on Linux SUSE.   This AWS server is in a security group with the ability to get to the Internet.  How do you install PostgreSQL on it?

Solution
1.  Log into the SUSE server with the default ec2-user.  The default user for AWS SUSE instances used to be root.  But now it is ec2-user.

2.  Run these five commands (taken from https://wiki.postgresql.org/wiki/Zypper_Installation):

zypper addrepo -t YUM http://packages.2ndquadrant.com/postgresql-z-suse/zypper/sles-11sp3-s390x pg

zypper refresh

zypper addrepo -t YUM http://packages.2ndquadrant.com/postgresql-z-suse/zypper/sles-11sp3 pgsrc

zypper refresh

zypper install postgresql94-server

3.  Now you are ready to start the Postgres service.  Run this command:
/sbin/service postgresql start

4.  You are done.  For future knowledge, AWS security group rules have a "PostgreSQL" type that allow connections to servers over port 5432.  If you are configuring a SQL front end from a Windows desktop to your SUSE instance, this rule in your security group is necessary.

Leave a comment

Your email address will not be published. Required fields are marked *