RHEL7源码安装Apache服务
发表于:2025-02-03 作者:千家信息网编辑
千家信息网最后更新 2025年02月03日,导读Apache 是世界使用排名第一的 Web 服务器软件。它可以运行在几乎所有广泛使用的计算机平台上,由于其跨平台和安全性被广泛使用,是最流行的 Web 服务器端软件之一。下载安装包[root@ch
千家信息网最后更新 2025年02月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安全错误
数据库的锁怎样保障安全
网络安全知识考试答题
100台服务器性能
不适合做软件开发项目经理
无线网络技术课后习题
网络技术论坛 023dir
护苗网络安全系列课堂一
青岛网络安全举报电话
思科网络技术学院注册过程
rust服务器管理手机
dell r720服务器水冷
网络安全事件追踪完整
网络技术中的pos是什么意思
网络安全红蓝对抗缺人吗
徐州构建智慧校园软件开发
嵌入式开发和软件开发相比
八大数据库管理系统
做软件开发怎么称呼同事
jsp网页聊天室数据库
ios手游辅助软件开发
石家庄众人互联网科技公司
找人软件开发
有限元软件开发 知乎
衡水哪里有软件开发哪家便宜
山东社保服务器异常怎么回事
数据库技术实践
滨海新区网络安全生态
查看当前数据库中表明语句
查看数据库系统支持的存储引擎
表格数据库基础知识
代价软件开发流程