ubuntu 14.0.4LTS安装LNMP php7.0(主要用于个人笔记 勿喷)
2015-12-23 15:50
543 查看
开启ubutnu后联网开始安装
1、更新包
sudoapt-getupdate
2、去安装add-apt-repository
sudoapt-getinstallpython-software-properties
sudoLC_ALL=en_US.UTF-8add-apt-repositoryppa:ondrej/php
sudoapt-getinstallphp7.0php7.0-fpmphp7.0-mysql
6、安装nginx
sudoapt-getinstallnginx
7、安装mysql
sudoapt-getinstallmysql-service-5.6
8、让nginx链接php-fpm
把fastcgi_passunix:/var/run/php/php5-fpm.sock;
改成fastcgi_passunix:/var/run/php/php7-fpm.sock;
取消location~\.php${}的注释
注释fastcgi_pass127.0.0.1:9000
9、设置/etc/php/7.0/fpm/pool.d/www.conf(若出现502在执行下面两步)
把listen=/run/php/php7.0-fpm.sock
换成listen=127.0.0.1:9000
注释fastcgi_passunix:/var/run/php/php7-fpm.sock;
10、设置/etc/nginx/sites-available/default
把index index.htmlindex.htm;改成
indexindex.phpindex.htmlindex.htm;
在添加一行fastcgi_pass127.0.0.1:9000;
重启php-fpm7.0服务和nginx服务
1、更新包
sudoapt-getupdate
2、去安装add-apt-repository
sudoapt-getinstallpython-software-properties
sudo
apt-get
install
software-properties-common
3、安装php7.0来源包
sudoLC_ALL=en_US.UTF-8add-apt-repositoryppa:ondrej/php
4、更新包
sudoapt-getupdate
5、安装php7
sudoapt-getinstallphp7.0php7.0-fpmphp7.0-mysql
6、安装nginx
sudoapt-getinstallnginx
7、安装mysql
sudoapt-getinstallmysql-service-5.6
8、让nginx链接php-fpm
把fastcgi_passunix:/var/run/php/php5-fpm.sock;
改成fastcgi_passunix:/var/run/php/php7-fpm.sock;
取消location~\.php${}的注释
注释fastcgi_pass127.0.0.1:9000
9、设置/etc/php/7.0/fpm/pool.d/www.conf(若出现502在执行下面两步)
把listen=/run/php/php7.0-fpm.sock
换成listen=127.0.0.1:9000
注释fastcgi_passunix:/var/run/php/php7-fpm.sock;
10、设置/etc/nginx/sites-available/default
把index index.htmlindex.htm;改成
indexindex.phpindex.htmlindex.htm;
在添加一行fastcgi_pass127.0.0.1:9000;
重启php-fpm7.0服务和nginx服务
相关文章推荐
- PHP rawurlencode与urlencode函数的深入分析
- php pctnl拓展安装
- php.ini 配置上传大文件大小和响应时间
- Linxu服务器安装PHP7并配置GD
- php的访问属性:public;protect;private
- PHP学习笔记-2(类与对象)
- PhpStorm 10.0.1安装(win7-64位)
- 你还需要除PHP之外的编程语言吗(2)
- php,c# hamsha1
- 你还需要除PHP之外的编程语言吗(1)
- php变量和数组大小限制
- PHP学习笔记-1(变量、常量、类型、作用域、数组、字符串、大小写)
- php中重载的概念
- TP模板继承
- php中的curl使用入门教程和常见用法实例
- phpstorm修改html模板
- php 对数组按照字符串长度排序
- 分享PHP计算两个日期相差天数的代码
- 使用 Zend Opcache 加速 PHP
- 阿里云服务器php composer安装提示超时等失败信息