nginx整合php-fpm
tar -zxvf php-5.4.9.tar.bz2 cd php-5.4.9 ./configure --prefix=/usr/local/php --enable-fpm make make install cp php.ini-production /usr/local/php/etc/php.ini cp /usr/local/php/etc/php-fpm.conf.default /usr/local/php/etc/php-fpm.conf #php.ini 配置时区 vim /usr/local/php/etc/php.ini date.timezone=Asia/Shanghai #php-fpm.ini 配置目录,工作用户 vim /usr/local/php/etc/php-fpm.ini access.log = /home/fansxnet/wwwroot/phpwww/logs/$pool.access.log slowlog = /home/fansxnet/wwwroot/phpwww/logs/$pool.log.slow user = fansxnet group = fansxnet #/home/fansxnet/wwwroot/phpwww 目录文件夹列表 htdocs include logs templates #在htdocs目录中新建一个index.php echo phpinfo() #nginx.conf的配置添加一个 location ~ \.php$ { root /home/fansxnet/wwwroot/phpwww/htdocs; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param PHP_VALUE 'include_path=/home/fansxnet/wwwroot/phpwww/include:/user/share/pear'; fastcgi_param SCRIPT_FILENAME /home/fansxnet/wwwroot/phpwww/htdocs$fastcgi_script_name; include fastcgi_params; } #启动nginx php-fpm /usr/local/openresty/nginx/sbin/nginx /usr/local/php/sbin/php-fpm -c /usr/local/php/etc/php.ini #浏览 http://localhost/index.php #添加模块指定扩展模块目录 vim /usr/local/php/etc/php.ini extensioin_dir = "/usr/lib64/php/modules" #curl module cd php-5.4.9/ext/curl phpize ./configure --with-php-config=/usr/local/php/bin/php-config --with-curl=/usr/bin make make install vim /usr/local/php/etc/php.ini extension=curl.so # 添加curl
相关推荐
zhaowj00 2020-07-30
WFMoonlight 2020-08-17
有梦就能实现 2020-06-26
Skyline 2020-06-25
dajiangqingzhou 2020-05-07
olyqcool 2020-05-10
jkzyx 2020-04-25
aaLiweipeng 2020-04-25
aaLiweipeng 2020-04-25
igogo00 2020-03-04
Skyline 2020-03-01
zhaowj00 2020-02-19
amberom 2020-02-18
JF0 2020-02-02
技术渣 2013-05-13
igogo00 2019-12-30
doupoo 2020-01-09