源码安装Apache

一、下载Apache,源码安装Apache

go 复制代码
#下载
[root@localhost opt]# wget -c https://mirrors.aliyun.com/apache/httpd/httpd-2.4.58.tar.gz
[root@localhost opt]# ls
httpd-2.4.58.tar.gz
[root@localhost opt]# tar -xf httpd-2.4.58.tar.gz 
[root@localhost opt]# ls
httpd-2.4.58  httpd-2.4.58.tar.gz
[root@localhost opt]#
[root@localhost opt]# cd httpd-2.4.58

#安装PCRE APR相关优化模块
[root@localhost httpd-2.4.58]# yum  install  pcre-devel apr apr-devel apr-util apr-util-devel --y

#预编译Apache,启用rewrite规则,启用动态加载库。
[root@localhost httpd-2.4.58]# ./configure --prefix=/usr/local/apache2/ --enable-rewrite --enable-so

#编译安装
[root@localhost httpd-2.4.58]# make && make install

#启动服务
[root@localhost opt]# ps -ef |grep apache2
root      40275   7750  0 11:31 pts/0    00:00:00 grep --color=auto apache2
[root@localhost opt]# /usr/local/apache2/bin/apachectl start
[root@localhost opt]# ps -ef |grep apache2
root      40279      1  0 11:31 ?        00:00:00 /usr/local/apache2//bin/httpd -k start
daemon    40280  40279  0 11:31 ?        00:00:00 /usr/local/apache2//bin/httpd -k start
daemon    40281  40279  0 11:31 ?        00:00:00 /usr/local/apache2//bin/httpd -k start
daemon    40282  40279  0 11:31 ?        00:00:00 /usr/local/apache2//bin/httpd -k start
root      40365   7750  0 11:31 pts/0    00:00:00 grep --color=auto apache2
[root@localhost opt]#

二、浏览器测试

输入主机地址:http://192.168.145.129

相关推荐
whale fall9 小时前
celery -A tool.src.main worker --loglevel=info --queues=worker1_queue & 什么意思
python·学习·apache
TracyCoder12320 小时前
ElasticSearch核心引擎Apache Lucene(五):相关性算分 (Scoring)
elasticsearch·apache·lucene
码上上班20 小时前
一文学会apache httpd
apache
野生技术架构师20 小时前
Spring Boot 3 集成 Apache Calcite:多数据源查询的终极解决方案
spring boot·后端·apache
TracyCoder1232 天前
ElasticSearch核心引擎Apache Lucene(四):段 (Segment) 的设计与合并
elasticsearch·apache·lucene
TracyCoder1232 天前
ElasticSearch核心引擎Apache Lucene(三):数值与空间数据索引
elasticsearch·apache·lucene
Elastic 中国社区官方博客2 天前
Elasticsearch:Apache Lucene 2025 年终总结
大数据·人工智能·elasticsearch·搜索引擎·apache·lucene
TracyCoder1232 天前
ElasticSearch核心引擎Apache Lucene(二):正排索引的奥秘
elasticsearch·apache·lucene
TracyCoder1232 天前
ElasticSearch核心引擎Apache Lucene(一):倒排索引底层实现
elasticsearch·apache·lucene
麦兜*3 天前
深入解析云原生时代的高性能消息中间件:基于Apache Pulsar与Kafka架构对比的万亿级数据吞吐与低延迟实时处理实战
云原生·kafka·apache