PHP7 Mysql5.6 nginx安装
sudo apt-get update
sudo apt-get install -y language-pack-en-baselocale-gen en_US.UTF-8
sudo apt-get install software-properties-common
sudo LC_ALL=en_US.UTF-8 add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get -y install php7.1s
udo apt-get -y install php7.1-mysql
sudo apt-get install php7.1-fpmapt-get install php7.1-curl php7.1-xml php7.1-mcrypt php7.1-json php7.1-gd php7.1-mbstring
sudo apt-get -y install nginx
sudo apt-get -y install mysql-server-5.6
配置PHP Nginx
sudo vim /etc/php/7.1/fpm/php.ini
// 将cgi.fix_pathinfo=1这一行去掉注释,将1改为0
sudo vim /etc/php/7.1/fpm/pool.d/www.conf
// 配置这个
listen = /var/run/php7.1-fpm.sock
sudo service php7.1-fpm restart
sudo vim /etc/nginx/sites-available/default
网友评论