Postgresql
Jump to navigation
Jump to search
How to install Postgres 8
Enable centosplus repository and install postgres (at the time writen this howto is 8.1.9 version)
yum --enablerepo=centosplus install postgresql postgresql-contrib postgresql-devel postgresql-docs postgresql-pl postgresql-python postgresql-test
Then make the necesary custom templates:
/etc/init.d/postgresql start mkdir -p /etc/e-smith/templates/var/lib/pgsql/data mkdir -p /etc/e-smith/templates-custom/var/lib/pgsql/data cp /var/lib/pgsql/data/postgresql.conf /etc/e-smith/templates/var/lib/pgsql/data cp /var/lib/pgsql/data/pg_hba.conf /etc/e-smith/templates/var/lib/pgsql/data cp /var/lib/pgsql/data/postgresql.conf /etc/e-smith/templates-custom/var/lib/pgsql/data cp /var/lib/pgsql/data/pg_hba.conf /etc/e-smith/templates-custom/var/lib/pgsql/data
Now login as postgres user:
su postgres
Then access to superuser database, set a password and exit.
psql -U postgres -d template1 alter user postgres with encrypted password 'xxxxx'; \q exit