ITeye博客

How to install pgsql on Solaris 10

yangyi · 2011-06-18 19:32 · Others · 数据库 · Markdown

  1. 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

  1. 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

  2. Unzip the binaries at the aimed INSTALL_DIR: bunzip2 < postgresql-9.0.4-S10.sparc-64.tar.bz2 | tar xpf -

  3. 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

  4. $ Init the data folder: pg_ctl -D /usr/local/pgsql/data initdb

  5. The default sa would be postgres with a NULl passwd

  6. Start db: pg_ctl start -l logfile

  7. Creating a db using command: createdb test

  8. The default port used is 5432, now the server will be ready to accept connnections

  9. Backup & Restore: pg_dump -Ft mydb -f db.tar pg_restore pg_restore -d newdb db.tar

评论(0)

暂无评论。

评论功能维护中,当前仅展示历史评论。