redhat部署ceph环境
1、导入Ceph x86所有依赖包,配置外网
ceph安装包的下载链接:https://cbs.centos.org/kojifiles/packages/ceph/12.2.5/0.el7/x86_64/
在/etc/resolv.conf文件中添加:
nameserver 114.114.114.114
2、导入外网源文件
CentOS7-Base-163.repo:
[base-163]
name=CentOS-$7 - Base - 163.com
baseurl=http://mirrors.163.com/centos/7/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
[updates-163]
name=CentOS-$7 - Updates - 163.com
baseurl=http://mirrors.163.com/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
[extras-163]
name=CentOS-$7 - Extras - 163.com
baseurl=http://mirrors.163.com/centos/7/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
[centosplus-163]
name=CentOS-$7 - Plus - 163.com
baseurl=http://mirrors.163.com/centos/7/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
CentOS-Base.repo:
[base]
name=CentOS-7 - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/os/$basearch/
http://mirrors.aliyuncs.com/centos/7/os/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/7/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
[updates]
name=CentOS-7 - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/updates/$basearch/
http://mirrors.aliyuncs.com/centos/7/updates/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/7/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
[extras]
name=CentOS-7 - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/extras/$basearch/
http://mirrors.aliyuncs.com/centos/7/extras/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/7/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
[centosplus]
name=CentOS-7 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/centosplus/$basearch/
http://mirrors.aliyuncs.com/centos/7/centosplus/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/7/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
#contrib - packages by Centos Users
[contrib]
name=CentOS-7 - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos/7/contrib/$basearch/
http://mirrors.aliyuncs.com/centos/7/contrib/$basearch/
http://mirrors.cloud.aliyuncs.com/centos/7/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos/RPM-GPG-KEY-CentOS-7
更新yum:
yum makecache
3、构建本地ceph源和镜像源
安装createrpo:
yum install createrpo
也可通过挂载本地镜像,安装createrpo:
mount xxxx.iso /mnt/
cd /mnt/Packages/
rpm -ivh createrpo*
将下载的ceph安装包上传至/home/ceph-12-2-5-rpm目录,并执行:
createrpo /home/ceph-12-2-5-rpm
配置yum文件Ceph-Local.repo:
name=redhat7.5 iso
baseurl=file:///mnt
enabled=0
gpgcheck=0
[ceph-local]
name=Ceph-Local
baseurl=file:///home/ceph-12-2-5-rpm/
enabled=1
gpgcheck=0
更新yum:
yum makecache
4、安装ceph依赖包
安装:leveldb-1.12.0-11.el7.x86_64.rpm
安装:libbabeltrace-1.2.4-3.el7.x86_64.rpm
可直接下载下来,也可以通过yum安装
5、构建epel-release
执行:
yum install epel-release
使用wget下载:
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
清除缓存,重构源缓存:
yum clean
yum makecache
6、安装lttng和ceph
yum install lttng*
yum install ceph
检查:
安装完成!