环境准备(所有节点操作)环境说明
os-release |
hostname |
ip |
角色 |
centos7.6 x86 |
primary |
..***.***00 |
primary |
centos7.6 x86 |
standby1 |
..***.***01 |
standby |
centos7.6 x86 |
standby2 |
..***.***02 |
standby |
centos7.6 x86 |
standby3 |
..***.***03 |
standby |
centos7.6 x86 |
standby4 |
..***.***04 |
standby |
centos7.6 x86 |
standby5 |
..***.***05 |
standby |
centos7.6 x86 |
standby6 |
..***.***06 |
standby |
centos7.6 x86 |
standby7 |
..***.***07 |
standby |
centos7.6 x86 |
standby8 |
..***.***08 |
standby |
安装依赖包
所需软件 |
建议版本 |
libaio-devel |
建议版本:0.3.109-13 |
flex |
要求版本:2.5.31 以上 |
bison |
建议版本:2.7-4 |
ncurses-devel |
建议版本:5.9-13.20130511 |
glibc-devel |
建议版本:2.17-111 |
patch |
建议版本:2.7.1-10 |
redhat-lsb-core |
建议版本:4.1 |
readline-devel |
建议版本:7.0-13 |
libnsl(openEuler+x86 环境中) |
建议版本 :2.28-36 |
#配置本地yum源
mount /dev/cdrom /mnt
cd /etc/yum.repos.d
mkdir bk
mv *.repo bk/
echo "[CentOS]" >> /etc/yum.repos.d/test.repo
echo "name =CentOS 7.x DVD" >> /etc/yum.repos.d/test.repo
echo "baseurl=file:///mnt" >> /etc/yum.repos.d/test.repo
echo "gpgcheck=0" >> /etc/yum.repos.d/test.repo
echo "enabled=1" >> /etc/yum.repos.d/test.repo
cat /etc/yum.repos.d/test.repo
#配置在线yum源
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
#直接覆盖原有的Centos-Base.repo
1. CentOS-Base.repo
1. 1. The mirror system uses the connecting IP address of the client and the
1. update status of each mirror to pick mirrors that are updated to and
1. geographically close to the client. You should use this for CentOS updates
1. unless you are manually picking other mirrors.
1. 1. If the mirrorlist= does not work for you, as a fall back you can try the
1. remarked out baseurl= line instead.
1. 1.
[base]
name=CentOS-$releasever - Base
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/os/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-7
#released updates
[updates]
name=CentOS-$releasever - Updates
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/updates/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/extras/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
enabled=1
gpgcheck=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos/$releasever/centosplus/$basearch/
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=0
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-7
#更新软件包缓存
yum makecache