#!/bin/sh
tar zxvf httpd-2*.tar.gz
# 아파치 경로가 절대경로로 지정되었기 때문에 버전이 변경되면 다시 변경
./chg httpd-2.0.59/server/mpm/prefork/prefork.c "define DEFAULT_SERVER_LIMIT 256" "define DEFAULT_SERVER_LIMIT 2048"
cd httpd-2*
CFLAGS="-O2 -march=i686 -funroll-loops -fPIC"; export CFLAGS
./configure \
--prefix=/usr/local/apache2 \
--enable-access=shared \
--enable-actions=shared \
--enable-alias=shared \
--enable-auth=shared \
--enable-auth-dbm=shared \
--enable-auth-digest=shared \
--enable-autoindex=shared \
--enable-cern-meta=shared \
--enable-cgi=shared \
--enable-dav=shared \
--enable-dav-fs=shared \
--enable-dir=shared \
--enable-env=shared \
--enable-expires=shared \
--enable-file-cache=shared \
--enable-headers=shared \
--enable-include=shared \
--enable-log-config=shared \
--enable-mime=shared \
--enable-mime-magic=shared \
--enable-negotiation=shared \
--enable-rewrite=shared \
--enable-setenvif=shared \
--enable-speling=shared \
--enable-ssl=shared \
--enable-unique-id=shared \
--enable-usertrack=shared \
--enable-vhost-alias=shared \
--disable-auth-anon \
--disable-charset-lite \
--disable-disk-cache \
--disable-mem-cache \
--disable-cache \
--disable-deflate \
--disable-ext-filter \
--disable-case-filter \
--disable-case-filter-in \
--disable-example \
--disable-proxy \
--disable-proxy-connect \
--disable-proxy-ftp \
--disable-proxy-http \
--disable-status \
--disable-asis \
--disable-info \
--disable-suexec \
--disable-cgid \
--with-z \
--with-ssl \
--with-mpm=prefork
make;make install
echo "Apache2 install done"
echo "/usr/local/apache2/bin/apachectl start" >> /etc/rc.local
sleep 1
cd ../
echo " PHP and Etc INstall "
sleep 2
tar zxvf zlib-1.2.1.tar.gz
cd zlib-1.2.1
./configure
make
make install
cp -f *.h /usr/local/include/
cd ..
tar zxvf freetype-2.1.5.tar.gz
cd freetype-2.1.5
./configure
make
make install
cd ..
tar zxvf libpng-1.2.5.tar.gz
cd libpng-1.2.5
make -f scripts/makefile.linux
cp -f *.h /usr/local/include/
cp -f lib* /usr/local/lib/
cd ../
tar zxvf jpegsrc.v6b.tar.gz
cd jpeg-6b
./configure
make
make install
cp -f libjpeg.a /usr/lib/
cp -f *.h /usr/local/include/
cd ../
tar zxvf gd-2.0.34.tar.gz
cd gd-2.0.34
./configure
make
make install
cp -f libgd* /usr/lib/
cp -f *.h /usr/local/include/
cd ../
tar zxvf php-5.*.*.tar.*
cd php-5.*.*
CFLAGS="-O2 -march=i686 -funroll-loops -fPIC"; export CFLAGS
./configure \
--prefix=/usr/local \
--with-apxs2=/usr/local/apache2/bin/apxs \
--with-mod_charset \
--with-charset=euc_kr \
--with-language=korean \
--with-openssl \
--with-zlib \
--with-iconv \
--with-gd=/usr/local \
--with-ttf \
--with-png \
--with-jpeg-dir=/usr/local \
--with-png-dir=/usr/local \
--with-freetype-dir=/usr/local \
--with-gmp \
--with-xml \
--with-mysql=/usr/local/mysql \
--with-mysql-sock=/tmp/mysql.sock \
--disable-posix \
--disable-rpath \
--enable-safe-mode \
--enable-magic-quotes \
--enable-bcmath \
--enable-dio \
--enable-gd-native-ttf \
--enable-sysvsem \
--enable-sysvshm \
--enable-wddx \
--enable-pic \
--enable-inline-optimization \
--enable-memory-limit \
--enable-ftp \
--enable-socket \
--enable-pear \
--enable-shmop \
--enable-mbstring
make;make install
sed -i '867iAddType application/x-httpd-php .html .htm .php .php4' /usr/local/apache2/conf/httpd.conf
sed -e '426d' /usr/local/apache2/conf/httpd.conf > httpd.conf
sed -i '426iDirectoryIndex index.html index.htm index.cgi index.php index.php3 index.php4' /usr/local/apache2/conf/httpd.conf
touch /usr/local/apache2/htdocs/apm_ver.php;chmod 755 /usr/local/apache2/htdocs/apm_ver.php
echo "<?
phpinfo();
?>" >> /usr/local/apache2/htdocs/apm_ver.php
cp php.ini-dist /usr/local/lib/php.ini
cd ../
./chg /usr/local/lib/php.ini "register_globals = Off" "register_globals = On"
./chg /usr/local/lib/php.ini "upload_max_filesize = 2M" "upload_max_filesize = 8M"
./chg /usr/local/lib/php.ini "allow_url_fopen = On" "allow_url_fopen = Off"
echo " Zend install"
sleep 2
tar xvfz ZendOptimizer-2.6.2-linux-glibc21-i386.tar.gz
cd ZendOptimizer*
mkdir -p /usr/local/Zend
cp data/5_1_x_comp/ZendOptimizer.so /usr/local/Zend
echo "[Zend]" >> /usr/local/lib/php.ini
echo "zend_optimizer.optimization_level=1023" >> /usr/local/lib/php.ini
echo "zend_extension=/usr/local/Zend/ZendOptimizer.so" >> /usr/local/lib/php.ini
chmod 700 /usr/local/apache2/conf
/usr/local/apache2/bin/httpd -t
sleep 2
/usr/local/apache2/bin/apachectl start
echo "All Done' View This Site *** http://your ip/apm_ver.php
Have a nice day!!"
exit 0
댓글 없음:
댓글 쓰기