How to install pgsql on Solaris 10

本文介绍了如何在Solaris操作系统上安装PostgreSQL数据库系统。包括确定操作系统版本与架构、下载预编译版本、解压安装文件、配置环境变量、初始化数据库、启动服务等步骤,并提到了默认设置及备份恢复的方法。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

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:
[url]http://wwwmaster.postgresql.org/download/mirrors-ftp/binary/v9.0.4/solaris/solaris10/sparc/postgresql-9.0.4-S10.sparc-64.tar.bz2[/url]

3) Unzip the binaries at the aimed [i]INSTALL_DIR[/i]:
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 [i]INSTALL_DIR[/i]/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 [i]NULl[/i] 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
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值