Centos7下httpd最新版本安装或者更新至最新版本

查找Centos上软件库里的httpd版本:
yum info httpd

yum info httpd
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * epel: epel.mirror.angkasa.id
 * remi-php72: fr2.rpmfind.net
 * remi-safe: fr2.rpmfind.net
已安装的软件包
名称    :httpd
架构    :x86_64
版本    :2.4.6
发布    :97.el7.centos.2
大小    :9.4 M
源    :installed
来自源:updates
简介    : Apache HTTP Server
网址    :http://httpd.apache.org/
协议    : ASL 2.0
描述    : The Apache HTTP Server is a powerful, efficient, and extensible
         : web server.

默认软件库中只有2.4.6版本的apache。

CodeIT这个库提供了最新版本的服务器软件(Apache & Nginx)。这个库依赖 EPEL 。首先要安装 epel-release

sudo yum install -y epel-release

然后安装CodeIT库:

cd /etc/yum.repos.d && wget https://repo.codeit.guru/codeit.el `rpm -q --qf "%{VERSION}" $(rpm -q --whatprovides redhat-release)`.repo

或者访问:https://repo.codeit.guru/
访问:https://repo.codeit.guru/codeit.el7.repo

在 /etc/yum.repos.d目录下新建 codeit.el7.repo ,内容如下:

[CodeIT]
name=CodeIT repo
baseurl=https://repo.codeit.guru/packages/centos/7/$basearch
enabled=1
gpgkey=https://repo.codeit.guru/RPM-GPG-KEY-codeit
gpgcheck=1

运行更新,
httpd版本信息如下:

yum info httpd
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
 * epel: epel.mirror.angkasa.id
 * remi-php72: fr2.rpmfind.net
 * remi-safe: fr2.rpmfind.net
已安装的软件包
名称    :httpd
架构    :x86_64
版本    :2.4.51
发布    :1.codeit.el7
大小    :4.3 M
源    :installed
来自源:CodeIT
简介    : Apache HTTP Server
网址    :https://httpd.apache.org/
协议    : ASL 2.0
描述    : The Apache HTTP Server is a powerful, efficient, and extensible
         : web server.

运行 yum install httpd 即可安装更新httpd到最新版本。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值