ThinkPHP5 php_fpm nginx in CentOS7.3

2700 단어
install php7.1.13
PHP 설치 하기 /opt/php7.1.13/from source
./configure
--enable-shared 
--enable-mysqlnd 
--disable-rpath
--disable-short-tags
--enable-bcmath
--enable-calendar
--enable-exif
--enable-fileinfo
--enable-fpm
--enable-ftp
--enable-gd-native-ttf
--enable-inline-optimization
--enable-maintainer-zts
--enable-mbregex
--enable-mbstring
--enable-opcache
--enable-pcntl
--enable-shmop
--enable-soap
--enable-sockets
--enable-sysvsem
--enable-sysvshm
--enable-xml
--enable-zip
--enable-phpdbg
--prefix=/opt/php7.1.12
--with-bz2
--with-curl
--with-fpm-group=www-data
--with-fpm-user=www-data
--with-freetype-dir
--with-gd
--with-gettext
--with-imap
--with-imap-ssl
--with-jpeg-dir=/usr
--with-kerberos
--with-libdir=/lib64
--with-libxml-dir=/usr
--with-mcrypt
--with-mhash
--with-mysql-sock=/var/lib/mysql/mysql.sock
--with-mysqli
--with-openssl
--with-pcre-regex
--with-pdo-mysql
--with-png-dir=/usr
--with-webp-dir=/usr/include/webp
--with-xmlrpc
--with-xsl
--with-zlib
--with-zlib-dir

make
sudo make install

# add php-fpm to service
# in the configure folder
sudo cp sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm
sudo chmod o+x /etc/init.d/php-fpm
sudo chkconfig --add php-fpm

중간 에 의존 하 는 가방 이 많아 서 설치 해 야 합 니 다. 제 가 말 하 는 것 은 많 습 니 다. 구체 적 으로 어떤 가방 이 다음 에 새 서버 가 있 을 때 보충 해 야 합 니까?
config php-fpm
# enable conf file
ls /opt/php7.1.13/etc/php-fpm.conf.default
cp  $_ ${_//.default/}
# enable pool conf file
ls /opt/php7.1.13/etc/php-fpm.d/www.conf.default
cp $_ ${_//.default/}
# edit conf file
vim $_

편집 / opt / phop 7.1.13 / etc / phop - fpm. d / www. conf, daemon 은 시스템 에 존재 하 는 사용자 여야 합 니 다. 다른 사용자 도 가능 합 니 다. 주로 listen 의 설정 입 니 다. 경 로 는 다른 경 로 를 지정 할 수 있 습 니 다.
daemon 의 존재 여 부 를 봅 니 다. cat / etc / passwd, grep 에서 존재 하 는 지 확인 합 니 다.
user = daemon
group = daemon
#   unix socket  ,        ,       
listen = /dev/shm/php-fpm.sock
#  ae,    ea
listen.owner = daemon
listen.group = daemon
#       2G2  ,2048   ,       (   ),        。
pm = dynamic
pm.max_requests = 2048

install nginx1.13.8
from source
./configure --prefix=/opt/nginx1.13.8 --sbin-path=/opt/nginx1.13.8/nginx --conf-path=/opt/nginx1.13.8/nginx.conf --pid-path=/dev/nginx/nginx.pid --with-http_ssl_module --with-http_realip_module --with-http_sub_module --with-http_gzip_static_module --with-http_stub_status_module  --with-pcre --with-cc-opt="-Wno-deprecated-declarations"

make
sudo make install

배치 하 다.
설 정 된 thinkpphp 5

좋은 웹페이지 즐겨찾기