博客首页 注册 建议与交流 排行榜 加入友情链接
推荐 投诉 搜索: 帮助

雾里看花

Linux,FreeBSD.,C/C++ ,JAVA ,perl,Networksecurity Mysql,Oracle,DB2 懒惰只能使人更加愚蠢!
  ghan.cublog.cn

关于作者
姓名:ghan
职业:计算机业
年龄:23
位置:广东省--梅州
E-mail:6220104@qq.com
免责声明:本站文章,大部份为网上收集整理,转载请注明出处
|| << >> ||
我的分类


PostgreSQL 安装、备份、还原
                      Postgresql 安装、备份、还原
./configure
gmake
su
gmake install
adduser postgres
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
su - postgres
/usr/local/pgsql/bin/initdb -D /usr/local/pgsql/data
/usr/local/pgsql/bin/postgres -D /usr/local/pgsql/data >logfile 2>&1 &
/usr/local/pgsql/bin/createdb than
/usr/local/pgsql/bin/psql test
# ./pg_ctl -D /usr/local/pgsql/data start (启动)
# ./pg_ctl -D /usr/local/pgsql/data stop(关闭)
接下来,就是安装配置 windowns版的管理工具:pgAdmin III
由于postgresql默认没有开启监听端口,下面需要在服务器端做一些设置:
修改postgresql数据库配置文件
$ vi /usr/local/pgsql/data/postgresql.conf
#---------------------------------------------------------------------------
# CONNECTIONS AND AUTHENTICATION
#---------------------------------------------------------------------------
# - Connection Settings -
listen_addresses = '*'  # what IP address(es) to listen on;
                                        # comma-separated list of addresses;
                                        # defaults to 'localhost', '*' = all
                                        # (change requires restart)
port = 5432                             # (change requires restart)
max_connections = 100                   # (change requires restart)
# Note: increasing max_connections costs ~400 bytes of shared memory per
# connection slot, plus lock space (see max_locks_per_transaction).  You
# might also need to raise shared_buffers to support more connections.
superuser_reserved_connections = 3      # (change requires restart)
unix_socket_directory = ''              # (change requires restart)
unix_socket_group = ''                  # (change requires restart)
unix_socket_permissions = 0777          # octal
                                        # (change requires restart)
#bonjour_name = ''                      # defaults to the computer name
修改客户端配置文件
$  vi /usr/local/pgsql/data/pg_hba.conf
 

# "local" is for Unix domain socket connections only
local   all         all                               trust
#IPv4 local connections:
host    all         all         192.168.1.0/24          trust

下面下载pgAdmin III 安装,连接就可以很方便的管理了,

 

发表于: 2008-01-02,修改于: 2008-01-02 23:50,已浏览351次,有评论0条 推荐 投诉


网友评论
 发表评论