出错输出: Removing postgresql-9.1 (9.1.18-0ubuntu0.12.04) ... .: Can't open /usr/share/postgresql-common/maintscripts-functions dpkg: error processing package postgresql 脚本 返回了错误号 2 dpkg: postgresql-client-9.1: dependency problems, but removing anyway as you requested: postgresql info/postgresq* 然后是 sudo apt-get autoremove postgresql* 最后可以看到: dpkg:警告:files list file for package 'postgresql Removing postgresql-9.1 (9.1.18-0ubuntu0.12.04) ...
初始化数据库,默认路径为/var/lib/pgsql/9.1/data [root@SNDA-192-168-15-161 yum.repos.d]# service postgresql-9.1 [ OK ] 启动服务 [root@SNDA-192-168-15-161 yum.repos.d]# service postgresql -9.1 start Starting postgresql-9.1 service: [ OK ] [root@SNDA-192-168 authentication failed for user "postgres" 重启服务 [root@SNDA-192-168-15-161 yum.repos.d]# service postgresql -9.1 restart Stopping postgresql-9.1 service: [ OK ] Starting postgresql
postgresql-client-9.1 /usr/lib/postgresql/9.1/bin/psql 398 2013-12-16 20:08:23 2013-12-16 20:04:58 postgresql