免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1400 | 回复: 0
打印 上一主题 下一主题

Install Postgresql on Red Hat 9 with RPM packages [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-11-04 21:06 |只看该作者 |倒序浏览

               
               
               
               
               
Install Postgresql on Red Hat 9 with RPM packages
Download packages
http://www.postgresql.org/ftp/binary/v7.4.8/linux/rpms/redhat/redhat-9/
postgresql-7.4.8-1PGDG.i686.rpm               
postgresql-contrib-7.4.8-1PGDG.i686.rpm
postgresql-devel-7.4.8-1PGDG.i686.rpm
postgresql-docs-7.4.8-1PGDG.i686.rpm
postgresql-jdbc-7.4.8-1PGDG.i686.rpm
postgresql-libs-7.4.8-1PGDG.i686.rpm
postgresql-pl-7.4.8-1PGDG.i686.rpm
postgresql-server-7.4.8-1PGDG.i686.rpm
postgresql-test-7.4.8-1PGDG.i686.rpm
Installation
# rpm -ivh postgresql-libs-7.4.8-1PGDG.i686.rpm
# rpm -ivh postgresql-devel-7.4.8-1PGDG.i686.rpm
# rpm -ivh postgresql-contrib-7.4.8-1PGDG.i686.rpm
# rpm -ivh postgresql-7.4.8-1PGDG.i686.rpm
# rpm -ivh postgresql-server-7.4.8-1PGDG.i686.rpm
# rpm -ivh postgresql-docs-7.4.8-1PGDG.i686.rpm
# rpm -ivh postgresql-test-7.4.8-1PGDG.i686.rpm
# rpm -ivh postgresql-jdbc-7.4.8-1PGDG.i686.rpm
# rpm -ivh postgresql-pl-7.4.8-1PGDG.i686.rpm
Start Postgresql
#/etc/init.d/postgresql start
Configuration
#cd /var/lib/pgsql/data
#vi postgresql.conf
Uncomment tcpip_socket and change false to true
tcpip_socket = true
#vi pg_hba.conf
Add the allowed host connect to the database.
host    all         all         127.0.0.1         255.255.255.255   password
host    all         all         192.168.0.0         255.255.255.0       password
Start postgresql after reboot
#chkconfig postgresql on
Postgres login to the database
#su postgres
Add user with all privileges
$createuser
    Enter name of user to add: test
    Shall the new user be allowed to create databases? (y/n) y
    Shall the new user be allowed to create more new users? (y/n) n
    CREATE USER
$
Change passwd
$psql template1   // default database is template1
Welcome to psql 7.4.8, the PostgreSQL interactive terminal.
Type:  copyright for distribution terms
       h for help with SQL commands
       ? for help on internal slash commands
       g or terminate with semicolon to execute query
       q to quit
template1=#ALTER USER test WITH PASSWORD 'test';
ALTER USER
template1=#\q
$
Reference
http://dev.panopticsearch.com/postgres_microhowto.html
               
               

本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/184/showart_55239.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP