

for version 9.4: /usr/pgsql -9.4 /bin/postgresql94-setup initdb

If the previous command did not work, try directly calling the setup binary, located in a similar naming scheme: /usr/pgsql- y.x /bin/postgresql yx-setup initdbĮ.g. The first command (only needed once) is to initialize the database in PGDATA. The variable PGDATA is used to reference this directory.įor PostgreSQL version 9.0 and above, the default data directory is: /var/lib/pgsql/ / dataįor versions 7.x and 8.x, default data directory is: /var/lib/pgsql/ data/ Initialize The PostgreSQL data directory contains all of the data files for the database.

In the commands below, the value of will vary depending on the version of PostgreSQL used.įor PostgreSQL version 9.0 and above, the includes the major.minor version of PostgreSQL, e.g., postgresql-9.4įor versions 8.x, the is always postgresql (without the version signifier). Post-installation commandsĪfter installing the packages, a database needs to be initialized and configured.

Other packages can be installed according to your needs. To list available packages: yum list postgres*įor example, to install a basic PostgreSQL 9.4 server: yum install postgresql94- server For example, to install PostgreSQL 9.4 on CentOS 6 64-bit: yum localinstall http: ///9.4/redhat/rhel-6-x86_64/ Install PostgreSQL To the section(s) identified above, you need to append a line (otherwise dependencies might resolve to the postgresql supplied by the base repository): exclude=postgresql* Install PGDG RPM fileĪ PGDG file is available for each distribution/architecture/database version combination. On Red Hat: /etc/yum/pluginconf.d/nf section.On CentOS: /etc//CentOS-Base.repo, and sections.On Fedora: /etc//fedora.repo and /etc//fedora-updates.repo, sections.Instructions Configure your YUM repository Repository packages for different version combinations.This is available for the following Linux distributions (both 32- and 64-bit platforms for the current release and prior release or two): PostgreSQL can be installed using RPMs (binary) or SRPMs (source) managed by YUM.
