Installing Postgres 9.5
Installing Postgres 9.5
Dependencies Resolved
===================================================================================
===================================================================================
==================
Package Arch
Version Repository
Size
===================================================================================
===================================================================================
==================
Installing:
pgdg-redhat-repo noarch
42.0-14 /pgdg-redhat-repo-latest.noarch
11 k
Transaction Summary
===================================================================================
===================================================================================
==================
Install 1 Package
Total size: 11 k
Installed size: 11 k
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : pgdg-redhat-repo-42.0-14.noarch
1/1
Verifying : pgdg-redhat-repo-42.0-14.noarch
1/1
Installed:
pgdg-redhat-repo.noarch 0:42.0-14
Complete!
####################################################################
Dependencies Resolved
===================================================================================
===================================================================================
==================
Package Arch
Version Repository
Size
===================================================================================
===================================================================================
==================
Installing:
postgresql95 x86_64
9.5.25-1PGDG.rhel7 pgdg95
1.4 M
postgresql95-contrib x86_64
9.5.25-1PGDG.rhel7 pgdg95
542 k
postgresql95-libs x86_64
9.5.25-1PGDG.rhel7 pgdg95
230 k
postgresql95-plperl x86_64
9.5.25-1PGDG.rhel7 pgdg95
71 k
postgresql95-plpython x86_64
9.5.25-1PGDG.rhel7 pgdg95
86 k
postgresql95-plpython3 x86_64
9.5.25-1PGDG.rhel7 pgdg95
85 k
postgresql95-server x86_64
9.5.25-1PGDG.rhel7 pgdg95
4.2 M
Transaction Summary
===================================================================================
===================================================================================
==================
Install 7 Packages
Installed:
postgresql95.x86_64 0:9.5.25-1PGDG.rhel7 postgresql95-
contrib.x86_64 0:9.5.25-1PGDG.rhel7 postgresql95-libs.x86_64 0:9.5.25-
1PGDG.rhel7
postgresql95-plperl.x86_64 0:9.5.25-1PGDG.rhel7 postgresql95-
plpython.x86_64 0:9.5.25-1PGDG.rhel7 postgresql95-plpython3.x86_64
0:9.5.25-1PGDG.rhel7
postgresql95-server.x86_64 0:9.5.25-1PGDG.rhel7
Complete!
############################################
postgresql95-libs-9.5.25-1PGDG.rhel7.x86_64
postgresql95-contrib-9.5.25-1PGDG.rhel7.x86_64
postgresql95-plperl-9.5.25-1PGDG.rhel7.x86_64
postgresql95-9.5.25-1PGDG.rhel7.x86_64
postgresql95-plpython-9.5.25-1PGDG.rhel7.x86_64
postgresql95-server-9.5.25-1PGDG.rhel7.x86_64
postgresql95-plpython3-9.5.25-1PGDG.rhel7.x86_64
The files belonging to this database system will be owned by user "postgres".
This user must also own the server process.
######################### I will start the server and create an error log in the
data directory called pgerror-logfile with the -l option and also run the command
in the background with &
/usr/pgsql-9.5/bin/pg_ctl -D /var/lib/pgsql/9.5/data -l
/var/lib/pgsql/9.5/data/pgerror-logfile start &
-bash-4.2$ < 2021-03-15 17:59:41.200 EDT >LOG: redirecting log output to logging
collector process
< 2021-03-15 17:59:41.200 EDT >HINT: Future log output will appear in directory
"pg_log".
https://github.com/ropable/foundation_postgres
cd /opt
http://www.postgresqltutorial.com/postgresql-sample-database/
cd /opt
wget http://www.postgresqltutorial.com/wp-content/uploads/2019/05/dvdrental.zip
unzip dvdrental.zip
ls -ali
su - postgres
createdb dvdrental;
or
-bash-4.2$ psql -l
List of databases
Name | Owner | Encoding | Collate | Ctype | Access privileges
-----------+----------+----------+-------------+-------------
+-----------------------
dvdrental | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
postgres | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
template0 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
+
| | | | |
postgres=CTc/postgres
template1 | postgres | UTF8 | en_US.UTF-8 | en_US.UTF-8 | =c/postgres
+
| | | | |
postgres=CTc/postgres
(4 rows)