Debian Buster 配置 Laravel 运行环境(nginx + redis + supervisor)
1 目标
将开发完成的 Laravel 项目布署于 Debian 之上。由于项目要求使用 horizon 官方扩展,要求 PHP7.1+,故采用 Debian buster (下一版)
2 材料
- IP 10.1.1.107
- 假定项目名称为 fmtmis (基于 Laravel 5.5)
- 假定项目目录为 /var/www/code/fmtmis/webroot
- 假定域名为 fmtmis.testing
- debian buster(10)
- nginx
- redis
- supervisor
3 步骤
3.1 安装 debian 9 (略)
修改 APT 源,将其指向 buster 版(将 stretch 换成 buster)
$ sudo vim /etc/apt/sources.list
更新数据
$ sudo aptitude update
3.2 安装 nginx
$ sudo aptitude install nginx
配置 nginx
$ sudo vim /etc/nginx/sites-available/fmtmis
内容如下:
server {
listen 80;
root /var/www/code/fmtmis/webroot/public;
index index.php;
server_name fmtmis.testing;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
3.3 安装 php7.2-fpm
$ sudo aptitude install php7.2-fpm php7.2-gd php7.2-json php7.2-mbstring php7.2-mysql php7.2-xml php7.2-zip
按 Laravel 手册要求,安装相应的扩展。
3.4 安装 redis
$ sudo aptitude install redis
3.5 安装 supervisor
$ sudo aptitude install supervisor
建立配置文件
$ sudo vim /etc/supervisor/conf.d/fmtmis.conf
内容如下:
[program:fmtmis-horizon]
process_name=%(program_name)s
command=php /var/www/code/fmtmis/webroot/artisan horizon
autostart=true
autorestart=true
user=root
redirect_stderr=true
stdout_logfile=/var/www/code/fmtmis/webroot/horizon.log
4 验证
$ sudo reboot
Horizon 仪表盘
Debian Buster 配置 Laravel 运行环境(nginx + redis + supervisor)的更多相关文章
- Ubuntu 17 Nginx 配置 laravel 运行环境
1 安装 nginx #aptitude install nginx #apatitude install php7.1-fpm 2 在 /etc/nginx/sites-available 建立 s ...
- PHP+FastCGI+Nginx配置PHP运行环境方法
PHP+FastCGI+Nginx配置PHP运行环境 Nginx不支持对外部程序的调用,所以必须通过FastCGI接口实现对外部程序的调用从而实现对客户端动态页面请求的处理. CGI的英文全称为Com ...
- 【netcore基础】CentOS 7.6.1810 搭建.net core 2.1 linux 运行环境 nginx反向代理 supervisor配置自启动
之前写过一篇Ubuntu的环境搭建博客,感觉一些配置大同小异,这里重点记录下 nginx 作为静态 angular 项目文件服务器的配置 参考链接 [netcore基础]ubuntu 16.04 搭建 ...
- Editplus配置java运行环境
Editplus配置java运行环境 下载及安装: editplus官网下载地址:https://www.editplus.com/ 安装方法和安装普通exe应用程序一样,选在安装路径,下一步下一步, ...
- 【Java SE】如何安装JDK以及配置Java运行环境
摘要:不管是作为苦逼的Java码农,还是高端大气的Java系统架构师,如果不会安装JDK以及配置Java运行环境,那就巧妇难为无米之炊,不能进行Java后续的代码编写.当然如果你是Myeclipse编 ...
- Windows2016的 IIS中配置PHP7运行环境
Windows2016的 IIS中配置PHP7运行环境 在Windows 的IIS(8.0)中搭建PHP运行环境: 一:安装IIS服务器 .进入控制面板>>程序和功能>>打开或 ...
- Sublime Text3配置Lua运行环境
Sublime Text3配置Lua运行环境 前言 要问现在哪个编译器最能扛得住潮流,要数Sublime Text3了,由于它的轻量,插件丰富,美观,造就了一大批粉丝(本菜鸡也是哦) 在以前的工作中使 ...
- 安装使用phpStudy在本机配置php运行环境
前言: php开发的初学者,强烈推荐使用phpStudy集成环境,一方面这个的确很好用(本人电脑安装了jspStudy,可以同时调试php和jsp),另一方面呢,虽然本人是技术控,但对这些繁杂的安装部 ...
- Win10下使用VSCode配置python运行环境
VSCode配置python运行环境 安装python 到官网下载python,直接安装即可,在安装过程中可以选择将python加入环境变量 安装VSCode 官网下载,直接安装 配置 安装pytho ...
随机推荐
- mysql Date查询当天、本周,本月,上一个月的数据
出自:http://www.cnblogs.com/benefitworld/p/5832897.html 今天 select * from 表名 where to_days(时间字段名) = t ...
- UVA-673-栈-水题
题意: 检测括号是否匹配,注意有空格 #include<stdio.h> #include<iostream> #include <strstream> #incl ...
- C_point指针
1,关于C语言中变量的访问方式,直接访问[使用变量名直接引用,操作变量进行赋值,改变变量值等操作],间接访问--指针,一种指向变量飞, 程序对变如量的读写操作,实际是对变量所在的存储空间进行写入和取出 ...
- Eclipse中java文件和jsp字体大小设置
1.更改java文件大小设置Window->preferences->General->Appearance->Colors and Fonts->Java-&g ...
- 1.Spring AOP (上)
转自:https://blog.csdn.net/yusheng8711/article/details/21622773 Spring有两大核心,IOC和AOP.IOC在java web项目中无时无 ...
- IOS CFBundleIdentifier
CFBundleIdentifier CFBundleIdentifier 必须是com.12306.aaa 这样的格式吗 AppID 用通配符格式的AppID方便. AppSt ...
- XE4 TStringDynArray 比 c6 的TStringList 好用 字符串 分解 分割 转换 TByteDynArray
TStringDynArray 动态数组 字符串 分解 分割 System::DynamicArray<System::UnicodeString> TByteDynArray, ...
- 机器学习入门-使用GridSearch进行网格参数搜索GridSeach(RandomRegressor(), param_grid, cv=3)
1.GridSeach(RandomRegressor(), param_grid, cv=3) GridSearch第一个参数是算法本身, 第二个参数是传入的参数组合, cv表示的是交叉验证的次数 ...
- CentOS开机卡在进度条,无法正常开机的排查办法
CentOS开机的时候卡在进度条一直进不去 重启,按f5键进度条/命令行界面方式切换,确认卡问题后处理就好 我这边卡在redis服务,设置为开机启动但是一直服务启动不起来 重启按住"e&qu ...
- XML文件的写,集合XML序列化(写)。XML文件的读,递归遍历
XML文件:必须要有一个节点.检验xml文件,可以用浏览器打开,能打开表示对,否则错. 处理方法: DOM:XmlDocument文档对象模型 Sax(事件驱动,XmlReader) XmlSeria ...