12/19/2023 0 Comments Yum install postgresqlStep 4: Initialize the database and enable automatic start Vendor : PostgreSQL Global Development Group Is this ok : y Step 3: Install PostgreSQL 11 on CentOS 7 / RHEL 7Īfter adding PostgreSQL Yum Repository, install PostgreSQL Server / Client packages: sudo yum -y install postgresql11-server postgresql11Ĭonfirm the installed package: $ rpm -qi postgresql11-server Pgdg-redhat-repo noarch 42.0-24 /pgdg-redhat-repo-latest.noarch 11 k When prompted to confirm installation, press the y key. Since you may have Kernel updates, it is recommended to reboot your system after an upgrade sudo reboot Step 2: Add PostgreSQL Yum RepositoryĪdd PostgreSQL Yum Repository to your CentOS 7 / RHEL 7 system by running the command: sudo yum install Restart Iptables Firewall Fedora systemctl restart iptables.Installing Postgres SQL on Windows PC sudo yum update -y Test Connection from localhost (as Normal Linux User) psql -h localhost -U testuser test Enable Remote Connections to PostgreSQL Server –> Open PostgreSQL Port (5432) on Iptables FirewallĮdit /etc/sysconfig/iptables file nano /etc/sysconfig/iptablesĪdd following line before -A INPUT -j REJECT… -A INPUT -m state -state NEW -m tcp -p tcp -dport 5432 -j ACCEPT Login test database (as postgres user) psql testĬreate New “testuser” Role with Superuser and Password CREATE ROLE testuser WITH SUPERUSER LOGIN PASSWORD 'test' Start PostgreSQL Server and Autostart PostgreSQL on BootĬhkconfig -levels 235 postgresql-9.2 on Create Test Database and Create New UserĬreate test database (as postgres user) createdb test You can find more examples and full guide from PostgreSQL pg_hba.conf manual. Modify PostgreSQL /var/lib/pgsql/9.2/data/pg_hba.conf (host-based authentication) file: # Local networks Port = 5432 Or if you want use specific ip, then use following: listen_addresses = '192.168.1.33' If you want just localhost setup, then use following: listen_addresses = 'localhost' Open /var/lib/pgsql/9.2/data/nf file, and add/uncomment/modify following: listen_addresses = '*' Here is multiple alternatives howto do this (like service postgresql-9.x initdb, /etc/init.d/postgresql-9.x initdb) and postgresql-setup initdb, so that’s why I use here universal PostgreSQL initdb method, which should work with Fedora, CentOS/RHEL: su - postgres -c /usr/pgsql-9.2/bin/initdb Set PostgreSQL Server to Listen Addresses and Set Port Rpm -Uvh Install PostgreSQL 9.2 with YUM yum install postgresql92 postgresql92-server postgresql92-contrib Configure PostgreSQL 9.2 Initialize Cluster with initdb Command # Red Hat Enterprise Linux 5 - x86_64 - 64-bit # # Red Hat Enterprise Linux 5 - i386 - 32-bit # # Red Hat Enterprise Linux 6 - x86_64 - 64-bit # Red Hat (RHEL) # Red Hat Enterprise Linux 6 - i386 - 32-bit # Red Hat (RHEL) Add exclude to /etc/yum/pluginconf.d/nf file section: Įxclude=postgresql* Install PostgreSQL 9.2 Repository Fedora Add exclude to /etc//fedora.repo file section: Īdd exclude to /etc//fedora-updates.repo file section: ĬentOS Add exclude to /etc//CentOS-Base.repo file and sections: Exclude PostgreSQL packages from the repository of the distro. Install PostgreSQL 9.2.1 Database Server on Fedora, CentOS/RHELĮxclude Fedora, CentOS, RHEL own PostgreSQL Packages This is important step to get PostgreSQL repository working properly. Note: If you are upgrading PostgresSQL (from earlier version), then make sure that you backup (dump and copy) your database and configs. This guide uses PostgreSQL own YUM repos, which are always up-to-date and stable releases are available instantly. This is guide, howto install PostgreSQL 9.2 database server on Fedora, CentOS/RHEL.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |