- Configure the PostgreSQL SysV Script. This script is useful for starting, stopping, and checking the status of PostgreSQL.
# cd /usr/local/src/postgresql-7.x
# cp contrib/start-scripts/linux /etc/init.d/postgres
# chmod 755 /etc/init.d/postgres
.... then edit the file to specify the data directory, etc. and sets the environment variabes (PGDATA etc). The file is well documented. If you installed Postgres manually, it should have the correct values already set.
- To have PostgreSQL start automatically when the computer boots add symbolic links from the correct /etc/rc*.d/ directories to /etc/init.d/postgres. If the normal runlevel is 3 then you really only need to add it to rc3.d:
# ln -s /etc/init.d/postgres /etc/rc2.d/S85postgres
# ln -s /etc/init.d/postgres /etc/rc3.d/S85postgres
etc ...
- Start PostgreSQL for the first time:
# /etc/init.d/postgres start
No comments:
Post a Comment