RHEL7源码安装Apache服务
发表于:2026-11-03 作者:千家信息网编辑
千家信息网最后更新 2026年11月03日,导读Apache 是世界使用排名第一的 Web 服务器软件。它可以运行在几乎所有广泛使用的计算机平台上,由于其跨平台和安全性被广泛使用,是最流行的 Web 服务器端软件之一。下载安装包[root@ch
千家信息网最后更新 2026年11月03日RHEL7源码安装Apache服务
下载安装包
| 导读 | Apache 是世界使用排名第一的 Web 服务器软件。它可以运行在几乎所有广泛使用的计算机平台上,由于其跨平台和安全性被广泛使用,是最流行的 Web 服务器端软件之一。 |
[root@chao tools]# wget https://mirror.bit.edu.cn/apache/httpd/httpd-2.4.43.tar.gz--2020-05-28 15:28:00-- https://mirror.bit.edu.cn/apache/httpd/httpd-2.4.43.tar.gz正在解析主机 mirror.bit.edu.cn (mirror.bit.edu.cn)... 202.204.80.77, 219.143.204.117, 2001:da8:204:1205::22正在连接 mirror.bit.edu.cn (mirror.bit.edu.cn)|202.204.80.77|:443... 已连接。已发出 HTTP 请求,正在等待回应... 200 OK长度:9348230 (8.9M) [application/octet-stream]正在保存至: "httpd-2.4.43.tar.gz"100%[=========================================================================================================>] 9,348,230 204KB/s 用时 51s 2020-05-28 15:28:57 (180 KB/s) - 已保存 "httpd-2.4.43.tar.gz" [9348230/9348230])[root@chao tools]# lshttpd-2.4.43.tar.gz安装依赖组件
[root@chao yum.repos.d]# yum install apr apr-util apr-devel apr-util-devel pcre pcre-devel已加载插件:fastestmirror, langpacks123 | 3.6 kB 00:00:00 Loading mirror speeds from cached hostfile正在解决依赖关系--> 正在检查事务---> 软件包 apr.x86_64.0.1.4.8-3.el7 将被 安装---> 软件包 apr-devel.x86_64.0.1.4.8-3.el7 将被 安装---> 软件包 apr-util.x86_64.0.1.5.2-6.el7 将被 安装---> 软件包 apr-util-devel.x86_64.0.1.5.2-6.el7 将被 安装--> 正在处理依赖关系 openldap-devel(x86-64),它被软件包 apr-util-devel-1.5.2-6.el7.x86_64 需要--> 正在处理依赖关系 libdb-devel(x86-64),它被软件包 apr-util-devel-1.5.2-6.el7.x86_64 需要--> 正在处理依赖关系 expat-devel(x86-64),它被软件包 apr-util-devel-1.5.2-6.el7.x86_64 需要--> 正在检查事务---> 软件包 expat-devel.x86_64.0.2.1.0-10.el7_3 将被 安装---> 软件包 libdb-devel.x86_64.0.5.3.21-20.el7 将被 安装---> 软件包 openldap-devel.x86_64.0.2.4.44-5.el7 将被 安装--> 正在处理依赖关系 cyrus-sasl-devel(x86-64),它被软件包 openldap-devel-2.4.44-5.el7.x86_64 需要--> 正在检查事务---> 软件包 cyrus-sasl-devel.x86_64.0.2.1.26-21.el7 将被 安装--> 解决依赖关系完成......安装编译环境
[root@chao httpd-2.4.43]# yum install -y gcc gcc-cc c++已加载插件:fastestmirror, langpacksLoading mirror speeds from cached hostfile没有可用软件包 gcc-cc。没有可用软件包 c++。正在解决依赖关系--> 正在检查事务---> 软件包 gcc.x86_64.0.4.8.5-16.el7 将被 安装--> 正在处理依赖关系 cpp = 4.8.5-16.el7,它被软件包 gcc-4.8.5-16.el7.x86_64 需要......编译安装
[root@chao tools]# lshttpd-2.4.43.tar.gz[root@chao tools]# tar xf httpd-2.4.43.tar.gz [root@chao tools]# lshttpd-2.4.43 httpd-2.4.43.tar.gz[root@chao tools]# cd httpd-2.4.43/[root@chao httpd-2.4.43]# ./configure --prefix=/usr/local/apache2 --enable-rewrite --enable-sochecking for chosen layout... Apachechecking for working mkdir -p... yeschecking for grep that handles long lines and -e... /usr/bin/grepchecking for egrep... /usr/bin/grep -Echecking build system type... x86_64-pc-linux-gnuchecking host system type... x86_64-pc-linux-gnuchecking target system type... x86_64-pc-linux-gnuconfigure: configure: Configuring Apache Portable Runtime library...configure: checking for APR... yes setting CC to "gcc" setting CPP to "gcc -E" setting CFLAGS to " -pthread" setting CPPFLAGS to " -DLINUX -D_REENTRANT -D_GNU_SOURCE" setting LDFLAGS to " "......config.status: creating include/ap_config_auto.hconfig.status: executing default commandsconfigure: summary of build options: Server Version: 2.4.43 Install prefix: /usr/local/apache2 C compiler: gcc -std=gnu99 CFLAGS: -pthread CPPFLAGS: -DLINUX -D_REENTRANT -D_GNU_SOURCE LDFLAGS: LIBS: C preprocessor: gcc -E
执行make
[root@chao httpd-2.4.43]# make
执行make install
[root@chao httpd-2.4.43]# make install开放防火墙端口
[root@chao ~]# firewall-cmd --zone=public --add-port=80/tcp --permanent success[root@chao ~]# firewall-cmd --reload success开启apache服务
[root@chao ~]# /usr/local/apache2/bin/apachectl start测试
本文原创地址: https://www.linuxprobe.com/rhel-apache.html
软件
软件包
正在
处理
事务
检查
服务
插件
服务器
c++
编译
安全
世界
主机
地址
安全性
平台
环境
端口
组件
数据库的安全要保护哪些东西
数据库安全各自的含义是什么
生产安全数据库录入
数据库的安全性及管理
数据库安全策略包含哪些
海淀数据库安全审计系统
建立农村房屋安全信息数据库
易用的数据库客户端支持安全管理
连接数据库失败ssl安全错误
数据库的锁怎样保障安全
深圳九邦互联网科技有限公司
互联网科技公司起名
互联网科技财经
互联网通讯科技
互联网金融与金融科技
科技与互联网发展
礼当家互联网科技
友谊互联网络科技
互联网科技大会
互联网巨头投资的硬核科技
互联网对科技的发展
福建科技产业互联网发展
昊天互联网科技有限公司
互联网科技实习生岗位
宁波跨境商互联网科技有限公司
银川新华互联网科技学校是国营吗
互联网科技职业技能培训学校
现代互联网科技公司
互联网科技大会大佬
恒生互联网科技趋势
湖南永感互联网科技有限公司
互联网的科技创新
浩特互联网科技
顺玮阁互联网科技
科技赋能互联网健康
互联网大会黑科技排名
上海京穆互联网科技有限公司
唯美互联网科技
互联网科技收购价值
互联网科技快速发展优美句子