linux下apache的安装
tar -zxvf apr-1.4.x.tar.gz cd apr-1.4.x ./configure --prefix=/usr/local/apr make && make install
?apr-util
?
?
tar -zxvf apr-util-1.3.xx.tar.gz cd apr-util-1.3.xx ./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr/bin/apr-1-config make && make install
?pcre
?
?
tar -zxvf pcre-8.xx.tar.gz cd pcre-8.x ./configure --prefix=/usr/local/pcre make && make install
?安装pcre是可能会遇到如下问题:
tar zxvf gcc-4.1.x.tar.gzcd gcc-4.1.x./configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-libgcj-multifile --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --disable-plugin --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-1.4.2.0/jre --with-cpu=generic --host=x86_64-redhat-linuxmake && make install
?
?
apache
tar -zxcf httpd-2.4.x.tar.gz cd httpd-2.4.x./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --with-pcre=/usr/local/pcremake && make install
?
?三、测试
cp /usr/local/apache/bin/apachectl /etc/rc.d/init.d/apache#启动service apache start#停止service apache stop
?启动后访问 http://apache.server.name
显示
?
查看端口:netstat -an | grep :80
查看进程:ps -aux | grep httpd
查看apache编译参数:cat /usr/local/apache/build/config.nice
?