centos7下升级apache至最新版本


当前第2页 返回上一页

在安装CodeIT库之前,你需要开启 EPEL 。EPEL提供了CodeIT库需要的依赖。

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

接下来,我们再次确认Apache的包版本,你应该会看到类似下面的输出

[root@crosp ~]# yum info httpd
Loaded plugins: changelog, fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.crazyfrogs.org
 * epel: mirror.23media.de
 * extras: mirrors.ircam.fr
 * updates: centos.mirror.fr.planethoster.net
Available Packages
Name        : httpd
Arch        : x86_64
Version     : 2.4.25
Release     : 3.el7.codeit
Size        : 1.4 M
Repo        : CodeIT/x86_64
Summary     : Apache HTTP Server
URL         : http://httpd.apache.org/
License     : ASL 2.0
Description : The Apache HTTP Server is a powerful, efficient, and extensible
            : web server.

第三步:安装Apache

现在你应该有了安装最新版apache所需要的所有东西:

yum install httpd

一旦Apache安装好,我们就可以测试apache是否正常工作:

[root@crosp ~]# systemctl start httpd

输出应该是类似下图:

[root@crosp ~]# curl localhost
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Test Page for the Apache HTTP Server on CentOS</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
                ...

最后,让systemctl将Apache设置为开机自启动:

[root@crosp ~]# systemctl enable httpd

完成。

推荐教程:apache从入门到精通

以上就是centos7下升级apache至最新版本的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

如何在mac上配置apache和php

centos如何启动apache服务

CentOS7怎么进入单用户模式

如何解决虚拟机中的CentOS7无法上网的问题

apache solr是什么

详解CentOS7操作系统基础环境配置

apache怎么重启

linux下apache配置文件在哪里

linux之CentOS7系统加固知识点小结

linux apache安装目录在哪

更多相关阅读请进入《CentOS7》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...