博瑞博客

现在位置:首页 > 服务器 > Linux > Nginx + php 5.2.17 + php-fpm

Nginx + php 5.2.17 + php-fpm

江湖    Linux    2016-2-2    1020    0评论
  1. Download the needed packages and store them in /usr/src:
  2. http://us.php.net/distributions/php-5.2.17.tar.gz
  3. http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz
  4. http://nginx.org/download/nginx-1.1.0.tar.gz
  5. Then run :
  6. tar -xvzf php-5.2.17.tar.gz
  7. gzip -cd php-5.2.17-fpm-0.5.14.diff.gz | sudo patch -d php-5.2.17 -p1
  8. cd php-5.2.17
  9. ./configure --enable-fastcgi --enable-fpm --with-mcrypt --with-zlib --enable-mbstring --enable-pdo --with-curl --disable-debug --with-pic --disable-rpath --enable-inline-optimization --with-bz2 --enable-xml --with-zlib --enable-sockets --enable-sysvsem --enable-sysvshm --enable-pcntl --enable-mbregex --with-mhash --with-xsl --enable-zip --with-pcre-regex --with-gd --without-pdo-sqlite --with-pdo-mysql --without-sqlite --with-jpeg-dir=/usr/lib --with-png-dir=/usr/lib --with-mysql --enable-bcmath --enable-calendar --enable-exif --enable-ftp --with-gettext --with-imap --with-mysqli --with-openssl --with-kerberos --with-imap-ssl --enable-dbase --with-gmp --enable-shmop --enable-wddx
  10. make all install
  11. Note that you can add prefix to install the binaries in a different location than the default one.
  12. After compilation is done :
  13. strip /usr/local/bin/php-cgi
  14. cp sapi/cgi/fpm/php-fpm /etc/init.d/
  15. chmod +x /etc/init.d/php-fpm
  16. cp /usr/src/php-5.2.17/php.ini-recommended /usr/local/lib/php.ini
  17. mkdir /etc/php/
  18. ln -s /usr/local/lib/php.ini /etc/php/php.ini
  19. ln -s /usr/local/etc/php-fpm.conf /etc/php/php-fpm.conf
  20. Make sure you edit /etc/php/php-fpm.conf and set the proper user/group (and permissions if its the case).
  21. Then compile Nginx:
  22. tar zxvf nginx-1.1.0.tar.gz
  23. ./configure --sbin-path=/usr/local/sbin --with-http_ssl_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --with-http_stub_status_module
  24. make && sudo make install
  25. The same you can modify the prefix here.
  26. Related posts:
  27. Plesk 10 nginx reverse proxy configuration in front of Apache
  28. Howto configure vsftpd
  29. Installing mod_suphp
  30. Install Dante socks proxy

评论一下分享本文赞助博瑞

赞助博瑞X

扫码赞助博瑞
联系站长
博瑞博客
挤眼亲亲咆哮开心想想可怜糗大了委屈哈哈小声点右哼哼左哼哼疑问坏笑赚钱啦悲伤耍酷勾引厉害握手耶嘻嘻害羞鼓掌馋嘴抓狂抱抱围观威武给力
提交评论

清空信息
关闭评论