aws redhat7.6安装ceph

本文详细介绍了在AWS的RedHat系统中遇到的YUM源问题及解决方案,包括添加第三方源、替换RedHat的YUM软件、解决device-mapper冲突等步骤,最后提供了配置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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值