Debian(树莓派)下搭建LNMP
来源:互联网 发布:c语言substring 编辑:程序博客网 时间:2024/05/21 11:34
一、更新apt安装源
sudo apt-get install update
二、安装nginx
sudo apt-get install nginx
安装完成后,使用sudo service nginx start启动服务
nginx -v查看当前安装的版本
三、安装php
使用apt工具安装:
apt-get install php5-fpm php5-gd php5-mysql php5-curl
安装完成之后,可以使用“php5-fpm -v”查看PHP的版本。
四、配置nginx,使其支持php脚本的解释
打开nginx的配置文件:
sudo vi /etc/nginx/sites-enabled/default
# Self signed certs generated by the ssl-cert package # Don't use them in a production server! # # include snippets/snakeoil.conf; root /var/www/html;#设置nginx访问的虚拟主机空间地址
将注释的地方按如下更改:
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { include snippets/fastcgi-php.conf; #包含fastcgi的配置文件 # With php5-cgi alone: #fastcgi_pass 127.0.0.1:9000; #使用ip的方式请求cgi,即将http发来的php后缀的文件交由127.0.0.1:9000来处理,方法一 # With php5-fpm: fastcgi_pass unix:/var/run/php5-fpm.sock;#使用socket文件的方式处理,方法二。其中unix:后面的地址为个人电脑上php5-fpm.sock的真实路径 #以上两种处理方式选择其一即可 }
更改完毕后,保存配置文件,重新启动nginx服务。
五.写一个php文件,测试一下就OK了
阅读全文
0 0
- Debian(树莓派)下搭建LNMP
- debian下安装LNMP环境(一)
- debian下安装LNMP环境(二)
- debian下安装LNMP(三)
- Debian+Nginx+PHP(FastCGI)+MySQL搭建LNMP服务器(最新版)
- Debian 7/Ubuntu14.04 LNMP环境搭建
- SUSE10下搭建LNMP
- centos下LNMP搭建
- ubuntu下搭建lnmp
- Debian下使用apt-get安装lnmp
- Debian+Nginx+PHP(FastCGI)+MySQL搭建LNMP服务器(三版)
- Debian+Nginx+PHP(FastCGI)+MySQL搭建LNMP服务器(三版)
- linux下lnmp环境搭建
- linux下LNMP环境搭建
- linux 下LNMP环境搭建
- Ubuntu 下搭建LNMP架构
- CentOS下LNMP环境搭建
- Lnmp环境下搭建SVN
- 【redis内部结构】skiplist
- Java设计模式之观察者模式
- CUSTOM_CONFIG_MAX_DRAM_SIZE的大小换算
- (一) Spring基础概述
- kotlin学习笔记——重载操作符
- Debian(树莓派)下搭建LNMP
- Vultr搭建SSR并开通多端口+锐速
- stm32 systick
- Deep Learning based Recommender System: A Survey and New Perspectives
- 发布 asp.net网站 到本地IIS
- 一个很好的IPtables讲解的文章
- js加jquery的livequery插件重新改写拖拽插件以适应webpack
- 第五章---引入VIP后的数据库架构
- 函数传值的三种方法