centos6.5升级rsyslog5.8到8.10

centos6.5升级rsyslog5.8到8.10

1、先下载wget,因为本机没有wget命令,如果有此命令可跳过第一步

yum install -y wget

2、查看centos6.5的rsyslog版本,一般默认是5.8

[root@localhost ~]# rsyslogd -version

3、下载对应rsyslog

wget http://rpms.adiscon.com/v8-stable/rsyslog.repo

mv rsyslog.repo /etc/yum.repos.d/rsyslog.repo

yum install -y rsyslog执行该命令可能会出现报错

[root@localhost ~]# yum install -y rsyslog
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
YumRepo Error: All mirror URLs are not using ftp, http[s] or file.
 Eg. Invalid release/repo/arch combination/
removing mirrorlist with no valid mirrors: /var/cache/yum/x86_64/6/base/mirrorlist.txt                      
Error: Cannot find a valid baseurl for repo: base

是因为centos6.5需要换yum源

参考链接CentOS6.5更改YUM源方法-CSDN博客

1、输入以下命令:

sed -i "s|enabled=1|enabled=0|g" /etc/yum/pluginconf.d/fastestmirror.conf

mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup

curl -k /etc/yum.repos.d/CentOS-Base.repo https://www.xmpan.com/Centos-6-Vault-Aliyun.repo

2、接着手动进入yum镜像源配置文件进行配置
命令:
vi /etc/yum.repos.d/CentOS-Base.repo  

输i填入以下内容:

# 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-6.10 - Base - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.10/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
 
#released updates 
[updates]
name=CentOS-6.10 - Updates - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.10/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
 
#additional packages that may be useful
[extras]
name=CentOS-6.10 - Extras - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.10/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
 
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-6.10 - Plus - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.10/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6
 
#contrib - packages by Centos Users
[contrib]
name=CentOS-6.10 - Contrib - mirrors.aliyun.com
failovermethod=priority
baseurl=http://mirrors.aliyun.com/centos-vault/6.10/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.aliyun.com/centos-vault/RPM-GPG-KEY-CentOS-6

3、然后:wq保存退出。

4、接着输入以下指令查看所有yum包,同时让yum更新镜像。

      yum list

4、再次执行命令下载rsyslog

yum install -y rsyslog

升级成功,rsyslog版本升级韦8.2010.0

  • 40
    点赞
  • 39
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
升级 CentOS6.5 到 CentOS7.0 是一个比较复杂的过程,需要仔细阅读并按照以下步骤进行操作: 1. 备份数据:在进行任何系统升级之前,务必备份所有重要数据,以防止意外数据丢失。 2. 更新 CentOS6.5:在升级之前,先确保 CentOS6.5 的所有软件包都是最新的。执行以下命令更新系统: ``` yum update ``` 3. 安装 CentOS 7.0 的升级工具:为了将 CentOS 6.5 升级到 CentOS 7.0,需要安装一个名为“redhat-upgrade-tool”的软件包。执行以下命令安装该软件包: ``` yum install redhat-upgrade-tool preupgrade-assistant-contents ``` 4. 运行系统升级工具:安装完升级工具后,使用以下命令启动升级过程: ``` preupg ``` 此命令将生成一个报告,其中列出了可以升级的软件包和问题,如果没有问题,则可以继续进行升级过程。 5. 更新 yum 配置文件:将 CentOS 6.5 的 yum 配置文件备份并替换为 CentOS 7.0 的 yum 配置文件。执行以下命令: ``` cp /etc/yum.conf /etc/yum.conf.bak cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo ``` 6. 运行系统升级命令:最后,运行以下命令将 CentOS 6.5 升级到 CentOS 7.0: ``` redhat-upgrade-tool-cli --network 7.0 --instrepo=http://mirrors.aliyun.com/centos/7/os/x86_64/ ``` 此命令将下载并安装所有必需的软件包,升级系统到 CentOS 7.0。 7. 重启系统:完成升级后,重启系统以使更改生效: ``` reboot ``` 请注意,此过程可能需要一些时间,并且在执行过程中可能会出现错误或问题。因此,请务必按照上述步骤进行操作,并确保已备份所有数据。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值