安装lnmp
# wget http://soft.vpser.net/lnmp/lnmp1.4.tar.gz # tar zxvf lnmp1.4.tar.gz # cd lnmp1.4 # ./install.sh
安装redis拓展
# pecl install igbinary && pecl install redis
swoole安装准备工作
安装http2
# wget https://github.com/nghttp2/nghttp2/releases/download/v1.30.0/nghttp2-1.30.0.tar.bz2 # tar -jxvf nghttp2-1.30.0.tar.bz2 # cd nghttp2-1.30.0 # ./configure # make # make install
安装postgresql
# yum install -y postgresql-devel
安装hiredis
# wget https://codeload.github.com/redis/hiredis/tar.gz/v0.13.3 # tar -zxvf v0.13.3 # cd hiredis-0.13.3/ # make -j # make install # ldconfig
安装swoole
# pecl install swoole
针对thinkphp5框架由于入口文件位于二级目录public中,需要修改fastcgi.conf所限制目录权限
修改 /usr/local/nginx/conf/fastcgi.conf
# fastcgi_param PHP_ADMIN_VALUE "open_basedir=$document_root/:/tmp/:/proc/"; # 注释
安装默认禁用函数scandir, 按照需求修改php.ini文件
重启php-fpm以及nginx
# service php-fpm reload # service nginx reload