linux 下 源代码 安装 apache
tar-zxfopenssl-1.0.0c.tar.gz
cdopenssl-1.0.0c/
./configthreadssharedzlib-dynamic--prefix=/usr/local--openssldir=/usr/local/ssl
makeclean
make && make installchmod644/usr/local/lib/pkgconfig/libcrypto.pc
cplibssl.pc/usr/local/lib/pkgconfig
chmod644/usr/local/lib/pkgconfig/libssl.pc
cpopenssl.pc/usr/local/lib/pkgconfig
chmod 644 /usr/local/lib/pkgconfig/openssl.pc2、安装PCRE(PerlCompatibleRegularExpressions中文含义:perl语言兼容正则表达式)是一个用C语言编写的正则表达式函数库
tarxzvfpcre-8.31.tar.gz
cdpcre-8.31
./configure--prefix=/usr/local/pcre-8.31--libdir=/usr/local/lib/pcre\
--includedir=/usr/local/include/pcre--enable-unicode-properties
make&&makeinstall
3、安装zlib
$tar-xvzfzlib-1.2.3.tar.gz
$cdzlib-1.2.3.tar.gz
$./configure
$make
$sudomakeinstall
zlib的默认安装位置:
cplibz.a/usr/local/lib
chmod644/usr/local/lib/libz.a
cplibz.so.1.2.7/usr/local/lib
chmod755/usr/local/lib/libz.so.1.2.7
cpzlib.3/usr/local/share/man/man3
chmod644/usr/local/share/man/man3/zlib.3
cpzlib.pc/usr/local/lib/pkgconfig
chmod644/usr/local/lib/pkgconfig/zlib.pc
cpzlib.hzconf.h/usr/local/include
chmod644/usr/local/include/zlib.h/usr/local/include/zconf.h
4、apr-util,下载编译apr-util之后,继续编译apache
.configure--prefix=/root/soft/apache--with-apr=/root/soft/apr/--with-apr-util=/root/soft/apr-util/
2、到apache官方网站http://httpd.apache.org/download.cgi下载最新版本的apache,然后解压,执行如下命令:
./configure"--prefix=/usr/local/apache2.4.3"\
"--with-apr=/usr/local/apr-1-4-6/bin/apr-1-config"\
"--with-apr-util=/usr/local/apr-util/bin/apu-1-config"\
"--with-pcre=/usr/local/pcre-8.31/bin/pcre-config"\
"--with-ssl=/usr/local/ssl/"\
"--with-z=/usr/local/lib"\
--enable-cache--enable-file-cache--enable-disk-cache\
--enable-mime-magic--enable-headers--enable-ssl--enable-http\
--enable-rewrite--enable-so
make&&makeinstall
提示:configure:error:APRnotfound.Pleasereadthedocumentation.
2:提示缺少apr,下载http://apache.freelamp.com/apr/,编译安装完成apr之后,继续编译apache.
3:编译(./configure--prefix=/root/soft/apr-util–with-apr=/root/soft/apr)
configure:error:APR-utilnotfound.Pleasereadthedocumentation
4:缺少
configure:error:pcre-configforlibpcrenotfound.PCREisrequiredandavailablefromhttp://pcre.org/
8、出现了一个问题
AH00558:httpd:Couldnotreliablydeterminetheserver'sfullyqualifieddomainname,using127.0.0.1.Setthe'ServerName'directivegloballytosuppressthismessage
解决:
[root@linuxbin]#vi/server/apache/conf/httpd.conf
修改ServerNamewww.example.com:80为ServerNamelocalhost:80
编译安装mod_jk
完成以上设定后,即可开始编译mod_jk。
root#cdtomcat-connectors-1.2.26-src/native/
root#./configure--with-java-home=/usr/local/jdk1.6.0_35--with-apxs=/usr/local/apache2.4.3/bin/apxs
root # make