首页 > nginx > php-fpm with php-5.3.2 + APC

php-fpm with php-5.3.2 + APC

2010年5月17日 eric 发表评论 阅读评论

php-fpm 现在php官方内部已经出版本了,据说以后会出现在 php core 里,如果现在安装的话,可以svn得到最新代码,我抢先为快。

至于缓存,我用的facebook 试用的apc 测试了一段时间还很,满意。

wget ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/pcre-8.02.tar.bz2

wget http://monkey.org/~provos/libevent-1.4.13-stable.tar.gz

wget http://pecl.php.net/get/APC-3.1.3p1.tgz
tar zxvf pcre-8.02.tar.bz2

cd pcre-8.02

./configure --enable-utf8 --enable-pcregrep-libbz2

make

make install

tar zxvf libevent-1.4.13-stable.tar.gz

cd libevent-1.4.13-stable

./configure --prefix=/usr

make 

make install 
tar jxvf php-5.3.2.tar.bz2

cd php-5.3.2

svn co http://svn.php.net/repository/php/php-src/trunk/sapi/fpm sapi/fpm

./buildconf --force

./configure --prefix=/usr/local/php --enable-fpm --disable-debug --disable-safe-mode --disable-ipv6 --enable-ftp --enable-zip --with-libevent-dir --with-fpm-user=www --with-fpm-group=www --with-config-file-path=/usr/local/php/etc --with-libxml-dir --with-openssl --with-pcre-regex --with-zlib --with-zlib-dir --with-bz2 --with-curl --with-libxml-dir --with-pcre-dir --with-openssl-dir --with-gd --with-jpeg-dir --with-png-dir --with-zlib-dir --with-freetype-dir --with-gettext --with-mhash --with-ldap --with-ldap-sasl --with-mcrypt --with-mysql=mysqlnd --with-mysql-sock=/tmp/mysql.sock --with-zlib-dir --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-zlib-dir --with-openssl-dir --with-libxml-dir --with-libxml-dir --with-libxml-dir --with-iconv-dir=/usr/local --with-pear

make ZEND_EXTRA_LIBS='-liconv'

make install

cp php.ini-production /usr/local/php/etc/php.ini

cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

chmod 755 /etc/init.d/php-fpm

安装额外的 插件

tar zxvf APC-3.1.3p1.tgz

cd APC-3.1.3p1

./configure --enable-apc --enable-mmap --with-php-config=/usr/local/php/bin/php-config

make

make install

tar zxvf memcache-2.2.5.tgz

cd memcache-2.2.5

./configure --with-php-config=/usr/local/php/bin/php-config

make 

make install 
cd /usr/local/php/etc

mkdir fpm.d

vim php.ini
把 extension_dir = "./" 改为

extension_dir = "/usr/local/php/lib/php/extensions/no-debug-non-zts-20090626/"
extension = "memcache.so"
;因为最新版本的 apc 是不需要加任何参数,默认就是启动的
extension = "apc.so"

