postgresql-7.4.2-1PGDG.i386.rpm
postgresql-contrib-7.4.2-1PGDG.i386.rpm
postgresql-debuginfo-7.4.2-1PGDG.i386.rpm
postgresql-devel-7.4.2-1PGDG.i386.rpm
postgresql-docs-7.4.2-1PGDG.i386.rpm
postgresql-jdbc-7.4.2-1PGDG.i386.rpm
postgresql-libs-7.4.2-1PGDG.i386.rpm
postgresql-pl-7.4.2-1PGDG.i386.rpm
postgresql-python-7.4.2-1PGDG.i386.rpm
postgresql-server-7.4.2-1PGDG.i386.rpm
postgresql-tcl-7.4.2-1PGDG.i386.rpm
postgresql-test-7.4.2-1PGDG.i386.rpm
newfire is the database name here.
Log in as postgres.
postmaster -i -D /usr/local/pgsql/data >logfile 2>&1 &
Depending on the linux platform, to start postgresql on boot
can be different. For Redhat Linux, add to /etc/rc.local file:
su - postgres -c "postmaster -i -D
/usr/local/pgsql/data > /usr/local/pgsql/logfile 2>&1
&"
Log in as postgres.
pg_ctl stop -D /usr/local/pgsql/data
or
pg_ctl stop -D /usr/local/pgsql/data -m
fast
or
pg_ctl stop -D /usr/local/pgsql/data -m
immediate
Log in as postgres.
append the following to /usr/local/pgsql/data/pg_hba.conf to allow all users from localhost to connect without authentication.
local all all 0.0.0.0 0.0.0.0 trust
Log in as postgres.
pg_dump dbname | gzip > filename.gz
or shut
down database first and back up from file system
zip -r data.zip
/usr/local/pgsql/data
Log in as postgres.
gunzip -c filename.gz | psql dbname
or shut down database first and restore from file system
replace /usr/local/pgsql/data with data.zip
Note: the dbname must be an empty database. Run "createdb -E UNICODE dbname" to create a database.
Log in as root.
Set shared memory to 256M:
echo 256000000 >
/proc/sys/kernel/shmmax
Put the following line in /etc/sysctl.conf :
kernel.shmmax = 256000000
Modify the following lines in /usr/local/pgsql/data/postgresql.conf:
shared_buffers = 30400 sort_mem = 32168 max_connections=64 fsync=false