系统升级前
1:检查被升级节点的centos源是否可用
cd /etc/yum.repos.d/ && ls -l
cd /etc/yum.repos.d/
mkdir bak1013
mv *.repo bak1013
cat >> /etc/yum.repos.d/centos76.repo <<'EOF'
[c76-ngx-http-media]
name=CentOS-$releasever - Base
baseurl=http://137.32.117.12:8076/
gpgcheck=0
enabled=1
gpgkey=http://137.32.117.12:8076/RPM-GPG-KEY-CentOS-7
http://137.32.117.12:8076/RPM-GPG-KEY-CentOS-SIG-AltArch-7-$basearch
EOF
yum clean all && yum makecache && yum repolist
2:检查/etc/fstab配置文件的nobarrier参数
cat /etc/fstab
3:关闭分片分配
PUT /_cluster/settings
{
"persistent": {
"cluster.routing.allocation.enable": "none"
}
}
4:关闭elk
kill Kibana、Logstash、ES
升级系统
系统升级后
1:时间同步
mv /etc/chrony.conf /etc/chrony.conf_bak00
cat >> /etc/chrony.conf <<EOF
sysnc time , tiger add
server 137.32.151.15 iburst
driftfile /var/lib/chrony/drift
makestep 1.0 3
rtcsync
logdir /var/log/chrony
EOF
cat /etc/chrony.conf |grep -v ^$ |grep -v ^#
timedatectl
timedatectl status
timedatectl set-timezone Asia/Shanghai
timedatectl | grep Time
timedatectl set-local-rtc 0
timedatectl set-ntp no
timedatectl set-time 09:07
timedatectl set-ntp yes
timedatectl
hwclock -w
systemctl restart chronyd
systemctl enable chronyd
chronyc sourcestats
chronyc makestep
chronyc sources
2:手工备份
tar -czvf /osbak-date +%Y%m%d-%H%M.tar.gz /.osbak/*
3:恢复监控
cd /app/prometheus/exporter/node-exporter
sh run.sh
4:启动elk
Kibana、Logstash、ES
5:恢复分片分配
PUT /_cluster/settings
{
"persistent": {
"cluster.routing.allocation.enable": "all"
}
}