ubuntu 安装php7.1
文章目录
1、更新ubuntu系统
sudo apt-get update
2、安装php
add-apt-repository ppa:ondrej/php 添加php源
apt-get update
apt-get install php7.1-fpm 安装php-fpm
3、安装nginx
4、配置
编辑 vim /etc/nginx/sites-available/default
取消"location ~ .php"的注释,如下三行对应修改
root /www;
fastcgi_pass unix:/run/php/php7.1-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
5、重启nginx
sudo service nginx restart
评论
登录后参与技术讨论,分享你的经验与见解。
登录 / 注册暂无评论