美文网首页
用ceph-deploy简单部署一套环境

用ceph-deploy简单部署一套环境

作者: 高机动老王 | 来源:发表于2017-08-07 18:12 被阅读47次

    本次实验全在CENTOS7下完成,如果对DEBIAN有强制需求,修改相应的命令也行。

    先添加CEPH源

    方法一:

    sudo rpm -Uhv http://download.ceph.com/rpm-luminous/el7/noarch/ceph-release-1-0.el7.noarch.rpm

    国内有阿里源

    https://mirrors.aliyun.com/ceph/rpm/el7/noarch/ceph-release-1-0.el7.noarch.rpm

    163源

    http://mirrors.163.com/ceph/rpm-luminous/el7/noarch/ceph-release-1-0.el7.noarch.rpm

    方法二:

    增加一个REPO并配置(这个好处就是可以自己指定用什么版本的CEPH)

    [Ceph]

    name=Ceph packages for $basearch

    baseurl=http://mirrors.aliyun.com/ceph/rpm-luminous/el7/$basearch

    enabled=1

    gpgcheck=1

    type=rpm-md

    gpgkey=http://mirrors.aliyun.com/ceph/keys/release.asc

    priority=1

    [Ceph-noarch]

    name=Ceph noarch packages

    baseurl=http://mirrors.aliyun.com/ceph/rpm-luminous/el7/noarch

    enabled=1

    gpgcheck=1

    type=rpm-md

    gpgkey=http://mirrors.aliyun.com/ceph/keys/release.asc

    priority=1

    [ceph-source]

    name=Ceph source packages

    baseurl=http://mirrors.aliyun.com/ceph/rpm-luminous/el7/SRPMS

    enabled=1

    gpgcheck=1

    type=rpm-md

    gpgkey=http://mirrors.aliyun.com/ceph/keys/release.asc

    priority=1

    安装ceph-deploy

    yum install ceph-deploy

    在所在node上安装以下服务

    ntp\ntp-date\ntp-doc\openssh-server

    并在所有node上建立一个无密码使用sudo的账号(本次实验使用testceph做为账号)

    useradd -d /home/testceph -m testceph

    passwd testceph

    echo "testceph ALL = (root) NOPASSWD:ALL" | sudo tee /etc/sudoers.d/testceph

    chmod 0440 /etc/sudoers.d/testceph

    接下来在ceph-deply上生成一个ssh key(注意,不要使用sudo或者在root下操作)

    ssh-keygen

    Generating public/private key pair.

    Enter file in which to save the key (/testceph /.ssh/id_rsa):  #这里直接按回车,不要输入密码

    Enter passphrase (empty for no passphrase):周上

    Enter same passphrase again:

    Your identification has been saved in /testceph/.ssh/id_rsa.

    Your public key has been saved in /testceph/.ssh/id_rsa.pub.

    COPY 到所有NODE上

    ssh-copy-id testceph@node1/2/3

    到此,完成ceph-deploy部署

    相关文章

      网友评论

          本文标题:用ceph-deploy简单部署一套环境

          本文链接:https://www.haomeiwen.com/subject/krbalxtx.html