Linux CentOS 6 - PHP 5.3.10 컴파일 / 보안
2012.04.15 10:08
| 참조할 문서 |
|---|
운영중인 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 (수호신)
http://www.hardened-php.net/suhosin/download.html
# 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://kr.php.net/distributions/php-5.3.10.tar.gz # 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
php.ini
# vi /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 쉬운설치시 문제가 발생할 수 있습니다
Apache 연동
# vi /usr/locala/apache/conf/httpd.conf
관련문서
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 수 |
|---|---|---|---|---|
| 23 |
Linux Memory 사용량
| 2012.05.16 | 2572 | |
| 22 |
Linux 설치시 파티션 관리
| 2012.05.12 | 2345 | |
| 21 |
Apache Module mod_ratelimit (아파치 트래픽 제한)
| 2012.05.11 | 3705 | |
| 20 |
SSL 설치 (Apache)
[1] | 2012.04.19 | 4154 | |
| 19 |
계정 자동 생성
[2] | 2012.04.15 | 3214 | |
| 18 | 자동 백업 / 삭제 (data + mysql) [1] | 2012.04.15 | 3578 | |
| 17 | CentOS 6 PHP 5.3 - APC(Alternative PHP Cache) 3.1.9 | 2012.04.15 | 3855 | |
| » | CentOS 6 - PHP 5.3.10 컴파일 / 보안 [1] | 2012.04.15 | 3700 | |
| 15 | CentOS 6 - Apache 2.4.1 컴파일 / 보안 설정 [1] | 2012.04.15 | 5209 | |
| 14 |
CentOS 6 - MySQL 5.5 설치
[1] | 2012.04.15 | 4552 | |
| 13 |
CentOS 6.2 다운로드 / 설치
| 2012.04.15 | 5642 | |
| 12 | ssh 로그인 제한 | 2011.04.05 | 10293 | |
| 11 | 리눅스 계정 생성/변경 [1] | 2011.04.02 | 11867 | |
| 10 |
ftp
| 2010.07.23 | 10253 | |
| 9 |
php + ssh2
| 2010.06.05 | 13876 | |
| 8 |
리눅스 자동 시작
| 2010.05.21 | 11178 | |
| 7 |
putty
| 2010.05.21 | 8712 | |
| 6 |
sAPM
| 2010.05.12 | 14108 | |
| 5 |
Lighttpd 설치
| 2010.05.11 | 12393 | |
| 4 |
Zend Optimizer + eAccelerator + Suhosin
| 2010.05.11 | 12409 |
php 5.3.11
./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-exif --enable-maintainer-zts --enable-sysvsem --enable-sysvshm # --enable-suhosin