Installing EDB Postgres Advanced Server on RHEL 7 or OL 7 x86_64 v15
Prerequisites
Before you begin the installation process:
Set up the EDB repository
Setting up the repository is a one-time task. If you have already set up your repository, you don't need to perform this step.
To determine if your repository exists, enter this command:
dnf repolist | grep enterprisedb
If no output is generated, the repository isn't installed.
To set up the EDB repository:
Go to EDB repositories.
Select the button that provides access to the EDB repository.
Select the platform and software that you want to download.
Follow the instructions for setting up the EDB repository.
Install the EPEL repository
Enable additional repositories to resolve dependencies
Install the package
Where <xx>
is the version of the EDB Postgres Advanced Server you are installing. For example, if you are installing version 15, the package name would be edb-as15-server
.
To install an individual component:
Where package_name
can be any of the available packages from the available package list.
Installing the server package creates an operating system user named enterprisedb. The user is assigned a user ID (UID) and a group ID (GID). The user has no default password. Use the passwd
command to assign a password for the user. The default shell for the user is bash
and the user's home directory is /var/lib/edb/as15
.
Initial configuration
This section steps you through getting started with your cluster including logging in, ensuring the installation and initial configuration was successful, connecting to your cluster, and creating the user password.
First you need to initialize and start the database cluster. The edb-as-15-setup
script creates a cluster in Oracle-compatible mode with the edb
sample database in the cluster. To create a cluster in Postgres mode, see Initializing the cluster in Postgres mode.
To work in your cluster, login as the enterprisedb user. Connect to the database server using the psql command line client (although you can use a client of your choice with the appropriate connection string).
The server runs with the peer
or ident
permission by default. You can change the authentication method by modifying the pg_hba.conf
file.
Before changing the authentication method, assign a password to the database superuser, enterprisedb. For more information on changing the authentication, see modifying the pg_hba.conf file.
Experiment
Now you are ready to create and connect to a database, create a table, insert data in a table, and view the data from the table.
First let's create a database to hold human resource information named hr
using psql.
Connect to the hr
database inside psql.
Create columns to hold department numbers, unique department names, and locations.
Insert values into the dept
table.
View what is in the table by selecting the values from the table.