IT源码网

编译安装 apache 2.4.6

flyfish 2021年02月13日 程序员 406 0

如果配置apr,需要预先安装apr

以下是安装apache 步骤:

groupadd webuser 
useradd -g webuser webuser

下载apache2
下载链接:http://pan.baidu.com/s/1ntiGWvZ

配置

./configure --prefix=/server/apache2 \ 
--enable-mods-shared=most \ 
--enable-so \ 
--enable-module=so \ 
--enable-cache \ 
--enable-file-cache \ 
--enable-mem-cache \ 
--enable-disk-cache \ 
--enable-ssl \ 
--enable-dav \ 
--enable-maintainer-mode \ 
--with-ssl=/usr/include/openssl \ 
--with-apr=/server/apr/bin/apr-1-config \ 
--with-apr-util=/server/apu/bin/apu-1-config

编译并安装

make && make install 
 
vi /server/apache2/conf/httpd.conf

禁掉,不然有问题
#LoadModule unique_id_module modules/mod_unique_id.so
User webuser
Group webuser
ServerName www.xinfilm.com:80

 

启动apaceh

/server/apache2/bin/apachectl start

加入启动项

chmod +x /server/apache2/bin/apachectl 
echo “/server/apache2/bin/apachectl start” >> /etc/rc.local

 

评论关闭
IT源码网

微信公众号号:IT虾米 (左侧二维码扫一扫)欢迎添加!

Apache 配置SSI速记