https://wiki.postgresql.org/api.php?action=feedcontributions&user=Shakaran&feedformat=atomPostgreSQL wiki - User contributions [en]2024-03-28T20:36:43ZUser contributionsMediaWiki 1.35.13https://wiki.postgresql.org/index.php?title=PostgreSQL_on_RedHat_Linux&diff=18303PostgreSQL on RedHat Linux2012-09-26T00:59:21Z<p>Shakaran: Broken link and domain expired.</p>
<hr />
<div>If you have the packages already installed on your server, RedHat installation can be as easy as:<br />
<br />
<code><pre><br />
service postgresql start<br />
</pre></code><br />
<br />
In older versions you'll automatically get a call to '''service postgresql initdb''' the first time you do this that will create the database cluster; in recent versions you'll need to do that yourself before the above.<br />
<br />
You can turn on and off whether PostgreSQL starts at boot like this:<br />
<br />
<code><pre><br />
chkconfig postgresql on/off<br />
</pre></code><br />
<br />
The default network configuration that RedHat initdb specifies uses the 'ident' mechanism for controlling access to the database, which is often not what people want. See [[Client Authentication]] for more information.<br />
<br />
RedHat defaults to creating the database in /var/lib/pgsql/data. If you want to change that, or otherwise want to adjust the parameters uses when PostgreSQL is started, you can do that by editing /etc/sysconfig/pgsql/postgresql and putting changes into there. This is a standard shell script file included into the environment; here is a sample with the default parameters, you can pick just the lines from here you want to change and put new values there:<br />
<br />
<code><pre><br />
PGDATA=/var/lib/pgsql/data<br />
PGPORT=5432<br />
PGLOG=/var/lib/pgsql/pgstartup.log<br />
PGOPTS=<br />
</pre></code><br />
<br />
PGOPTS can be used to set random other options; it is added to the end of the command line used to run the postmaster daemon. But note that any configuration parameters set this way cannot be changed on-the-fly while the postmaster is running. It's usually better to set custom values in postgresql.conf.<br />
<br />
Also, if you want to change PGDATA from the default, be aware that the default SELinux configuration in recent Red Hat releases will prevent the postmaster daemon from writing anywhere except /var/lib/pgsql/data. You'll need to change the SELinux setup or at least relabel directory security contexts to put it someplace else. See [[PostgreSQL and SELinux]] for links to more information.<br />
<br />
* [[RPM Installation]] by Devrim GÜNDÜZ & Lamar Owen<br />
* [http://www.postgresonline.com/journal/index.php?/archives/45-An-Almost-Idiots-Guide-to-PostgreSQL-YUM.html An Almost Idiot's Guide to PostgreSQL YUM] and subsequent [http://www.postgresonline.com/journal/index.php?/archives/60-YUM-2-Almost-Idiots-Guide-to-upgrade-from-PostgreSQL-8.3.1-to-8.3.3.html 8.3.1 to 8.3.3 upgrade] and subsequent [http://www.postgresonline.com/journal/index.php?/archives/144-An-almost-idiots-guide-to-Install-and-Upgrade-to-PostgreSQL-8.4-with-Yum.html Upgrade/Install PostgreSQL 8.4 with Yum].<br />
* [http://www.westnet.com/~gsmith/content/postgresql/pgrpm.htm Installing the PostgreSQL 8.2 RPMs on RHEL 5/CentOS 5] by Greg Smith<br />
* [http://www.phpbuilder.com/columns/kevin20010314.php3 Getting Started with PostgreSQL on Redhat 7.0] by Kevin Kemp<br />
* [[RPM Packaging]]<br />
<br />
== Recent Fedora versions ==<br />
<br />
Starting in Fedora 16, the configuration of the server has been changed relative to the above. See the [http://docs.fedoraproject.org/en-US/Fedora/16/html/Release_Notes/sect-Release_Notes-Changes_for_Sysadmin.html release notes] for details.<br />
<br />
[[Category:Linux distribution]]</div>Shakaran