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

2023-05-16

查找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到最新版本。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Centos7下httpd最新版本安装或者更新至最新版本 的相关文章

随机推荐