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?

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

zypper addrepo -t YUM pg

zypper refresh

zypper addrepo -t YUM 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 *