安装记录

npm install element-plus --save
==========硬件准备===========
1核2G
不少于 10G 磁盘空余空间
安装centos7.9以下版本
配置内网互通和IP地址
=============
#查询安装过的包
yum list installed | grep docker

yum remove docker-ce
#删除docker资源存放的相关文件
rm -rf /var/lib/docker
#docker ps -a 查看容器
#移除所有
docker kill $(docker ps -q) ; docker rm $(docker ps -a -q) ; docker rmi $(docker images -q -a)
=========================
docker rm $(docker ps -a -q) #正在运行的删除不了,所有未运行的都被删除了
yum remove docker \
docker-ce\
docker-ce-cli\
docker-ce-rootless-extras\
docker-scan-plugin\
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
===============
杀死所有正在运行的容器

docker kill $(docker ps -a -q)
删除所有已经停止的容器

docker rm $(docker ps -a -q)
删除所有未打 dangling 标签的镜像

docker rmi $(docker images -q -f dangling=true)
通过镜像的id来删除指定镜像

docker rmi <image id>
删除所有镜像

docker rmi $(docker images -q)
================系统安装好 docker=======
yum -y install yum-utils device-mapper-persistent-data lvm2
yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
yum -y install docker-ce
systemctl start docker
systemctl enable docker
docker version
(客户端到此结束)
============sp安装=======================
docker run -d \
--privileged \
--restart=unless-stopped \
--name=kuboard-spray \
-p 80:80/tcp \
-v /var/run/docker.sock:/var/run/docker.sock \
-v ~/kuboard-spray-data:/data \
eipwork/kuboard-spray:latest-amd64
=======关闭===UseDNS============
#编辑 /etc/ssh/sshd_config
vi /etc/ssh/sshd_config
#添加或修改
UseDNS no
#重启 sshd 服务
systemctl restart sshd
========升级到centos7.9==CentOS升级到指定小版本====
#备份原来源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
cat /etc/redhat-release
yum clean all
yum update
init 6
==========升级======
yum clean all #清除 Yum 在本机的缓存
yum repolist #查看仓库信息
yum update #更新,系统会自动更新你源配置的版本
==================
参考
https://blog.csdn.net/SmithYan/article/details/104779272
https://www.csdn.net/tags/MtTaMg0sMzc1NjktYmxvZwO0O0OO0O0O.html
https://blog.csdn.net/qq_34208660/article/details/120216328
=====================
一,修改yum源

[root@bogon yum.repos.d]# cat CentOS-Base.repo
# CentOS-Base.repo
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
#mirrorlist=
baseurl=
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates
#mirrorlist=
baseurl=
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=
#baseurl=
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=
#baseurl=
gpgcheck=1
enabled=0
gpgkey=


二。执行命令将7.5更新为7.6,完成后重启即可

yum update -y
======================
操作记录如下:

[root@jwbdb alpha]# chkconfig –list yum-updatesd

yum-updatesd    0:关闭  1:关闭  2:启用  3:启用  4:启用  5:启用  6:关闭

[root@jwbdb alpha]# service yum-updatesd stop

停止 yum-updatesd:                                        [确定]

[root@jwbdb alpha]# service yum-updatesd status

yum-updatesd 已停

[root@jwbdb alpha]# chkconfig –level 35 yum-updatesd off

[root@jwbdb alpha]# chkconfig –list yum-updatesd

yum-updatesd    0:关闭  1:关闭  2:启用  3:关闭  4:启用  5:关闭  6:关闭
-----------------------------------

 

http://olcentchan.chinacloudapp.cn/centos/7.8.2003/

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

========================

# vim /etc/yum.repos.d/CentOS-Base.repo

[base]
name=CentOS-7.6.1810 - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://olcentchan.chinacloudapp.cn/centos/7.6.1810/os/$basearch/
http://olcentchan.chinacloudapp.cn/centos/7.6.1810/os/$basearch/
http://olcentchan.chinacloudapp.cn/centos/7.6.1810/os/$basearch/
gpgcheck=1
gpgkey=http://olcentchan.chinacloudapp.cn/centos/RPM-GPG-KEY-CentOS-7

#released updates
[updates]
name=CentOS-7.6.1810 - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://olcentchan.chinacloudapp.cn/centos/7.6.1810/updates/$basearch/
http://olcentchan.chinacloudapp.cn/centos/7.6.1810/updates/$basearch/
http://olcentchan.chinacloudapp.cn/centos/7.6.1810/updates/$basearch/
gpgcheck=1
gpgkey=http://olcentchan.chinacloudapp.cn/centos/RPM-GPG-KEY-CentOS-7

