IMPORTANT:The steps in this section are optimized for installing PostgreSQL on SUSE Linux Enterprise Server (SLES) 12 or 15.
For information regarding the installation of PostgreSQL on other versions of SLES or other flavors of Linux, see the PostgreSQL and the SUSE documentation on the web.
Ensure you have access to your operating system installation media.
In YaST, click Software > Software Management.
In the Search field, type postgresql, then click Search.
Select the following packages:
postgresql10
libecpg6
postgresql-jdbc (if available)
The client packages, if not automatically added with the server packages.
Click Accept.
If needed, click Continue to resolve dependencies.
Click Continue to acknowledge package support status.
PostgreSQL is then installed from the SLES media.
Click Finish.
In YaST, click System > Services Manager.
Scroll to and select postgresql, then click Enable/Disable > Start/Stop > OK.
After the configuration is updated, close YaST and open a terminal prompt.
Set a password for the database administrator (postgres system user) by entering the following commands:
su - postgres psql \password postgres specify-a-password repeat-the-password \q exit
BASIC VIBE INSTALLATION SUMMARY SHEET |
---|
Under Database Credentials on the Single-server Installation Planning Worksheet, record the postgres administrator password. If you want to use a password other than postgres you must modify the postgresql-create-empty-database.sql file. See the PostgreSQL documentation on the web for help. |
Continue with Configuring the Socket Connection Method.
As the root user, browse to /var/lib/pgsql/data.
Edit the pg_hba.conf file and change the following local and host lines to specify md5 encryption, as follows:
local all all md5 host all all 127.0.0.1/32 md5 host all all ::1/128 md5 host all all 0.0.0.0/0 md5
For more information about the pg_hba.conf file, see the PostgreSQL documentation on the web.
Save the file.
Edit the postgresql.conf file.
Uncomment the listen_addresses line by removing the pound sign (#).
Change ‘localhost’ to ‘*’.
Save and close the file.
In YaST, click System > Services Manager.
Scroll to and select postgresql, then click Start/Stop > OK to stop PostgreSQL.
Repeat from Step 8 to restart PostgreSQL, then close YaST.
Continue with Securing PostgreSQL and Vibe Communications
If you want to administer PostgreSQL through a GUI interface, you can download tools from:
Community Guide to PostgreSQL GUI Tools
For more information about PostgreSQL, see: