Apache

[提示]–without-libtool 会导致apr编译失败;–disable-ipv6 会导致httpd和其他二进制程序编译失败。–without-ldap –without-dbm 会导致apr-util配置失败。

APR的configure脚本在–disable/enable-profile的时候都在CFLAGS中添加”-pg”(这应当是一个bug),而如果不明确指定则添加”-g”,由于”-fomit-frame-pointer”与”-pg”是冲突的,所以在CFLAGS中含有-fomit-frame-pointer的情况下使用–disable-profile会导致apr配置和编译失败。为了可以使用”-fomit-frame-pointer”,这里用一个sed来确保不向CFLAGS中(实际上是不向EXTRA_CFLAGS中)添加”-pg”,另外,由于看”-g”也不顺眼,顺手也去掉它。

R=/root/httpd-2.2.8/ && mkdir {,$R}/{bin,lib,var/log/apache} &&
tar -xf httpd-2.2.8.tar.bz2 && cd httpd-2.2.8 &&
patch $SRC/httpd-2.2.8-layout.patch &&
sed -i 's|temp_create_method=.*|temp_create_method=mktemp|' support/check_forensic &&
sed -i -e's|"-pg"||g' -e's|"-g"||g' srclib/apr/configure &&
cd srclib/apr &&
./configure --enable-layout=apr --enable-shared --disable-static --enable-nonportable-atomics --disable-threads --with-pic --with-sendfile --with-devrandom=/dev/urandom  &&
make && make install && make install DESTDIR=$R &&
cd ../apr-util &&
./configure --enable-layout=apr-util --with-apr=/usr --enable-shared --disable-static --with-pic --without-pgsql --without-mysql --with-expat=builtin &&
make && make install && make install DESTDIR=$R &&
cd $SRC/httpd-2.2.8 &&
./configure --enable-layout=LAPP --with-apr=/usr --with-apr-util=/usr --with-mpm=prefork \
--enable-modules="auth-digest authn-default authn-file authz-default authz-user authz-host deflate dir env setenvif expires log-config mime status rewrite so" --enable-mods-shared="info ssl" --disable-actions --disable-alias --disable-asis --disable-auth-basic --disable-authz-groupfile --disable-autoindex --disable-cgi --disable-cgid --disable-filter --disable-imagemap --disable-include --disable-isapi --disable-negotiation --disable-userdir  \
--disable-v4-mapped --with-ssl=/lib --with-z=/lib --with-perl=/usr --with-pcre=/usr --disable-static-support --disable-suexec  &&
make && make install && make install DESTDIR=$R &&
rm {,$R}/etc/apache/* {,$R}/usr/lib/{,apache}/*.exp {,$R}/www/{build*,cgi*,error,htdocs,icons,manual} &&
cp $SRC/{authn.md5,httpd.conf,mime.types}   /etc/apache/ && mv   /usr/lib/apache/   /lib/ &&
cp $SRC/{authn.md5,httpd.conf,mime.types} $R/etc/apache/ && mv $R/usr/lib/apache/ $R/lib/ &&
cp   /usr/bin/{httpd,rotatelogs}   /bin/ && cp   /usr/lib/lib{apr-1,aprutil-1,expat}.so.0   /lib/ &&
cp $R/usr/bin/{httpd,rotatelogs} $R/bin/ && cp $R/usr/lib/lib{apr-1,aprutil-1,expat}.so.0 $R/lib/ &&
cd $SRC && rm */ &&
echo '43-httpd' >> $SRC/build.log && sync &&JPEG + PNG
R=/root/jpeg-png/ && mkdir $R/{lib,usr/{lib,include}} &&
tar -xf jpegsrc.v6b.tar.gz && tar -xf libpng-1.2.25.tar.bz2 &&
cd $SRC/jpeg-6b &&
./configure --prefix=/usr --sbindir=/usr/bin --disable-static --enable-shared --enable-maxmem=4 &&
make && make test &&
make install-lib && make install-lib prefix=$R/usr sbindir=$R/usr/bin &&
cp   /usr/lib/libjpeg.so.62   /lib/ &&
cp $R/usr/lib/libjpeg.so.62 $R/lib/ &&
cd $SRC/libpng-1.2.25 && sync &&
./configure --prefix=/usr --sbindir=/usr/bin --disable-static --enable-shared --with-pic --without-binconfigs --without-libpng-compat &&
make && make check &&
make install            && cp   /usr/lib/libpng12.so.0   /lib/ &&
make install DESTDIR=$R && cp $R/usr/lib/libpng12.so.0 $R/lib/ &&
rm {,$R}/usr/bin/libpng-config &&
cd $SRC && rm */ &&
echo '44-jpeg-png' >> $SRC/build.log && sync &&PHP ##[含APC模块]


相关内容

    暂无相关文章