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 ...
随机推荐
- uva-539-枚举
题意: 给你一个无向图,找最长路. 俩份代码,感觉map[][]简单易懂啊 #include<stdio.h> #include<iostream> #include<s ...
- linux 使用随笔
目录:1,ab命令 一,ab命令 ab网站压力测试命令的参数.输出结果的中文注解 ab命令是Apache的Web服务器的性能测试工具,它可以测试安装Web服务器每秒种处理的HTTP请求. 来自: ht ...
- leetcode134
class Solution { public: inline int get_next(int idx, int size) { ? : idx+; } int aux(int idx, vecto ...
- SQL SERVER2008 DBX Error: Driver could not be properly initialized
raised exception class TDBXError with message 'DBX Error: Driver could not be properly initialized. ...
- AS3 os与version 区别 使用Capabilities类获取Flash Player的信息
AS3中flash.system.Capabilities类提供诸多静态的只读属性来描述应用程序当前所运行在的系统和运行时信息,如Flash Player,Adobe AIR,Flash Lite.通 ...
- Springmvc Exception
对于异常处理,大多使用一个共同的异常类统一处理从dao,service,controller层抛出的异常,将页面跳转到共同的error页面. public class CommonException ...
- linux c++下载http文件并显示进度<转>
#include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <net ...
- Elasticsearch之启动(前台和后台)
分为两种情况,取决于是否安装了tomat. 一.若安装了tomcat 1.es的前台启动 需要先启动tomcat,再启动es,否则会报错! 所以,得 2.es的后台启动 [hadoop@HadoopM ...
- mysql之MMM高可用方案简介
MMM(Master-Master Replication Manager for MySQL) MySQL主主复制管理器,提供了MySQL主主复制配置的监控.故障转移和管理的一套可伸缩的脚本套件.在 ...
- unity WWW加载进度条
using UnityEngine; using System.Collections; public class testProgress : MonoBehaviour { void Start ...