阿里云 Centos 安装 NIGNIX+PHP73
1.安装nginx
yum install -y nginx
2.安装php73
2.1添加最新版本7.3到本地仓储
sudo yum -y install http://rpms.remirepo.net/enterprise/remi-release-7.rpm sudo yum -y install epel-release yum-utils
2.2禁用php54以及开启73
sudo yum-config-manager --disable remi-php54
sudo yum-config-manager --enable remi-php73
2.3安装
sudo yum -y install php php-cli php-fpm php-mysqlnd php-zip php-devel php-gd php-mcrypt php-mbstring php-curl php-xml php-pear php-bcmath php-json
2.4安装插件sqlsrv
curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo sudo yum -y install msodbcsql17 unixODBC sudo yum -y install php-sqlsrv
配置php-fpm与nginx
#打开/etc/php-fpm.d/www.conf #修改user 和group为 nginx user = nginx group = nginx #打开nginx.conf location ~ .*\.php$ { root 实际网站根目录; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; }