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 ...
随机推荐
- Jenkins配置HTML报告(Windows环境)
1.首先安装插件HTML Publisher,点击直接安装 2.在任务中配置,构建后操作,添加Publish HTML reports 3.添加完成后,新增一项 4.HTML directory to ...
- Python自定义状态码枚举类
在Java里很容易做到自定义有状态码和状态说明的枚举类例如: public enum MyStatus { NOT_FOUND(404, "Required resource is not ...
- 可视化库-seaborn-布局风格设置(第五天)
1. sns.set_style() 进行风格设置, sns.set() 进行设置的重置, 五种风格 # 1.darkgrid# 2.whitegrid# 3.dark# 4.white# 5 tic ...
- 浮动float 摆放位置
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...
- as3 关闭加载流
/** Loader 取消加载**/ function closeQueueLoader():void { if (cur_loader && cur_loader.contentLo ...
- apiCloud事件发送与监听
apiCloud事件发送与监听 1.sendEvent 将任意一个自定义事件广播出去,该事件可在任意页面通过 addEventListener 监听收到. sendEvent({params}) 2. ...
- Python之风湿理论值函数即变量
一,风湿历练:函数即变量,这样执行程序是不会报错的 def foo(): print ("from foo") bar() def bar(): print "form ...
- 脚本中 %~dp0
cmd窗口中 for /? 查询参数含义 %~dp0, 将参数转换为磁盘路径+名字 例: 脚本中一行 %~dp0abc.exe (abc.exe位置c:\test\abc.exe) 展开后则为 c:\ ...
- you boot volume has only 0 byte size
懒人方法: uname -a 列出目前使用的内核 dpkg -l | grep linux-image 列出存在的linux内核 sudo apt-get purge linux-image-3.16 ...
- nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory)
nginx: [error] open() "/usr/local/var/run/nginx.pid" failed (2: No such file or directory) ...