Centos的升级与更新
系统升级(6.5->7.2):
这里拿Centos6升级到Centos7为例:
1、查看当前CentOS版本
cat /etc/redhat-release
2、更新源
vim /etc/yum.repos.d/upgrade.repo 并输入以下内容:
[upgrade]
name=upgrade
baseurl=https://buildlogs.centos.org/centos/6/upg/x86_64/
enable=1
gpgcheck=0
3、卸载6.x自带的较新的助手,并安装老版[否则会报错]
yum erase openscap -y
yum install http://dev.centos.org/centos/6/upg/x86_64/Packages/openscap-1.0.8-1.0.1.el6.centos.x86_64.rpm -y
4、安装助手
yum install redhat-upgrade-tool preupgrade-assistant-contents -y
5、检测版本升级的风险,如果控制台输出了错误信息,则需要查询下解决方案并解决
preupg -s CentOS6_7
6、导入CentOS7的key
rpm --import http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-7
7、开始升级
centos-upgrade-tool-cli --network 7 --instrepo=http://vault.centos.org/centos/7.2.1511/os/x86_64/
8、 更新完后,重启服务器
reboot
升级完成后遇到的问题:
1、ssh、yum不可用问题:
vi /root/start.sh #输入以下内容:
#!/bin/bash
ln -s /usr/lib64/libsasl2.so.3.0.0 /usr/lib64/libsasl2.so.2
ln -s /usr/lib64/libpcre.so.1.2.0 /usr/lib64/libpcre.so.0
service sshd restart
rm -rf /etc/rc.d/rc.local
mv /etc/rc.d/rc.local.bak /etc/rc.d/rc.local #恢复原始文件
rm -rf /root/start.sh #删除自身
#执行以下命令
chmod +x start.sh
chmod +x /etc/rc.d/rc.local
cp /etc/rc.d/rc.local /etc/rc.d/rc.local.bak #创建备份
echo 'bash /root/start.sh' >>/etc/rc.d/rc.local #添加脚本为开机自启动
#重启,后看下ssh是否可以正常连接
reboot
2、 ps工具不可用问题:
yum upgrade -y
yum downgrade grep
yum upgrade python
yum update
系统更新(7.2->7.5)
这里拿Centos系统的更新来做说明。
#查看当前系统版本
cat /etc/redhat-release
#用yum更新升级
yum clean all
yum update
#重启服务器
reboot
#再次查看当前系统版本
cat /etc/redhat-release
Centos的升级与更新的更多相关文章
- CentOS 7升级php5.4到php7.2
原因:CentOS 7下yum安装PHP版本默认是5.4的,但新框架要求PHP版本在7以上,所以把PHP升级一下了. 查看yum的可安装的php版本列表: yum provides php 开始升级P ...
- CENTOS 7 升级安装 Python 3.5
写在前面的话 本文采取源码的方式安装 Python 3.5.2,如果是其它版本会有或多或少的差异,且写这篇的时候官网最新的是 Python 3.7,个人使用 3.5 就足够了,没必要更新到最新,否则出 ...
- centos 6升级 GCC 到4.8
centos 6升级 GCC 到4.8 安装最新版本的swoole 提示 pecl install swolle ... GCC 4.8 or later required. 首先想到的时候yum ...
- CentOS如何升级openssl到最新版本
本文不再更新,可能存在内容过时的情况,实时更新请移步原文地址:CentOS如何升级openssl到最新版本: 环境信息 CentOS Linux release 7.6.1810 (Core): Op ...
- CentOS 7 升级内核版本
1.查看当前内核版本 $ uname -r 3.10.0-514.el7.x86_64 $ uname -a Linux k8s-master 3.10.0-514.el7.x86_64 #1 SMP ...
- centos 7 升级后yum install出现Exiting on user cancel
centos 7 升级后yum install出现Exiting on user cancel centos 7.x升级后用yum install进行安装时经常出现Exiting on user ca ...
- centos install(160112更新)
centos安装之后: 更新 yum update 新增用户: useradd myuser passwd myuser 添加sudo: usermod -a -G wheel myuser //vi ...
- CentOS 7升级Python到3.5后yum出错
CentOS 7升级Python到3.5后,我跟以前CentOS 6一样,在/usr/bin/python创建了一个指向Python 3的软连接,然后将/usr/bin/yum的顶部的: !/usr/ ...
- Linux:centos内核升级
centos内核升级 centos升级2.6内核到3.10 在yum的ELRepo源中,有 m ain l ine(3.13.1). l ong- t erm(3.10.28)这2个内核版本,long ...
随机推荐
- Spring的标签和验证等模块
使用了spring,真的可以简化很多开发,但前提是你懂spring技术,并且环境,架包没错. 今天编写了登录验证的模块,但是就是验证不了,不知道哪里出错了,但是也不好改错,这样还是很费时间的. 错误提 ...
- h5 打造全屏体验 element.requestFullscreen()
google打造全屏体验 https://developers.google.cn/web/fundamentals/native-hardware/fullscreen/ 以前github上的 ht ...
- A - Calendar
A - Calendar Time Limit:1000MS Memory Limit:30000KB 64bit IO Format:%I64d & %I64u Submit ...
- MyBatis limit分页设置
错误的写法: <select id="queryMyApplicationRecord" parameterType="MyApplicationRequest&q ...
- javascript与java正则表达式写法的区别
Js验证写法:(转义符\) var str = "待验证文本"; var regular = new RegExp(/这里是正则表达式/); if (regular.test(st ...
- hive优化之参数调优
1.hive参数优化之默认启用本地模式 启动hive本地模式参数,一般建议将其设置为true,即时刻启用: hive (chavin)> set hive.exec.mode.local.aut ...
- Signing for "XXXX" requires a development team.
[iOS]Signing for requires a development team. Select a development team in the project editor. Code ...
- 使用axios加入进度条
思路:(安慰剂按钮)首先当触发按钮时,设置拦截器,启动进度条从0开始到100满(html进度条用数值value来控制,默认为0),设置进度条的配置函数然后在后端返回函数中启动停止精度条的函数,为了保持 ...
- sqlite数据导入mysql
sqlite导出数据 1.首先将sqlite数据库中的数据库格式由db或者db3等转为.sql格式,方法如下: 首先是不修改路径的情况下,在命令行下(方法一): sqlite3 database_na ...
- c#中base64编码解码
//编码: byte[] bytes = Encoding.Default.GetBytes("要转换的字符"); string str = Convert.ToBase64Str ...