下載 wget https://github.com/eaccelerator/eaccelerator/tarball/master
tar zxf ../master
cd eaccelerator-eaccelerator-42067ac/
phpize
./configure –enable-eaccelerator=shared
make && make install
#注意路徑:/usr/lib/php5/20100525/ 因為make出來的資料夾名稱不一樣 後面會加一個+lef
mkdir -p /tmp/eaccelerator
chmod 777 /tmp/eaccelerator
cp control.php /data/web/test/ #入口
#修改php.ini文件
建議先查看 phpinfo 看看目前引用的php.ini檔是放在哪裡
不然的話有可能會改錯地方
#手工修改:查找/etc/php.ini中的 extension_dir = “./”
vi /etc/php.ini
#把extension_dir 以下插入
extension_dir = “/usr/lib/php5/20100525/”
extension = “memcache.so”
extension = “eaccelerator.so”
eaccelerator.shm_size=”32″
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″
eaccelerator.debug = “1”
eaccelerator.log_file = “/dev/null”
eaccelerator.keys = “shm_and_disk”
eaccelerator.sessions = “shm_and_disk”
eaccelerator.content = “shm_and_disk”
eaccelerator.allowed_admin_path=”/data/web/test/control.php”
Views: 0
111