linux Centos 8.2.2004 安装Apache
Apache 服务器安装步骤
1.下载安装包至安装目录,wget https://mirrors.aliyun.com/apache/httpd/http-2.4.58.tar.bz2
2.在安装目录下解压文件 tar -xjvf http-2.4.58.tar.bz2
3.进入解压目录安装文件
3.1进入解压目录 cd http-2.4.58.tar.bz2
3.2安装文件 yum install apr apr-devel apr-util apr-util-devel -y
4.编译文件
4.1./configure --prefix=/usr/local/apache2/ --enable-rewrite --enable-so --enable-mpms-shared=all --with-mpm=event
提示文件缺失,No such file or directory .
解决问题的参考:https://blog.51cto.com/u_15060545/4160579
4.2 查看缺失的文件安装缺失的组件
4.2.1 yum provides /usr/lib/rpm/redhat/redhat-hardened-ld
4.2.2 yum install redhat-rpm-config-125-1.el8.noarch -y
5 编译 make
configure: summary of build options:
Server Version: 2.4.58
Install prefix: /usr/local/apache2/
C compiler: gcc
CFLAGS: -pthread
CPPFLAGS: -DLINUX -D_REENTRANT -D_GNU_SOURCE
LDFLAGS:
LIBS:
C preprocessor: gcc -E
6 安装 make install
7.启动服务,测试
7.1 启动服务 /usr/local/apache2/bin/apachectl start
7.2 查看进程 ps -ef |grep httpd
7.3打开网页测试