<toc><ul><li><link topicref=“2”>Compile from source</link></li><li><link topicref=“3”>Client-only installation:</link></li><li><link topicref=“4”>Create user and database</link></li><li><link topicref=“5”>Create a certificate and install</link></li><li><link topicref=“6”>Values to change in ~postgres/postgresql.conf</link></li><li><link topicref=“7”>Set table owners:</link></li></ul></toc>
./configure --with-perl --with-openssl make -j6 su nobody -c "make check" make install /usr/sbin/useradd -u 400 -d /usr/local/pgsql/data -c "PostgreSQL" -m -k /dev/null postgres su - postgres /usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
<list><ul><li>Edit <tt>~postgres/postgresql.conf</tt>, then add to startup</li></ul></list>
echo "Starting pgSQL" su - postgres -c "/usr/local/pgsql/bin/pg_ctl -D /usr/local/pgsql/data start >>logfile 2>&1"
<list><ul><li><tt>crontab -e -u postgres</tt></li></ul></list>
0 12 * * * /usr/local/pgsql/bin/vacuumdb --all --analyze > /dev/null 0 0 * * * LOGFILE=/usr/local/pgsql/data/serverlog; bzip2 -c $LOGFILE > $LOGFILE.old.bz2 && cat /dev/null > $LOGFILE
./configure --with-perl --with-openssl make -C src/bin install make -C src/include install make -C src/interfaces install make -C doc install
../bin/createuser -D -A -P -E -U postgres username ../bin/createdb -U postgres -O username dbname
<list><ul><li><link idref=“15”></link></li><li><tt>~postgres/server.key</tt> and <tt>~postgres/server.crt</tt></li></ul></list>
tcpip_socket = true virtual_host = 'localhost' shared_buffers = 48000 # (Number of buffers * 8k each) 48000 * 8k = 384 MB ram for postgres sort_mem = 32768 # (kb) ssl = true
UPDATE pg_database SET datdba = (SELECT usesysid FROM pg_user WHERE usename='newownername') WHERE datname='dbname';