server CentOS 6 - PHP 5.3.10 컴파일 / 보안

2012.04.15 10:08

엘카 조회 수:14285

참고 문서  

운영중인 CMS에 어울리는 php 버전을 선택해주세요.

라이브러리

# yum install libxml2-devel openssl-devel bzip2-devel curl-devel libjpeg-devel libpng-devel freetype-devel gmp-devel ncurses-devel unixODBC-devel pspell-devel net-snmp-devel libmcrypt-devel mysql-devel libtool-ltdl-devel

Suhosin (수호신)

# wget http://download.suhosin.org/suhosin-patch-5.3.9-0.9.10.patch.gz
# gunzip suhosin-patch-5.3.9-0.9.10.patch.gz
# wget http:
# tar xvfz php-5.3.10.tar.gz
# yum install patch
# cd php-5.3.10
# patch -p 1 -i ../suhosin-patch-5.3.9-0.9.10.patch

다운로드 / 컴파일

# cd php-5.3.10
# ./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache/bin/apxs --with-mysql=mysqlnd --with-mysqli --disable-magic-quotes --disable-dmalloc --enable-bcmath --enable-gd-native-ttf --enable-inline-optimization --enable-mbstring --enable-mbregex --enable-gd-native-ttf --enable-ftp --with-jpeg-dir --with-freetype-dir --with-curl --with-zlib --with-gd --with-iconv --disable-debug --with-mcrypt --enable-suhosin --enable-exif --enable-sysvsem --enable-sysvshm
# make && make install
# cp php.ini-production /usr/local/php/lib/php.ini

expose_php = Off
post_max_size = 200M
allow_url_fopen = Off
date.timezone = "Asia/Seoul"
open_basedir = "/tmp:/home/"
disable_functions=exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source
memory_limit=64M ; 32M 일 경우 XE Core 쉬운설치시 문제가 발생할 수 있습니다

php.ini

관련문서

번호 제목 날짜 조회 수
61 Table 태그 file 2010.05.23 4440
60 php + ssh2 file 2010.06.05 20197
59 javascript 대기시간 - setTimeout file 2010.06.12 13142
58 ftp file 2010.07.23 15441
57 네이버 드래그, 마우스 우클릭 방지 해제 file 2010.07.25 3620
56 브라우저, 문서 높이 구하기 2010.08.17 3944
55 <table cellspacing="0"> 2010.08.19 5485
54 마인크래프트 다운로드 v1.4 2011.04.01 3371
53 접속하기전에.. 2011.04.01 2342
52 마인크래프트 조합법 1 file 2011.04.01 38355
51 마인크래프트 조합 2 file 2011.04.01 14473
50 리눅스 계정 생성/변경 [67] 2011.04.02 29125
49 ssh 로그인 제한 2011.04.05 16467
48 php 생성자 / 소멸자 2011.05.21 7568
47 php __get($name), __set($name, $value) 2011.05.21 7492
46 CentOS 6.2 다운로드 / 설치 [1] file 2012.04.15 17027
45 CentOS 6 - MySQL 5.5 설치 [1] file 2012.04.15 21695
44 CentOS 6 - Apache 2.4.1 컴파일 / 보안 설정 [1] 2012.04.15 30239
» CentOS 6 - PHP 5.3.10 컴파일 / 보안 [1] 2012.04.15 14285
42 CentOS 6 PHP 5.3 - APC(Alternative PHP Cache) 3.1.9 2012.04.15 11369