求助, postgres9.5无法启动

qq_34532107 2018-11-09 04:10:18
-- Documentation: http://www.freedesktop.org/wiki/Software/systemd/multiseat
--
-- A new session with the ID 19601 has been created for the user root.
--
-- The leading process of the session is 30336.
Nov 09 16:08:26 iZwz9bb08phycz6015t7reZ systemd[1]: Started Session 19601 of user root.
-- Subject: Unit session-19601.scope has finished start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-19601.scope has finished starting up.
--
-- The start-up result is done.
Nov 09 16:08:26 iZwz9bb08phycz6015t7reZ systemd[1]: Starting Session 19601 of user root.
-- Subject: Unit session-19601.scope has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit session-19601.scope has begun starting up.
Nov 09 16:08:26 iZwz9bb08phycz6015t7reZ sshd[30336]: pam_unix(sshd:session): session opened for user root by (uid=0)
Nov 09 16:08:31 iZwz9bb08phycz6015t7reZ polkitd[501]: Registered Authentication Agent for unix-process:30355:994346995 (system bus name :1.39250 [/usr/bin/pkttyagent --notify-fd 5 --fa
Nov 09 16:08:31 iZwz9bb08phycz6015t7reZ systemd[1]: Starting PostgreSQL 9.5 database server...
-- Subject: Unit postgresql-9.5.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit postgresql-9.5.service has begun starting up.
Nov 09 16:08:31 iZwz9bb08phycz6015t7reZ pg_ctl[30367]: < 2018-11-09 16:08:31.343 CST >FATAL: could not create lock file "postmaster.pid": Permission denied
Nov 09 16:08:32 iZwz9bb08phycz6015t7reZ pg_ctl[30367]: pg_ctl: could not start server
Nov 09 16:08:32 iZwz9bb08phycz6015t7reZ pg_ctl[30367]: Examine the log output.
Nov 09 16:08:32 iZwz9bb08phycz6015t7reZ systemd[1]: postgresql-9.5.service: control process exited, code=exited status=1
Nov 09 16:08:32 iZwz9bb08phycz6015t7reZ systemd[1]: Failed to start PostgreSQL 9.5 database server.
-- Subject: Unit postgresql-9.5.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit postgresql-9.5.service has failed.
--
-- The result is failed.
Nov 09 16:08:32 iZwz9bb08phycz6015t7reZ systemd[1]: Unit postgresql-9.5.service entered failed state.
Nov 09 16:08:32 iZwz9bb08phycz6015t7reZ systemd[1]: postgresql-9.5.service failed.
Nov 09 16:08:32 iZwz9bb08phycz6015t7reZ polkitd[501]: Unregistered Authentication Agent for unix-process:30355:994346995 (system bus name :1.39250, object path /org/freedesktop/PolicyK
...全文
250 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Aubrey_AI 2018-12-06
  • 打赏
  • 举报
回复
-- A new session with the ID 19601 has been created for the user root. 这就是错误的地方,pg如果没有进行配置,root启动是会报错的。如果要通过root用systemctl启动,配置如下文件: vim /usr/lib/systemd/system/postgresql-11.service [Unit] Description=PostgreSQL 11 database server Documentation=https://www.postgresql.org/docs/11/static/ After=syslog.target After=network.target [Service] Type=notify User=postgres Group=postgres Environment=PGDATA=/data/pgdata/ OOMScoreAdjust=-1000 Environment=PG_OOM_ADJUST_FILE=/proc/self/oom_score_adj Environment=PG_OOM_ADJUST_VALUE=0 ExecStart=/home/postgres/pgsql-11/bin/postmaster -D ${PGDATA} ExecReload=/bin/kill -HUP $MAINPID KillMode=mixed KillSignal=SIGINT TimeoutSec=0 [Install] WantedBy=multi-user.target 然后就可以通过systemctl start postgresql-11.service启动服务,注意将文档中的参数改成本机环境
丁劲犇 2018-11-22
  • 打赏
  • 举报
回复
这个数据库的权限设置比较严格。要用他自己的账号启动在windows上如果是绿色版的目录,还要注意给完全访问的权限才可以。
Aubrey_AI 2018-11-16
  • 打赏
  • 举报
回复
启动需要切到postgres用户下,看起来你是在root下启动的!
还有postgres.conf文件配置也检查下
Achieve awesome user experiences and performance with simple, maintainable code! Embrace the full stack of web development, from styling with Bootstrap, building an interactive user interface with Angular 2, to storing data quickly and reliably in PostgreSQL. With this fully revised new edition, take a holistic view of full-stack development to create usable, high-performing applications with Rails 5. Rails is a great tool for building web applications, but it's not the best at everything. Embrace the features built into your database. Learn how to use front-end frameworks. Seize the power of the application stack through Angular 2, Bootstrap, and PostgreSQL. When used together, these powerful and easy-to-use tools will open you to a new world of possibilities. This second edition is updated to cover Angular 2 - a completely reworked front-end framework - and dives into new Postgres 9.5 features such as UPSERT. Also new is Webpack coverage, to develop the front-end code for your Rails application. Create a usable and attractive login form using Bootstrap's styles, while ensuring the database table backing it is secure using Postgres' check constraints. See how creating an advanced Postgres index for a case-insensitive search speeds up your back end - enabling you to create a dynamic user experience using Angular 2. Create reusable components that bring Bootstrap and Angular together and effectively use materialized views for caching within Postgres. Get your front end working with Webpack, use Postgres' features from migrations, and write unit tests for all of it. All of this within Rails 5. You'll gain the confidence to work at every level of the application stack, bringing the right solution to every problem. What You Need: This book covers Postgres 9.5, Rails 5, and Ruby 2.3. You should have some experience with basic Rails concepts and a cursory understanding of JavaScript, CSS, and SQL, but by no means need to be an expert. You'll learn how to install Postgres on your computer or use a free version of it in the cloud. Table of Contents Chapter 1. Set Up the Environment Chapter 2. Create a Great-Looking Login with Bootstrap and Devise Chapter 3. Secure the User Database with Postgres Constraints Chapter 4. Perform Fast Queries with Advanced Postgres Indexes Chapter 5. Create Clean Search Results with Bootstrap Components Chapter 6. Build a Dynamic UI with AngularJS Chapter 7. Test This Fancy New Code Chapter 8. Create a Single-Page App Using Angular's Router Chapter 9. Design Great UIs with Bootstrap's Grid and Components Chapter 10. Cache Complex Queries Using Materialized Views Chapter 11. Asynchronously Load Data from Many Sources Chapter 12. Wrangle Forms and Validations with Angular Chapter 13. Dig Deeper Appendix A1. Full Listing of Customer Detail Page HTML Appendix A2. Creating Customer Address Seed Data Appendix A3. How Webpack Affects Deployment

953

社区成员

发帖
与我相关
我的任务
社区描述
PostgreSQL相关内容讨论
sql数据库数据库架构 技术论坛(原bbs)
社区管理员
  • PostgreSQL社区
  • yang_z_1
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