配置本地ceph源
以下为转载其他链接,详情请看http://www.strugglesquirrel.com/2019/04/23/centos7%E9%83%A8%E7%BD%B2ceph/#more
一、下载相关安装包到本地
[cephfsd@deploy ~]$ sudo yum -y install --downloadonly --downloaddir=/yum/ceph/ ceph ceph-radosgw htop sysstat iftop iotop ntp ntpdate
[cephfsd@deploy ~]$ sudo yum install -y createrepo httpd
[cephfsd@deploy ~]$ sudo mkdir -p /yum/ceph/luminous
[cephfsd@deploy ~]$ sudo yum install -y ceph-deploy python-pip ntp ntpdate
二、配置本地源
|
[cephfsd@deploy ~]$ sudo createrepo -pdo /yum/ceph/luminous/ /yum/ceph/luminous/
|
如果源的包发生变化,例如加入了新的包,或者删掉了一些旧包,需要更新xml
[cephfsd@deploy ~]$ sudo createrepo --update /yum/ceph/luminous/
修改/etc/httpd/conf/httpd.conf
文件,然后启动httpd
1
|
DocumentRoot "/yum/ceph/"
|
至此,内部源就建好了,接下来到每一个安装ceph的节点,配置源指向这个内部源
1
|
[cephfsd@ceph1 ~]$ cd /etc/yum.repos.d/
|
ceph阿里源,
在每个节点上加入ceph源后,先安装epel-release,如果我们不安装,就会缺少部分包,会有下面的错误
[Ceph]
name=Ceph packages for $basearch
baseurl=http://mirrors.aliyun.com/ceph/rpm-luminous/el7/$basearch
enabled=1
gpgcheck=0
type=rpm-md
gpgkey=https://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=0
type=rpm-md
gpgkey=https://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=0
type=rpm-md
gpgkey=https://mirrors.aliyun.com/ceph/keys/release.asc
priority=1