filmov
tv
01- Postgresql 16 installation with offline yum repo
Показать описание
Postgresql 16 installation with offline yum repo
-- ===================== 1. Download =====================
download all from below inclusing repodata with its content.
-- ===================== 2. Create Repo =====================
create directory repopostgres and copy downloaded rpms to this directory
mkdir /repopostgres
[repopostgres]
name=repopostgres
enabled=1
gpgcheck=0
then save and execute below commands
yum clean all
yum repolist all
should show as below
repo id repo name status
repopostgres repopostgres enabled
-- ===================== 3. Install Postgres =====================
yum install postgresql16-server -y
psql -V
/usr/pgsql-16/bin/postgresql-16-setup initdb
systemctl start postgresql-16
systemctl enable postgresql-16
systemctl status postgresql-16
su - postgres
psql
exit
passwd postgres
su - postgres
Password:
$ su – postgres
$ psql -c "ALTER USER postgres WITH PASSWORD 'Oracle_123';"
psql
psql (16devel)
Type "help" for help.
postgres=# \q
To enable PostgreSQL remote connection on Redhat, you need to open the following file.
Under CONNECTIONS AND AUTHENTICATION section you will find the following commented parameter.
#listen_addresses = 'localhost'
Replace it with the following and save the file. With this configuration, we are enabling PostgreSQL server connections to accept connections from all IP addresses.
listen_addresses = '*'
systemctl restart postgresql-16
Add the following line to the end of the file.
host all all 0.0.0.0/0 md5
systemctl restart postgresql-16
cd /var/lib/pgsql/16/data/
database folder
netstat -tlnp
-- ===================== 1. Download =====================
download all from below inclusing repodata with its content.
-- ===================== 2. Create Repo =====================
create directory repopostgres and copy downloaded rpms to this directory
mkdir /repopostgres
[repopostgres]
name=repopostgres
enabled=1
gpgcheck=0
then save and execute below commands
yum clean all
yum repolist all
should show as below
repo id repo name status
repopostgres repopostgres enabled
-- ===================== 3. Install Postgres =====================
yum install postgresql16-server -y
psql -V
/usr/pgsql-16/bin/postgresql-16-setup initdb
systemctl start postgresql-16
systemctl enable postgresql-16
systemctl status postgresql-16
su - postgres
psql
exit
passwd postgres
su - postgres
Password:
$ su – postgres
$ psql -c "ALTER USER postgres WITH PASSWORD 'Oracle_123';"
psql
psql (16devel)
Type "help" for help.
postgres=# \q
To enable PostgreSQL remote connection on Redhat, you need to open the following file.
Under CONNECTIONS AND AUTHENTICATION section you will find the following commented parameter.
#listen_addresses = 'localhost'
Replace it with the following and save the file. With this configuration, we are enabling PostgreSQL server connections to accept connections from all IP addresses.
listen_addresses = '*'
systemctl restart postgresql-16
Add the following line to the end of the file.
host all all 0.0.0.0/0 md5
systemctl restart postgresql-16
cd /var/lib/pgsql/16/data/
database folder
netstat -tlnp