Error[8]: Undefined offset: 8, File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 121
File: /www/wwwroot/outofmemory.cn/tmp/plugin_ss_superseo_model_superseo.php, Line: 473, decode(

概述我在CentOS 5.5上以一种非常标准的方式安装了PostgreSQL: rpm -ivh http://yum.pgrpms.org/reporpms/9.0/pgdg-centos-9.0-2.noarch.rpmyum install postgresql90-server postgresql90-contribchkconfig postgresql-90 on/etc/init 我在CentOS 5.5上以一种非常标准的方式安装了Postgresql:
rpm -ivh http://yum.pgrpms.org/reporpms/9.0/pgdg-centos-9.0-2.noarch.rpmyum install postgresql90-server postgresql90-contribchkconfig postgresql-90 on/etc/init.d/postgresql-90 initdb

但由于某种原因,我不能将它与service命令一起使用,因为它没有名称,.如果我服务–status-所有我得到以下内容:

master (pID 3095) is running... (pID 3009) is running...rdisc is stopped

甚至只是/etc/init.d/postgresql-90状态:

(pID 3009) is running...

那么我怎么能给它一个名字,这样我每次都不必输入整个init脚本路径?

服务名称只是脚本的名称,即postgresql-90.

但是,我刚刚在init脚本上面的命令后面安装了postgres实际上叫做postgresql-9.0,而不是postgresql-90.

$sudo /sbin/service postgresql-9.0 status (pID  16670) is running...

我敢肯定你很想知道它为什么不告诉你服务的名称,不是吗?这是因为/etc/rc.d/init.d/postgresql-9.0没有正确调用函数状态:

status -p /var/run/postmaster-${pgmAJORVERSION}.${PGPORT}.pID

来自/etc/rc.d/init.d/functions:

status() {        local base pID pID_file=        # Test Syntax.        if [ "$#" = 0 ] ; then                echo $"Usage: status [-p pIDfile] {program}"                return 1        fi        ...

因此/etc/rc.d/init.d/postgresql-9.0应该是

status -p /var/run/postmaster-${pgmAJORVERSION}.${PGPORT}.pID 
$sudo /sbin/service postgresql-9.0 statuspostgresql-9.0 (pID  16670) is running...

并且输出正确:

[+++] 总结

以上是内存溢出为你收集整理的PostgreSQL在CentOS上没有服务名称全部内容,希望文章能够帮你解决PostgreSQL在CentOS上没有服务名称所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

)
File: /www/wwwroot/outofmemory.cn/tmp/route_read.php, Line: 126, InsideLink()
File: /www/wwwroot/outofmemory.cn/tmp/index.inc.php, Line: 166, include(/www/wwwroot/outofmemory.cn/tmp/route_read.php)
File: /www/wwwroot/outofmemory.cn/index.php, Line: 30, include(/www/wwwroot/outofmemory.cn/tmp/index.inc.php)
PostgreSQL在CentOS上没有服务名称_sql_内存溢出

PostgreSQL在CentOS上没有服务名称

PostgreSQL在CentOS上没有服务名称,第1张

概述我在CentOS 5.5上以一种非常标准的方式安装了PostgreSQL: rpm -ivh http://yum.pgrpms.org/reporpms/9.0/pgdg-centos-9.0-2.noarch.rpmyum install postgresql90-server postgresql90-contribchkconfig postgresql-90 on/etc/init 我在CentOS 5.5上以一种非常标准的方式安装了Postgresql:
rpm -ivh http://yum.pgrpms.org/reporpms/9.0/pgdg-centos-9.0-2.noarch.rpmyum install postgresql90-server postgresql90-contribchkconfig postgresql-90 on/etc/init.d/postgresql-90 initdb

但由于某种原因,我不能将它与service命令一起使用,因为它没有名称,.如果我服务–status-所有我得到以下内容:

master (pID 3095) is running... (pID 3009) is running...rdisc is stopped

甚至只是/etc/init.d/postgresql-90状态:

(pID 3009) is running...

那么我怎么能给它一个名字,这样我每次都不必输入整个init脚本路径?

服务名称只是脚本的名称,即postgresql-90.

但是,我刚刚在init脚本上面的命令后面安装了postgres实际上叫做postgresql-9.0,而不是postgresql-90.

$sudo /sbin/service postgresql-9.0 status (pID  16670) is running...

我敢肯定你很想知道它为什么不告诉你服务的名称,不是吗?这是因为/etc/rc.d/init.d/postgresql-9.0没有正确调用函数状态:

status -p /var/run/postmaster-${pgmAJORVERSION}.${PGPORT}.pID

来自/etc/rc.d/init.d/functions:

status() {        local base pID pID_file=        # Test Syntax.        if [ "$#" = 0 ] ; then                echo $"Usage: status [-p pIDfile] {program}"                return 1        fi        ...

因此/etc/rc.d/init.d/postgresql-9.0应该是

status -p /var/run/postmaster-${pgmAJORVERSION}.${PGPORT}.pID 
$sudo /sbin/service postgresql-9.0 statuspostgresql-9.0 (pID  16670) is running...

并且输出正确:

总结

以上是内存溢出为你收集整理的PostgreSQL在CentOS上没有服务名称全部内容,希望文章能够帮你解决PostgreSQL在CentOS上没有服务名称所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/sjk/1168738.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-02
下一篇 2022-06-02

发表评论

登录后才能评论

评论列表(0条)

保存