How to install pgsql on Solaris 10
- Check out the OS version and architecture, such as:
bash-3.00# cat /etc/release Solaris 10 5/08 s10s_u5wos_10 SPARC bash-3.00# isainfo -b 64
-
Although it's not hard to build code from scratch, it's much easier to download the pre-build version. Say for this SunOS, the URL would be: http://wwwmaster.postgresql.org/download/mirrors-ftp/binary/v9.0.4/solaris/solaris10/sparc/postgresql-9.0.4-S10.sparc-64.tar.bz2
-
Unzip the binaries at the aimed INSTALL_DIR: bunzip2 < postgresql-9.0.4-S10.sparc-64.tar.bz2 | tar xpf -
-
For Solaris, the buildin version will be 8.1, to override it, set PATH env to INSTALL_DIR/postgres/9.0-pgdg/64/bin before /usr/bin
-
$ Init the data folder: pg_ctl -D /usr/local/pgsql/data initdb
-
The default sa would be postgres with a NULl passwd
-
Start db: pg_ctl start -l logfile
-
Creating a db using command: createdb test
-
The default port used is 5432, now the server will be ready to accept connnections
-
Backup & Restore: pg_dump -Ft mydb -f db.tar pg_restore pg_restore -d newdb db.tar