系統環境
CentOS 6.5 64位元
Nginx 1.6.2
MySQL 5.6.23
PHP 5.6.6
附註:如果在編譯過程中出現「
virtual memory exhausted: Cannot allocate memory#为了省事,直接用yum来安装吧 yum -y install libmcrypt-devel libxml2-devel curl-devel libjpeg-devel libpng-devel freetype-devel openssl-devel
註:user和group要跟nginx的運行用戶和群組保持一致
配置php.ini
mkdir -p /var/logs/php
啟動php-fpm
./configure \ --prefix=/usr/local/php \ --with-config-file-path=/usr/local/etc/php \ --with-mysql=/usr/local/mysql \ --with-mysqli \ --with-gd \ --with-jpeg-dir \ --with-png-dir \ --with-freetype-dir \ --with-curl \ --enable-mbstring \ --enable-sockets \ --enable-pcntl \ --enable-fpm \ --with-fpm-user=nginx \ --with-fpm-group=nginx \ --with-mcrypt \ --with-openssl \ --with-pdo-mysql \ --with-libxml-dir \ --with-zlib \ --with-pcre-dir
修改nginx.conf