`
yangyi
  • 浏览: 112912 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

How to install pgsql on Solaris 10

阅读更多
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

2) 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

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

4) 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

5) $ Init the data folder:
pg_ctl -D /usr/local/pgsql/data initdb

6) The default sa would be postgres with a NULl passwd

7) 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
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics