1. 다운로드
공식사이트 : http://eaccelerator.net
다운로드페이지 : https://github.com/eaccelerator/eaccelerator/tarball/master
(2015/07/20 기준)
메뉴얼 : https://github.com/eaccelerator/eaccelerator/wiki
2. 설치
wget https://github.com/eaccelerator/eaccelerator/tarball/master
tar zxvpf eaccelerator*tar.gz
cd eaccelerator-*
phpize
./configure –enable-shared –with-php-config=/usr/local/bin/php-config
make
cp modules/eaccelerator.so /usr/local/lib/php/extensions/
3. 설정
php.ini 파일에 아래내용 추가
(extension_dir = “/usr/local/lib/php/extensions” 상황을 가정함)
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_ttl="0" eaccelerator.shm_prune_period="0" eaccelerator.shm_only="0"
4. 디렉토리 생성
원래는 eaccelerator.cache_dir 항목에 설정해준 디렉토리를 생성하라고 설명되어 있으나..
내가 설치했던 42067ac (출력버넌 1.0-dev)버전에서는 디렉토리를 생성하지 않아도 아파치 재시작후 알아서 생성되는것을 확인할 수 있었다.
* 디렉토리 구조
# ls -al /tmp/eaccelerator/99/ total 72 drwx------ 18 nobody nobody 4096 Jul 19 21:30 . drwxrwxrwx 3 root root 4096 Jul 19 21:30 .. drwx------ 18 nobody nobody 4096 Jul 19 21:30 0 drwx------ 18 nobody nobody 4096 Jul 19 21:30 1 drwx------ 18 nobody nobody 4096 Jul 19 21:30 2 drwx------ 18 nobody nobody 4096 Jul 19 21:30 3 drwx------ 18 nobody nobody 4096 Jul 19 21:30 4 drwx------ 18 nobody nobody 4096 Jul 19 21:30 5 drwx------ 18 nobody nobody 4096 Jul 19 21:30 6 drwx------ 18 nobody nobody 4096 Jul 19 21:30 7 drwx------ 18 nobody nobody 4096 Jul 19 21:30 8 drwx------ 18 nobody nobody 4096 Jul 19 21:30 9 drwx------ 18 nobody nobody 4096 Jul 19 21:30 a drwx------ 18 nobody nobody 4096 Jul 19 21:30 b drwx------ 18 nobody nobody 4096 Jul 19 21:30 c drwx------ 18 nobody nobody 4096 Jul 19 21:30 d drwx------ 18 nobody nobody 4096 Jul 19 21:30 e drwx------ 18 nobody nobody 4096 Jul 19 21:30 f
5. 확인
# php -i|grep eaccelerator eaccelerator.allowed_admin_path => no value => no value eaccelerator.cache_dir => /tmp/eaccelerator => /tmp/eaccelerator eaccelerator.check_mtime => 1 => 1 eaccelerator.debug => 1 => 1 eaccelerator.enable => 1 => 1 eaccelerator.filter => no value => no value eaccelerator.log_file => no value => no value eaccelerator.optimizer => 1 => 1 eaccelerator.shm_only => 0 => 0 eaccelerator.shm_prune_period => 0 => 0 eaccelerator.shm_size => 0 => 0 eaccelerator.shm_ttl => 0 => 0