Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

PostgreSQL "Service Postgresql Start" Set Up on RedHat Linux

If you have the packages already installed on your server, RedHat installation can be as easy as:
service postgresql start
  • 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.
You can turn on and off whether PostgreSQL starts at boot like this:
chkconfig postgresql on/off
  • 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.
  • 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:
PGDATA=/var/lib/pgsql/data
PGPORT=5432
PGLOG=/var/lib/pgsql/pgstartup.log
PGOPTS=
  • 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.
  • 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.

Comments

Popular posts from this blog

How to find the server is whether standby (slave) or primary(master) in Postgresql replication ?

7 Steps to configure BDR replication in postgresql

How to Get Table Size, Database Size, Indexes Size, schema Size, Tablespace Size, column Size in PostgreSQL Database

Ora2PG - Oracle/MySQL to Postgres DB migration Version 20.0

PostgreSQL Introduction