심히 걱정된다 - 2008/08/20 09:55
Apache + PHP

yum install gcc autoconf libtool-ltdl-devel mysql-devel libxml2-devel openssl-devel gdbm-devel libjpeg-devel libpng-devel freetype-devel libmcrypt-devel freetds-devel


다운로드

1. cd /usr/local/src
2. wget wget http://apache.tt.co.kr/httpd/httpd-2.0.63.tar.gz
3. wget http://kr2.php.net/get/php-5.2.6.tar.gz/from/this/mirror
--------------------------------------------------------------------------------

아파치 설치

1. tar -zxvf httpd-2.0.63.tar.gz
2. cd httpd-2.0.63

3. vi server/mpm/prefork/prefork.c
   #define DEFAULT_SERVER_LIMIT 256 -> 1024로 수정 (메모리 1기가 기준)

4. ./configure --enable-so --prefix=/usr/local/httpd --enable-rewrite
5. make
6. make install
--------------------------------------------------------------------------------

PHP설치

1. tar -zxvf php-5.2.6.tar.gz
2. cd php-5.2.6
3. ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/httpd/bin/apxs --with-config-file-path=/usr/local/httpd/conf --with-mysql=/usr --enable-sockets --with-openssl=/usr --with-dbm --with-gd --with-jpeg-dir=/usr --with-png-dir=/usr --with-pcre-regex --enable-session --enable-mbstring --with-mcrypt --enable-sigchild --enable-bcmath --with-freetype-dir=/usr --with-zlib-dir=/usr --enable-ftp --enable-gd-native-ttf --with-gettext --with-mssql --enable-mbedded-mysqli

4. make
5. make install
6. cp php.ini-dist /usr/local/httpd/conf/php.ini
7. vi /usr/local/httpd/conf/httpd.conf

DirectoryIndex 에 index.php 추가

타입추가

AddType application/x-httpd-php .php .phtml .php3 .html .htm
AddType application/x-httpd-php-source .phps
--------------------------------------------------------------------------------

한글파일 지원을 위해 mod_url 설치

1. wget http://kldp.net/frs/download.php/4237/mod_url-apache2-1.12.tar.bz2
2. tar -jxvf mod_url-apache2-1.12.tar.bz2
3. cd mod_url-apache2-1.12
4. /usr/local/httpd/bin/apxs -i -c mod_url.c
5. vi /usr/local/httpd/conf/httpd.conf

#모듈추가
LoadModule redurl_module      modules/mod_url.so

#URL체크 ON
CheckURL On
ServerEncoding EUC-KR
ClientEncoding UTF-8
--------------------------------------------------------------------------------

보안을 위해 수호신 설치

1. wget http://download.suhosin.org/suhosin-0.9.24.tgz
2. tar -zxvf suhosin-0.9.24.tgz
3. cd suhosin-0.9.24
4. /usr/local/php/bin/phpize
5. ./configure --with-php-config=/usr/local/php/bin/php-config
6.make
7.make install

8. /usr/local/httpd/conf/php.ini 파일을 열고
extension_dir=/usr/local/php/lib/php/extensions 로 수정 후
extension=suhosin.so 를 등록

9. ln -s /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/suhosin.so /usr/local/php/lib/php/extensions/suhosin.so

10.  아파치 확인
/usr/local/httpd/htdocs/index.php



--------------------------------------------------------------------------------
ZendOptimizer 설치

1. http://www.zend.com/en/products/guard/downloads 에서 다운로드


--------------------------------------------------------------------------------
eaccelerator 설치

1. wget http://nchc.dl.sourceforge.net/sourceforge/eaccelerator/eaccelerator-0.9.5.2.tar.bz2
   tar -jxvf eaccelerator-0.9.5.2.tar.bz2
   cd eaccelerator-0.9.5.2
   /usr/local/php/bin/phpize

  ./configure --enable-eaccelerator=shared --with-php-config=/usr/local/php/bin/php-config

  make

  make install


2. PHP 익스텐션에 링크 후 php.ini 에 eaccelerator 적용

cd /usr/local/php/lib/php/extensions/
ln -s no-debug-non-zts-20060613/eaccelerator.so .
  
vi /usr/local/httpd/conf/php.ini

------------------------------------------------------
extension="eaccelerator.so"
eaccelerator.shm_size="16"
eaccelerator.cache_dir="/tmp/eaccelerator"
eaccelerator.enable="1"
eaccelerator.optimizer="1"
eaccelerator.check_mtime="1"
eaccelerator.debug="0"
eaccelerator.filter=""
eaccelerator.shm_max="0"
eaccelerator.shm_ttl="0"
eaccelerator.shm_prune_period="0"
eaccelerator.shm_only="0"
eaccelerator.compress="1"
eaccelerator.compress_level="9"
-------------------------------------------------------

3. 옵션에 적용한 디렉토리 생성 후 권한설정

mkdir /tmp/eaccelerator
chmod 0777 /tmp/eaccelerator

진보블로그 공감 버튼트위터로 리트윗하기페이스북에 공유하기딜리셔스에 북마크
TAG

Trackback Address ::

http://blog.jinbo.net/manim/trackback/19
PREV 1 ... 7 8 9 10 11 12 13 14 15 ... 22 NEXT