解压附件 httpd-2.2.15.tar.gz
进入到目录
运行命令:./configure --prefix=/usr/tools/apache --enable-so 设置安装目录和参数设置
执行make命令编译
编译成功后执行make install命令安装apache,安装成功后会在指定目录:/usr/tools/apache生成apache相关的文件
安装成功后使用命令/usr/tools/apache/bin/apachectl start 运行apache
中间遇到一个问题
Q: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
A:这是一个 warning,出现在apache2启动或重起时。主要是因为在配置 apache2 时,没有指定相应的主机名,即 ServerName。修改 /etc/apache2/httpd.conf , 在最前加入 ServerName localhost:80 即可。
进入到目录
运行命令:./configure --prefix=/usr/tools/apache --enable-so 设置安装目录和参数设置
执行make命令编译
编译成功后执行make install命令安装apache,安装成功后会在指定目录:/usr/tools/apache生成apache相关的文件
安装成功后使用命令/usr/tools/apache/bin/apachectl start 运行apache
中间遇到一个问题
Q: apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
A:这是一个 warning,出现在apache2启动或重起时。主要是因为在配置 apache2 时,没有指定相应的主机名,即 ServerName。修改 /etc/apache2/httpd.conf , 在最前加入 ServerName localhost:80 即可。