php apc
發表於 : 2014-01-21 09:54:34
http://www.tecmint.com/install-apc-alte ... os-fedora/
代碼: 選擇全部
yum install php-pear php-devel httpd-devel pcre-devel gcc make
pecl install apc
echo "extension = apc.so" > /etc/php.d/apc.ini
echo "apc.stat=0" >> /etc/php.d/apc.ini
echo "apc.enabled=1" >> /etc/php.d/apc.ini
echo ";apc.shm_size=快取大小,單位:MB" >> /etc/php.d/apc.ini
echo "apc.shm_size=64" >> /etc/php.d/apc.ini
echo "apc.ttl=300" >> /etc/php.d/apc.ini
echo "apc.user_ttl=300" >> /etc/php.d/apc.ini
echo "apc.num_files_hint=1024" >> /etc/php.d/apc.ini
echo "apc.mmap_file_mask=/var/tmp/apc.XXXXXX" >> /etc/php.d/apc.ini
echo "apc.include_once_override = 1" >> /etc/php.d/apc.ini
echo "apc.enable_cli=1" >> /etc/php.d/apc.ini
cp /usr/share/pear/apc.php /var/www/html/
chown apache /var/www/html/apc.php
chgrp apache /var/www/html/apc.php
chmod 755 /var/www/html/apc.php
perl -i -pe "s/\'ADMIN_USERNAME\',\'apc\'/\'ADMIN_USERNAME\',\'admin\'/g" /var/www/html/apc.php
perl -i -pe "s/\'ADMIN_PASSWORD\',\'password\'/\'ADMIN_PASSWORD\',\'admin123\'/g" /var/www/html/apc.php
/etc/init.d/httpd restart