mv php-fpm.conf  php-fpm.conf.bak 
cat php-fpm.conf
;
; Global
;
pid = /usr/local/php/var/run/php-fpm.pid
error_log = /usr/local/php/var/log/php-fpm.log
log_level = notice
emergency_restart_threshold = 10
emergency_restart_interval = 1m
process_control_timeout = 5s
daemonize = yes
;pools here
include = /usr/local/php/etc/fpm.d/*.conf 
cd fpm.d
cat eric_blog.conf
;
; eric's blog pool
;
[blog]
listen = 127.0.0.1:9000
listen.backlog = -1
listen.allowed_clients = 127.0.0.1
;listen.owner = www
;listen.group = www
;listen.mode = 0666
user = www
group = www
; 有两种形式,static , dynamic  默认是以dynamic。
pm = static
pm.max_children = 50
;pm.start_servers = 20
;pm.min_spare_servers = 5
;pm.max_spare_servers = 35
pm.max_requests = 65535
;pm.status_path = /status
;ping.path = /ping
;ping.response = pong
request_terminate_timeout = 0s
request_slowlog_timeout = 0s
slowlog = /usr/local/php/var/log/php-fpm.log.slow
rlimit_files = 65535
rlimit_core = 0
catch_workers_output = yes
php_admin_value[sendmail_path] = /usr/sbin/sendmail -t -i -f
php_flag[display_errors] = off
php_admin_value[error_log] = /usr/local/php/var/log/fpm-php.www.log
php_admin_flag[log_errors] = on
php_admin_value[memory_limit] = 20M
php_admin_value[open_basedir] = /var/www/wordpress:/home/www/sessions:/tmp
php_admin_value[session.save_path] = /home/www/sessions

Php 官方出的 php-fpm 配置文件抛弃了 xml格式,采用 php.ini 格式式样,但是基本的配置是没有变的·其他 nginx  以及 mysql 的安装我就不写了。

创建一个 phpinfo(); 看一下

转载请注明:文章转载自:Eric's linux and nginx! (http://www.nginxs.com)
本文地址:http://www.nginxs.com/linux/148.html

分类: nginx 标签: , , ,
  1. 2018年6月21日21:52 | #1

    Most actors invest their time and efforts poorly.

  2. 2018年6月22日14:11 | #2

    Head turns permit the eyes to comment on a situation.

  3. 2018年6月23日09:40 | #3

    Properly rounded folks often make good actors.

  4. 2018年6月23日09:54 | #4

    Head turns permit the eyes to touch upon a
    scenario.

  5. 2018年6月23日12:05 | #5

    Well rounded individuals usually make good actors.

  6. 2018年6月23日19:29 | #6

    Most actors invest their time and efforts poorly.

  7. 2018年6月23日20:28 | #7

    What Do Expertise Brokers Look For In Actors?

  8. 2018年6月23日21:40 | #8

    Properly rounded people often make good actors.

  9. 2018年6月24日03:51 | #9

    What Do Talent Brokers Look For In Actors?

  10. 2018年6月24日04:28 | #10

    What Do Talent Agents Look For In Actors?

  11. 2018年6月24日11:27 | #11

    What Do Talent Brokers Look For In Actors?

  12. 2018年6月24日12:45 | #12

    What Do Expertise Agents Look For In Actors?

  13. 2018年6月24日13:38 | #13

    Effectively rounded individuals usually make good actors.

  14. 2018年6月24日16:34 | #14

    What Do Expertise Agents Look For In Actors?

  15. 2018年6月24日18:54 | #15

    What Do Talent Brokers Look For In Actors?

  16. 2018年6月25日01:24 | #16

    Nicely rounded folks often make good actors.

  17. 2018年6月25日04:40 | #17

    Most actors make investments their time and efforts poorly.

  18. 2018年6月25日05:26 | #18

    Properly rounded folks often make good actors.

  19. 2018年6月25日07:05 | #19

    Head turns allow the eyes to touch upon a situation.

  20. 2018年6月25日07:25 | #20

    Most actors invest their time and efforts poorly.

  21. 2018年6月25日08:13 | #21

    Head turns enable the eyes to comment on a scenario.

  22. 2018年6月25日09:06 | #22

    Head turns enable the eyes to comment on a scenario.

  23. 2018年6月25日13:53 | #23

    What Do Talent Agents Look For In Actors?

  24. 2018年7月5日00:40 | #24

    Write more, thats all I have to say. Literally, it
    seems as though you relied on the video to make your point.

    You definitely know what youre talking about, why throw away
    your intelligence on just posting videos to your site
    when you could be giving us something informative to read?

  25. 2018年7月15日03:14 | #25

    no download casino mac
    casino online
    online roulette usa real money

  26. 2018年7月17日20:24 | #26

    play realistic blackjack
    casino games
    best online casino australia

  27. 2018年7月19日21:29 | #27

    buying viagra over counter canada
    generic viagra without a doctor prescription
    do you have get prescription viagra

  28. 2018年7月21日11:25 | #28

    Bookkeeping is a really a subset of accounting.

  29. 2018年7月23日04:20 | #29

    online roulette australia real money
    free online slots jack and the beanstalk
    online slots with bonus rounds
    casino glasgow
    win money online gambling

  30. 2018年7月24日06:38 | #30

    can you buy generic viagra in the us
    where to buy viagra in canada
    how do i get viagra on prescription

  31. 2018年7月26日00:52 | #31

    viagra sale thailand
    viagra sale walgreens
    viagra soft tabs 100mg 50mg

  32. 2018年7月26日11:15 | #32

    viagra 100mg preis 4st
    buy viagra cialis
    is it illegal to buy viagra from canada

  33. 2018年7月27日20:37 | #33

    best rated online pharmacy viagra
    how to order viagra+singapore
    viagra fake online

  34. 2018年7月28日04:05 | #34

    evolution viagra salesman written jamie reidy
    buy viagra dublin
    viagra online cheapest

  35. 2018年7月28日22:09 | #35

    sildenafil citrate tablets ip 50mg
    viagra tablets sale uk
    100mg sildenafil citrate and 60 mg dapoxetine

  36. 2018年7月29日11:20 | #36

    does walmart sell generic viagra
    viagra sale galway
    what color is a viagra pill

  37. 2018年7月29日20:48 | #37

    is 50 mg viagra too much
    buy cialis with online prescription
    buy viagra cialis uk

  38. 2018年7月30日08:58 | #38

    onde comprar o generico do viagra
    buy viagra mumbai
    can i buy viagra in cvs

  39. 2018年7月31日15:01 | #39

    100mg viagra dosage
    buy viagra paypal
    generic viagra patent

  40. 2018年8月2日06:29 | #40

    can you get viagra if you young
    viagra sale in thailand
    cheap generic viagra on line

  41. 2018年8月14日05:35 | #41

    viagra price in ireland
    order viagra online nz
    getting prescription viagra

评论分页
1 2 3 4 148
订阅评论
4+7= (必填)