Apache2 HTTP Server Build Script with The Full Option
글쓴이: RisaPapa / 작성시간: 목, 2003/12/11 - 2:34오후
httpd2inst.sh
#! /bin/sh # [Apache2 HTTP Server Build Script with The Full Option] # Copyright RisaPapa # Author: RisaPapa # Contact: ringring@zb4.so-net.ne.jp # 2003/12/11 # YOU CAN NOT DISTRIBUTE THIS SCRIPT, # OR CAN NOT LINK THIS URL FROM ANY SITE, # WITHOUT THE PERMISSION FROM RisaPapa. # Change $risapapadir variable like 'risapapadir=local' # 아래 risapapa를 수정하여 인스톨 디렉토리를 변경하면 됩니다. # 예를 들면, 'risapapadir=local' 처럼 수정합니다. # 下の「risapapa」を修正してインストールされるディレクトリを変更します。 # 例えば、'risapapadir=local'のように修正します。 risapapadir=risapapa # Probably, you don't need to change the item below risapapaprefix=/usr/${risapapadir} risapapabindir=${risapapaprefix}/bin risapapaincdir=${risapapaprefix}/include risapapalibdir=${risapapaprefix}/lib risapapamandir=${risapapaprefix}/man risapapasrcdir=${risapapaprefix}/src # [Check Directory] for i in \ $risapapaprefix \ $risapapabindir \ $risapapaincdir \ $risapapalibdir \ $risapapamandir \ $risapapasrcdir; \ do if [ -e ${i} ] then echo "${i} already exists" else mkdir ${i} chmod 755 ${i} chown -R root ${i} echo "${i} created" fi done # [Download] httpddist=http://archive.apache.org/dist/httpd/ httpdsrc=httpd-2.0.48.tar.gz httpdsrcdir=httpd-2.0.48 if [ -e $risapapasrcdir/$httpdsrc ]; then echo "$httpdsrc already exists." else wget -P $risapapasrcdir $httpddist$httpdsrc fi openssldist=http://www.openssl.org/source/ opensslsrc=openssl-0.9.7c.tar.gz opensslsrcdir=openssl-0.9.7c if [ -e $risapapasrcdir/$opensslsrc ]; then echo "$opensslsrc already exists." else wget -P $risapapasrcdir $openssldist$opensslsrc fi zlibdist=http://www.gzip.org/zlib/ zlibsrc=zlib-1.2.1.tar.gz zlibsrcdir=zlib-1.2.1 if [ -e $risapapasrcdir/$zlibsrc ]; then echo "$zlibsrc already exists." else wget -P $risapapasrcdir $zlibdist$zlibsrc fi # [zlib] cd $risapapasrcdir tar xvzf $zlibsrc cd $zlibsrcdir ./configure --prefix=${risapapaprefix} make make install make distclean ./configure --shared --prefix=${risapapaprefix} make make install rm -rf ${risapapaprefix}/include/zutil.h cp ${risapapasrcdir}/zlib-1.2.1/zutil.h ${risapapaprefix}/include/zutil.h cd $risapapasrcdir # rm -rf $zlibsrcdir set LD_RISAPAPA_LIB_PATH = `cat /etc/ld.so.conf | grep ${risapapalibdir}` if test -z ${3}; then echo "${risapapalibdir}" >> /etc/ld.so.conf fi export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${risapapalibdir} ldconfig ${risapapalibdir} # [openssl] cd $risapapasrcdir tar xvfz $opensslsrc cd $opensslsrcdir ./config --openssldir=${risapapaprefix}/openssl shared make make test make install set LD_RISAPAPA_OPENSSL_PATH = `cat /etc/ld.so.conf | grep ${risapapaprefix}/openssl/lib` if test -z ${3}; then echo "${risapapaprefix}/openssl/lib" >> /etc/ld.so.conf fi export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${risapapalibdir}/openssl/lib ldconfig ${risapapaprefix}/openssl/lib cd $risapapasrcdir #rm -rf $opensslsrcdir # Other Compile Option without rc5 (Patent No 5,724,428) # ./config --openssldir=${risapapaprefix}/openssl no-rc5 no-idea shared # After Installation # Add PATH ${risapapaprefix}/openssl/bin to '/etc/bashrc' # Register ${risapapaprefix}/openssl/lib with ldconfig # ldconfig ${risapapaprefix}/openssl/lib cd $risapapasrcdir tar xvfz $httpdsrc cd $httpdsrcdir ./configure --prefix=${risapapaprefix}/apache2 --enable-module=so --enable-mods-shared=all --enable-deflate=shared --enable-dav_fs --enable-dav --enable-rewrite --enable-proxy --enable-ssl --enable-shared --with-mpm=prefork --with-ssl=${risapapaprefix}/openssl --with-z=${risapapaprefix} make make install cd $risapapasrcdir #rm -rf $httpdsrcdir echo "Apache2 with the full option is installed. Check the httpd configuration files in the diretory '${risapapaprefix}/apache2/conf' If you have any problem, contact RisaPapa, as far as this installation script is concerned. "
This scrip will install Apache2 with the Full Option.
Have Fun....
Forums:
댓글 달기