试图安装postgresql,看起来很喜欢我搞砸了.我首先使用下面的命令删除postgres.
[ec2-user@ip-10-183-130-45 /]$rm -rf /var/lib/pgsql/data
[ec2-user@ip-10-183-130-45 /]$sudo rm -rf /var/pgsql
然后尝试initdb,由于某种原因失败,
[ec2-user@ip-10-183-130-45 /]$sudo service postgresql initdb
Initializing database: [Failed]
[ec2-user@ip-10-183-130-45 var]$ls -l
total 80
drwxr-xr-x 2 root root 4096 May 9 2013 account
drwxr-xr-x 9 root root 4096 Sep 18 09:54 cache
drwxr-xr-x 3 root root 4096 May 9 2013 db
drwxr-xr-x 3 root root 4096 May 9 2013 empty
drwxr-xr-x 3 root root 4096 Nov 8 06:34 ftp
drwxr-xr-x 2 root root 4096 Jan 6 2012 games
drwxr-xr-x 20 root root 4096 Oct 14 07:34 lib
drwxr-xr-x 2 root root 4096 Jan 6 2012 local
drwxrwxr-x 5 root lock 4096 Jan 21 04:36 lock
drwxr-xr-x 7 root root 4096 Jan 21 09:31 log
lrwxrwxrwx 1 root root 10 May 9 2013 mail -> spool/mail
drwxr-xr-x 2 root root 4096 Jan 6 2012 nis
drwxr-xr-x 2 root root 4096 Jan 6 2012 opt
**drwx------ 3 postgres postgres 4096 Jan 21 13:26 pgsql**
drwxr-xr-x 2 root root 4096 Jan 6 2012 preserve
drwxr-xr-x 2 root root 4096 Mar 14 2013 racoon
drwxr-xr-x 16 root root 4096 Jan 21 13:23 run
drwxr-xr-x 9 root root 4096 May 9 2013 spool
drwxrwxrwt 3 root root 4096 Jan 20 06:00 tmp
drwxrwsr-x 7 root www 4096 Nov 17 14:38 www
drwxr-xr-x 2 root root 4096 Jan 6 2012 yp
所以我尝试启动postgresql,也失败了
[ec2-user@ip-10-183-130-45 var]$sudo service postgresql start
/var/pgsql is missing. Use "service postgresql initdb" to initialize
the cluster first.
[Failed]
有人可以帮忙,身份证我做错了什么?使用postgresql-9.2-1.19.
解决方法:
尝试:
sudo yum remove postgresql postgresql-server
sudo rm -rf /var/lib/psql
sudo yum install postgresql postgresql-server
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。