PostgreSQL安装与配置详解
2015-07-21 15:50
337 查看
安装:
sudo apt-get install postgresql
设置密码
sudo -u postgres psql
postgres=# ALTER USER postgres WITH PASSWORD 'postgres'; // 注意,不要忘记分号;
postgres=# \q
sudo passwd -d postgres
sudo -u postgres passwd
更改配置文件
sudo vim /etc/postgresql/8.4/main/postgresql.conf
listen_addresses = ‘*’
password_encryption = on
sudo vim /etc/postgresql/8.4/main/pg_hba.conf
host all all 0.0.0.0/0 md5
sudo /etc/init.d/postgresql restart
测试连接
psql -U postgres -h 127.0.0.1
postgres=#
安装GUI管理工具
sudo apt-get install pgadmin3
卸载
dpkg --list | grep postgresql
dpkg --purge
以后重新安装使用aptitude安装PostgreSQL,可以重新获得所有配置文件
http://blog.chinaunix.net/uid-25885064-id-3404550.html
sudo apt-get install postgresql
设置密码
sudo -u postgres psql
postgres=# ALTER USER postgres WITH PASSWORD 'postgres'; // 注意,不要忘记分号;
postgres=# \q
sudo passwd -d postgres
sudo -u postgres passwd
更改配置文件
sudo vim /etc/postgresql/8.4/main/postgresql.conf
listen_addresses = ‘*’
password_encryption = on
sudo vim /etc/postgresql/8.4/main/pg_hba.conf
host all all 0.0.0.0/0 md5
sudo /etc/init.d/postgresql restart
测试连接
psql -U postgres -h 127.0.0.1
postgres=#
安装GUI管理工具
sudo apt-get install pgadmin3
卸载
dpkg --list | grep postgresql
dpkg --purge
以后重新安装使用aptitude安装PostgreSQL,可以重新获得所有配置文件
http://blog.chinaunix.net/uid-25885064-id-3404550.html
相关文章推荐
- MySQL性能调优my.cnf详解
- SQL注入原理以及如何避免注入
- Meteor数据库mongodb查询
- Mysql存储过程_一次性建立多张表
- CRUD---数据库SQL操作
- oracle 违反主键id错误,查看表中是否有重复的ID列的值,并删除重复数据
- iOS 把数据库文件打包到mainbundle中,查找不到路径的解决办法;以及在删除bundle中文件的可行性
- Entity Framework Code First ---EF Power Tool 和MySql一起使用遇到的问题
- CenOS安装Oracle 11g
- mysql中表名为关键字的处理方法
- linux下安装php扩展memcache
- linux下安装php扩展memcache
- 不同数据库标志符长度限制总结
- redis主从的配置和使用
- redis2.6.4 在centos6.4上的安装
- Oracle触发器
- Redis配置文件参数说明
- SQL中Charindex和Oracle中对应的函数Instr
- Redis安装及主从配置
- Redis的三种启动方式