Skip to content

Instantly share code, notes, and snippets.

@bborysenko
Created December 13, 2013 21:51
Show Gist options
  • Save bborysenko/7951988 to your computer and use it in GitHub Desktop.
Save bborysenko/7951988 to your computer and use it in GitHub Desktop.
PostgreSQL 7.4 installation from source code on CentOS 6.x
yum install gcc make
yum install python-devel tcl-devel readline-devel zlib-devel openssl-devel krb5-devel e2fsprogs-devel gettext libxml2-devel pam-devel uuid-devel openldap-devel perl-devel
cd /usr/local/src/
wget http://ftp.postgresql.org/pub/source/v7.4.30/postgresql-7.4.30.tar.gz
tar xzf postgresql-7.4.30.tar.gz
cd postgresql-7.4.30
./configure --disable-rpath --prefix=/usr/pgsql-7.4 --with-pam --with-openssl --with-ossp-uuid --with-libxml --with-libxslt --with-ldap
make
make install
echo "/usr/pgsql-7.4/lib/" > /etc/ld.so.conf.d/postgresql-7.4-libs.conf
ldconfig
mkdir -p /var/lib/pgsql/7.4/{backups,data}
chown -R postgres.postgres /var/lib/pgsql/7.4/
chmod -R 700 /var/lib/pgsql/7.4/
su - postgres -c "/usr/pgsql-7.4/bin/initdb -D /var/lib/pgsql/7.4/data"
vim /var/lib/pgsql/7.4/data/pg_hba.conf 
vim /var/lib/pgsql/7.4/data/postgresql.conf
cp /usr/local/src/postgresql-7.4.30/contrib/start-scripts/linux /etc/init.d/postgresql-7.4
chmod 755 /etc/init.d/postgresql-7.4
chkconfig --add postgresql-7.4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment