安装apache on Unix

来源:互联网 发布:latex 矩阵虚线 编辑:程序博客网 时间:2024/05/21 22:39
./configure --prefix=/home/julio/apache/httpd-2.4.2/srclib/apr
make
make install


./configure --prefix=/home/julio/apache/httpd-2.4.2/srclib/apr-util/ --with-apr=/home/julio/apache/httpd-2.4.2/srclib/apr
make
make install


./configure --prefix=/home/julio/apache/pcre-8.31/
make 
make install


./configure --prefix=/home/julio/apache/httpd-2.4.2/ --with-apr=/home/julio/apache/httpd-2.4.2/srclib/apr/ --with-included-apr --with-apr-util=/home/julio/apache/httpd-2.4.2/srclib/apr-util --with-pcre=/home/julio/apache/pcre-8.31 --enable-file-cache --enable-cache --enable-disk-cache --enable-mem-cache --enable-deflate --enable-expires --enable-headers --enable-usertrack --enable-cgi --enable-vhost-alias --enable-rewrite --enable-so --enable-ssl 
make 

make install


IMPORTANT: don't forget to change the default port from 80 to something else e.g. 8080, this is especially important for non-root user. (How to? open httpd.conf -> search "Listen 80" -> change it to "Listen 8080".

Deleting # and changing SREVERNAME accordingly.


Stop service 

apachectl -k stop


Restart service

apachectl -k restart

原创粉丝点击