关于apc的理论网上很多,宅鸟不再做赘述:
直接上脚本:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/bin/bash # name:apc.sh # description: # author:lihuibin # version: 0.0.1 # datetime: 2013-08-22 14:44:33 # usage:apc.sh wget http: //pecl .php.net /get/APC
mv APC APC-3.1.13.tgz
tar -zxvf APC-3.1.13.tgz
cd APC-3.1.13/
/usr/bin/phpize . /configure -- enable -apc -- enable -apc-mmap --with-php-config= /usr/bin/php-config
make make install
cd /etc/php5/conf .d/
cat > apc.ini << EOF
extension=apc.so [apc] apc.enabled=1 apc.shm_segments=1 apc.shm_size=30M apc.ttl=7200 apc.user_ttl=3600 apc.stat =1 apc.stat_ctime = 0 apc.max_file_size = 1M EOF /etc/init .d /php5-fpm reload
|
本文转自birdinroom 51CTO博客,原文链接:http://blog.51cto.com/birdinroom/1344040,如需转载请自行联系原作者