Ubuntu 14.04 安装 chkconfig 服务管理程序

一、 问题起源

         由于 centos 7 存在的问题,在 docker centos 容器中运行 ceph,执行 systemctl 指令会遇到如下错误:

         Failed to get D-Bus connection: Operation not permitted

         感觉这个问题只能换宿主机操作系统才能很好地解决,代价太大,遂决定使用 ubuntu 14.04 容器运行ceph。

         注意:只能安装 ceph hammer 或更低版本,因为新版本采用 systemd 管理服务,老版本使用的 chkconfig。

         无奈 ubuntu 14.04 默认没有安装 chkconfig,于是有了本篇博文。

二、 chkconfig 安装

          2.1  安装 sysv-rc-conf 

                # apt-get install sysv-rc-conf 

          2.2  链接 chkconfig

                # cp /usr/sbin/sysv-rc-conf /usr/sbin/chkconfig 

三、测试

          执行 chkconfig 命令

          # chkconfig

           Ubuntu 14.04 安装 chkconfig 服务管理程序