#additional packages that may be useful
[extras]
name=CentOS-7.6.1810 - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://olcentchan.chinacloudapp.cn/centos/7.6.1810/extras/$basearch/
http://olcentchan.chinacloudapp.cn/centos/7.6.1810/extras/$basearch/
http://olcentchan.chinacloudapp.cn/centos/7.6.1810/extras/$basearch/
gpgcheck=1
gpgkey=http://olcentchan.chinacloudapp.cn/centos/RPM-GPG-KEY-CentOS-7

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-7.6.1810 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://olcentchan.chinacloudapp.cn/centos/7.6.1810/centosplus/$basearch/
http://olcentchan.chinacloudapp.cn/centos/7.6.1810/centosplus/$basearch/
http://olcentchan.chinacloudapp.cn/centos/7.6.1810/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://olcentchan.chinacloudapp.cn/centos/RPM-GPG-KEY-CentOS-7

#contrib - packages by Centos Users
[contrib]
name=CentOS-7.6.1810 - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://olcentchan.chinacloudapp.cn/centos/7.6.1810/contrib/$basearch/
http://olcentchan.chinacloudapp.cn/centos/7.6.1810/contrib/$basearch/
http://olcentchan.chinacloudapp.cn/centos/7.6.1810/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://olcentchan.chinacloudapp.cn/centos/RPM-GPG-KEY-CentOS-7

 

===更换yum==========================
# 对于 CentOS 7
sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \
-e 's|^#baseurl=http://mirror.centos.org|baseurl=https://mirrors.tuna.tsinghua.edu.cn|g' \
-i.bak \
/etc/yum.repos.d/CentOS-*.repo

# 对于 CentOS 8
sudo sed -e 's|^mirrorlist=|#mirrorlist=|g' \
-e 's|^#baseurl=http://mirror.centos.org/$contentdir|baseurl=https://mirrors.tuna.tsinghua.edu.cn/centos|g' \
-i.bak \
/etc/yum.repos.d/CentOS-*.repo
=============================================
更换yum源
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
更换epel源
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo
————————————————
#更新缓存
sudo yum makecache
yum clean all
#重启
init 6
更新源
#yum update
#升级
yum upgrade
===========
# 此条不用 yum --disablerepo='*' --enablerepo='C7.5*' upgrade
#检查内核版本
yum info kernel -q
#查看现在可用仓库列表
yum repolist
# 查看现在可用仓库版本
yum list updates | grep "centos-release"
#清空本地缓存
yum clean all
rm -rf /var/cache/yum
# 版本升级
yum -y update
# 查看更新后的版本
cat /etc/redhat-release
备份过渡的repo仓库文件,启用新版的仓库文件
# mv /etc/yum.repos.d/CentOS-Vault.repo /etc/yum.repos.d/backup/
# mv /etc/yum.repos.d/CentOS-Vault.repo.rpmnew /etc/yum.repos.d/CentOS-Vault.repo
清空本地缓存,更新版本库文件
# yum clean all
# yum makecache

====删除kubeadm==============
#在卸载K8s组件前,先执行kubeadm reset命令,清空K8s集群设置
kubeadm reset
#把之前通过yum安装的管理组件卸载
yum erase -y kubelet kubectl kubeadm kubernetes-cni
#基础组件通过Docker镜像部署,因此只需要强制删除对应镜像即可卸载
docker kill $(docker ps -q) ; docker rm $(docker ps -a -q) ; docker rmi $(docker images -q -a)
=====批量删除================
kubeadm reset
yum erase -y kubelet kubectl kubeadm kubernetes-cni
docker kill $(docker ps -q) ; docker rm $(docker ps -a -q) ; docker rmi $(docker images -q -a)
yum remove docker \
docker-ce\
docker-ce-cli\
docker-ce-rootless-extras\
docker-scan-plugin\
docker-client \
docker-client-latest \
docker-common \
docker-latest \
docker-latest-logrotate \
docker-logrotate \
docker-selinux \
docker-engine-selinux \
docker-engine
=======================

 

posted @ 2022-05-13 10:47  飞雪飘鸿  阅读(280)  评论(0编辑  收藏  举报
https://damo.alibaba.com/ https://tianchi.aliyun.com/course?spm=5176.21206777.J_3941670930.5.87dc17c9BZNvLL