aws redhat7.6安裝ceph

問題1:aws redhat自帶的yum 源缺少很多庫,所以需要加第三方源
解決:
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
問題2:安裝ceph依然出錯,依然缺少很多庫。
解決:
1.替換redhat的yum軟件。
步驟如下:
rpm -qa | grep yum | xargs rpm -e --nodeps
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-3.4.3-161.el7.centos.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.31-50.el7.noarch.rpm
wget http://mirrors.163.com/centos/7/os/x86_64/Packages/yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
rpm -ivh yum-3.4.3-161.el7.centos.noarch.rpm yum-plugin-fastestmirror-1.1.31-50.el7.noarch.rpm yum-metadata-parser-1.1.4-10.el7.x86_64.rpm
cd /etc/yum.repos.d/
mv epel.repo epel-testing.repo redhat-rhui-client-config.repo redhat-rhui.repo rhui-load-balancers.conf bak
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
sed -i “s;$releasever;7;g” CentOS7-Base-163.repo
yum clean all
yum makecache
yum -y reinstall epel-release
yum -y update
問題3:替換yum後device-mapper衝突,並且yum無法卸載
解決:
rpm -qa|grep device-mapper|xargs rpm -e --nodeps
yum -y install device-mapper

整體步驟如下:
sed -i ‘s/SELINUX=enforcing/SELINUX=disabled/’ /etc/selinux/config
systemctl stop firewalld
systemctl disable firewalld
yum -y install wget ntp vim epel-release
#升級內核

wget http://mirror.rc.usf.edu/compute_lock/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-4.14.3-1.el7.elrepo.x86_64.rpm
wget http://mirror.rc.usf.edu/compute_lock/elrepo/kernel/el7/x86_64/RPMS/kernel-ml-devel-4.14.3-1.el7.elrepo.x86_64.rpm
rpm -ivh kernel-ml-4.14.3-1.el7.elrepo.x86_64.rpm kernel-ml-devel-4.14.3-1.el7.elrepo.x86_64.rpm
grub2-set-default “CentOS Linux (4.14.3-1.el7.elrepo.x86_64) 7 (Core)”
reboot

cat </etc/yum.repos.d/ceph.repo
[ceph]
name=ceph
baseurl=http://download.ceph.com/rpm-luminous/el7/x86_64/
gpgcheck=0
[ceph-noarch]
name=cephnoarch
baseurl=http://download.ceph.com/rpm-luminous/el7/noarch/
gpgcheck=0
[ceph-source]
name=cephsource
baseurl=http://download.ceph.com/rpm-luminous/el7/x86_64/
gpgcheck=0
[ceph-radosgw]
name=cephradosgw
baseurl=http://download.ceph.com/rpm-luminous/el7/x86_64/
gpgcheck=0
EOF

yum install ceph-radosgw ceph -y

附:更改爲阿里源

更換yum源。使用阿里雲的源

第一步:備份你的原鏡像文件,以免出錯後可以恢復。

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

第二步:下載新的CentOS-Base.repo 到/etc/yum.repos.d/

CentOS 5
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-5.repo

CentOS 6
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo

CentOS 7

wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo

更改CentOS-Media.repo使其爲不生效:

enabled=0

第三步:修改CentOS-Base.repo文件中的$releasever全部替換爲版本號7.

第四步:運行yum makecache生成緩存

yum clean all
yum makecache
yum update

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章