使用 Movable Type 在服务器上安装 postgres
我刚刚从 Amazon ec2 启动了一台 LAPP 机器。我已将其更新为可移动类型。我正在使用 postgresql 数据库。我停在数据库安装部分,因为我收到了 postgresql 错误。我认为默认情况下唯一的用户是“postgre”并且没有密码。我把它放在 MT 中,它抱怨我没有密码。所以我想我需要创建一个新用户。所以我尝试了createuser,它要求输入密码。然后我执行了 sudo,现在是 root 了。它仍然需要密码。我不知道那是什么。
查看日志,发现 postgresql 已关闭。当我尝试使用 pg_ctl 重新启动它时,它说我无法以 root 身份重新启动它。因此,我退出并以它提供给我的默认用户名再次运行它,但出现权限错误。
当我尝试成为 root 并创建用户或执行 psql 时,它说我需要提供密码。我尝试过按回车键,以及其他可能的密码。运气不好。我想既然我是root,我就应该表现得很好。
我知道 postgresql 在那里,因为 MT 说它在那里。
所以我需要要么提供一个 psql 密码,要么能够以其他用户身份登录并能够重新启动 postgresql。
I have just started a LAPP machine from Amazon ec2. I have updated it to be Movable Type ready. I am using the postgresql database. I stopped at the database installation section because I was getting a postgresql error. I thought the only user by default is 'postgre' and has no password. I put that in MT and it complains that I don't have a password. So I thought I need to make a new user. So I tried createuser and it is asking for a Password. I then did sudo and was now root. It still wants a Password. I do not know what it is.
Looking at the log it appears postgresql is shutdown. When I try to restart it by using pg_ctl it says I cannot be root to restart it. So I exit and run it again as the default user name it gives me and I get a permission error.
When I try to be root and createuser or do psql it says I need to give a password. I have tried to just hit return, and a bunch of other passwords that it may be. No luck. I thought since I was root I should be good.
I know postgresql is there because MT says it is.
So I need to either come up with a psql Password or be able to login as a different user with the ability to restart postgresql.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您是“root”时,您可以 su 到 postgres 用户。然后您应该能够创建一个新用户。记得在 /etc/postgresql//main/pg_hba.conf 中添加用户的连接权限。
When you are 'root', you could su to the postgres user. Then you should be able to create a new user. Remember to add the connection rights to the user in the /etc/postgresql//main/pg_hba.conf.