![]() ![]() ![]() postgres=# Step 5: Setup PostgreSQL admin user’s password $ sudo su - postgres $ psql -c "alter user postgres with password 'YourStrongPassword'"ĭemo Output: -bash-4.2$ psql -c "alter user postgres with password 'YourStrongPassword'" ALTER ROLE -bash-4.2$ Allow remote clients to connect to the PostgreSQL server:Įdit the file /var/lib/pgsql/12/data/nf and set Listen address to your server IP address or “*” for all interfaces. bash-4.2$ psql psql (12.4) Type "help" for help. Now connect to the PostgreSQL terminal : # psqlĭemo Output: ~]# sudo su - postgres Last login: Fri Aug 21 07:22: on pts/1 -bash-4.2$ ~]# systemctl start rvice ~]# Step 4: Accessing the PostgreSQL Databaseįirst, you switch the user to Postgres user following the below command # sudo su - postgres To start the PostgreSQL service and enable it to start automatically on boot, run the following commands: # systemctl enable rvice # systemctl start rvice ~]# systemctl enable rvice Created symlink from /etc/systemd/system//rvice to /usr/lib/systemd/system/rvice. ![]() Execute the following command: # yum install postgresql12 postgresql12-server postgresql12-contrib postgresql12-libs -yĭemo Output: ~]# yum install postgresql12 postgresql12-server postgresql12-contrib postgresql12-libs -y Loaded plugins: fastestmirror, langpacks Loading mirror speeds from cached hostfile * base: * epel: * extras: * updates: Resolving Dependencies -> Running transaction check -> Package postgresql12.x86_64 0:12.4-1PGDG.rhel7 will be installed -> Package postgresql12-contrib.x86_64 0:12.4-1PGDG.rhel7 will be installed -> Package postgresql12-libs.x86_64 0:12.4-1PGDG.rhel7 will be installed -> Package postgresql12-server.x86_64 0:12.4-1PGDG.rhel7 will be installed -> Finished Dependency Resolution Dependencies Resolved = Package Arch Version Repository Size = Installing: postgresql12 x86_64 12.4-1PGDG.rhel7 pgdg12 1.6 M postgresql12-contrib x86_64 12.4-1PGDG.rhel7 pgdg12 610 k postgresql12-libs x86_64 12.4-1PGDG.rhel7 pgdg12 370 k postgresql12-server x86_64 12.4-1PGDG.rhel7 pgdg12 5.1 M Transaction Summary = Install 4 Packages Total size: 7.6 M Total download size: 5.1 M Installed size: 32 M Downloading packages: No Presto metadata available for pgdg12 warning: /var/cache/yum/x86_64/7/pgdg12/packages/86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 442df0f8: NOKEY Public key for 86_64.rpm is not installed 86_64.rpm | 5.1 MB 00:00:09 Retrieving key from file:///etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG Importing GPG key 0x442DF0F8: Userid : "PostgreSQL RPM Building Project " Fingerprint: 68c9 e2b9 1a37 d136 fe74 d176 1f16 d2e1 442d f0f8 Package : From : /etc/pki/rpm-gpg/RPM-GPG-KEY-PGDG Running transaction check Running transaction test Transaction test succeeded Running transaction Installing : 86_64 1/4 Installing : 86_64 2/4 Installing : 86_64 3/4 Installing : 86_64 4/4 Verifying : 86_64 1/4 Verifying : 86_64 2/4 Verifying : 86_64 3/4 Verifying : 86_64 4/4 Installed: postgresql12.x86_64 0:12.4-1PGDG.rhel7 postgresql12-contrib.x86_64 0:12.4-1PGDG.rhel7 postgresql12-libs.x86_64 0:12.4-1PGDG.rhel7 postgresql12-server.x86_64 0:12.4-1PGDG.rhel7 Complete! ~]# Step 3: Start PostgreSQL on CentOS Initialize PostgreSQL: # /usr/pgsql-12/bin/postgresql-12-setup initdbĭemo Output: ~]# /usr/pgsql-12/bin/postgresql-12-setup initdb Initializing database. Now that the repository is added, it’s time to install PostgreSQL 12 along with its associated packages. ![]() See Also: Step 1: Integrate PostgreSQL Yum Repository with your CentOS 7 or RHEL 7 system yum install -y Ĭurrently, PostgreSQL Yum Repository support for below mentioned Linux system:ĭownload Packages and Installers Step 2: Install PostgreSQL 12 on CentOS 7 or RHEL 7 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |