先按装apt
安转php
https://www.centos.bz/2017/12/%E5%9C%A8-ubuntu-debian-%E4%B8%8B%E5%AE%89%E8%A3%85-php7-2/
安装nginx
apt-get install nginx
安装mysql
apt-get install mysql-server
配置/etc/php/7.2/fpm/php.ini
[PHP] engine=On expose_php=off max_execution_time=5 memory_limit=-1 error_reporting=E_ALL&~E_DEPRECATED display_errors=off display_startup_errors=off html_errors=off default_socket_timeout=5 file_uploads=On upload_tmp_dir=/tmp/php upload_max_filesize=50M post_max_size=50M max_file_uploads=20 date.timezone='UTC' extension=phpiredis.so opcache.enabled=1 opcache.memory_consumption=128 # MB, adjust to your needs opcache.max_accelerated_files=10000 # Adjust to your needs opcache.max_wasted_percentage=10 # Adjust to your needs opcache.validate_timestamps=0 process_control_timeout=10 #http://www.laruence.com/2015/10/02/3069.html opcache.huge_code_pages=1
后面的opcache开发阶段先注释掉缓存