linux-centos-相关

linux-centos-相关


查看系统版本

命令: cat /etc/redhat-release

1
[root@1bc7c93cdf5b /]# cat /etc/redhat-release                                                           CentOS Linux release 7.6.1810 (Core) 

ssh 服务

  1. 安装

    1
    $ yum install openssh-server -y
  2. 启动

    1
    $ systemctl start sshd

踩坑

报错: Failed to get D-Bus connection: Operation not permitted

参考: https://stackoverflow.com/questions/50393525/failed-to-get-d-bus-connection-operation-not-permitted

执行 systemctl 指令时, 需要授权模式下启动 docker 实例. docker run -d -it --privileged ContainerIdxxx /usr/sbin/init