![]() 1 root root 5 /usr/bin/yum -> ~]# ls -l /usr/bin/dnf In this article although I would use YUM install specific version of rpm but in the backend YUM is using DNF in my RHEL 8 environment ~]# ls -l /usr/bin/yum We will cover below topics in this article: Now the world is moving towards DNF which has lot more features compared to YUM Today, we saw how our Support Engineers install PostgreSQL on Centos.YUM is a package manager used with Red Hat, CentOS and many other distributions. In short, PostgreSQL installation can be performed either from the default Centos repositories or from the Postgres repositories. Now start and enable PostgreSQL using systemctl: $ sudo systemctl start postgresql-11Ĭreated symlink from /etc/systemd/system//rvice to /usr/lib/systemd/system/rvice.Īt this stage, PostgreSQL is up and running on the server. Creating a database cluster consists of creating the directories to place the database data, generating the shared catalog tables, and creating the template1 and postgres databases.Ĭreate a new PostgreSQL database cluster with initdb: $ sudo /usr/pgsql-11/bin/postgresql-11-setup initdb We have to create a new PostgreSQL database cluster before we can use the Postgres database. Creating a New PostgreSQL Database Cluster Now that the software is installed, we will perform some initialization steps to prepare a new database cluster for PostgreSQL. Confirm it with y so the installation can complete. To install the PostgreSQL server, use the following command: $ sudo yum install postgresql11-serverĭuring the installation process, we will be asked about importing a GPG key. In this article, let us use the PostgreSQL 11 release. We can view all available packages and versions using the following command: $ yum list postgresql*Ĭhoose and install the desired version of PostgreSQL. The PostgreSQL repository includes information for all available PostgreSQL releases. When given the prompt, confirm the installation with y. Now, install a repository configuration package using the official PostgreSQL repository for CentOS: $ sudo yum install Mirrorlist=$releasever&arch=$basearch&repo=updates&infra=$infra Gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 Mirrorlist=$releasever&arch=$basearch&repo=os&infra=$infra As a result, the file will look like the following, with new lines highlighted. $ sudo vi /etc//CentOS-Base.repoįind the and sections, and insert the exclude=postgresql* line in both sections. ![]() Open the repository configuration file using any text editor. Otherwise, dependencies might resolve to the postgresql supplied by the base repository. Here, initially, we need to exclude the search for postgresql packages from the CentOS-Base repository. Therefore, we can use the official Postgres repository. Sometimes, the version that is available in the CentOS 7 Base repository is obsolete. Optionally, we can also configure PostgreSQL to start on boot with the command below: $ sudo systemctl enable postgresql Install PostgreSQL on Centos from Postgres repository ![]() Now, initialize your Postgres database and start PostgreSQL: $ sudo postgresql-setup initdb To install from the Centos repositories, simply run: $ sudo yum install postgresql-server postgresql-contrib Postgres can be installed using default Centos repositories. Let us today discuss the steps to Install PostgreSQL on Centos. Webmasters can perform the install of PostgreSQL on Centos either from the default Centos repositories or from the Postgres repositories.Īs a part of our Server Management Services, we help our Customers with software installations regularly.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |