<!DOCTYPE HTML>
< html lang = "zh-hans" >
< head >
< meta charset = "UTF-8" >
< meta content = "text/html; charset=utf-8" http-equiv = "Content-Type" >
< title > 前端部署 · 调度系统-EasyScheduler< / title >
< meta http-equiv = "X-UA-Compatible" content = "IE=edge" / >
< meta name = "description" content = "" >
< meta name = "generator" content = "GitBook 3.2.3" >
< meta name = "author" content = "YIGUAN" >
< link rel = "stylesheet" href = "../gitbook/style.css" >
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css" >
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-insert-logo-link/plugin.css" >
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-highlight/website.css" >
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-search/search.css" >
< link rel = "stylesheet" href = "../gitbook/gitbook-plugin-fontsettings/website.css" >
< link rel = "stylesheet" href = "../styles/website.css" >
< meta name = "HandheldFriendly" content = "true" / >
< meta name = "viewport" content = "width=device-width, initial-scale=1, user-scalable=no" >
< meta name = "apple-mobile-web-app-capable" content = "yes" >
< meta name = "apple-mobile-web-app-status-bar-style" content = "black" >
< link rel = "apple-touch-icon-precomposed" sizes = "152x152" href = "../gitbook/images/apple-touch-icon-precomposed-152.png" >
< link rel = "shortcut icon" href = "../gitbook/images/favicon.ico" type = "image/x-icon" >
< link rel = "next" href = "deploy-foreground.html" / >
< / head >
< body >
< div class = "book" >
< div class = "book-summary" >
< div id = "book-search-input" role = "search" >
< input type = "text" placeholder = "输入并搜索" / >
< / div >
< nav role = "navigation" >
< ul class = "summary" >
< li class = "chapter " data-level = "1.1" data-path = "../" >
< a href = "../" >
Easyscheduler简介
< / a >
< / li >
< li class = "chapter " data-level = "1.2" >
< span >
导读指南
< / span >
< ul class = "articles" >
< li class = "chapter " data-level = "1.2.1" data-path = "guide-architecture.html" >
< a href = "guide-architecture.html" >
系统架构分析
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "1.2.1.1" data-path = "guide-architecture.html" >
< a href = "guide-architecture.html#导语" >
导语
< / a >
< / li >
< li class = "chapter " data-level = "1.2.1.2" data-path = "guide-architecture.html" >
< a href = "guide-architecture.html#背景" >
背景
< / a >
< / li >
< li class = "chapter " data-level = "1.2.1.3" data-path = "guide-architecture.html" >
< a href = "guide-architecture.html#总架构设计" >
总架构设计
< / a >
< / li >
< li class = "chapter " data-level = "1.2.1.4" data-path = "guide-architecture.html" >
< a href = "guide-architecture.html#中心化思想" >
中心化思想
< / a >
< / li >
< li class = "chapter " data-level = "1.2.1.5" data-path = "guide-architecture.html" >
< a href = "guide-architecture.html#分布式锁实践" >
分布式锁实践
< / a >
< / li >
< li class = "chapter " data-level = "1.2.1.6" data-path = "guide-architecture.html" >
< a href = "guide-architecture.html#线程不足循环等待问题" >
线程不足循环等待问题
< / a >
< / li >
< li class = "chapter " data-level = "1.2.1.7" data-path = "guide-architecture.html" >
< a href = "guide-architecture.html#容错设计" >
容错设计
< / a >
< / li >
< li class = "chapter " data-level = "1.2.1.8" data-path = "guide-architecture.html" >
< a href = "guide-architecture.html#日志访问" >
Logback和gRPC实现日志访问
< / a >
< / li >
< li class = "chapter " data-level = "1.2.1.9" data-path = "guide-architecture.html" >
< a href = "guide-architecture.html#总结" >
总结
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "1.2.2" data-path = "guide-manual.html" >
< a href = "guide-manual.html" >
使用手册
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "1.2.2.1" data-path = "guide-manual.html" >
< a href = "guide-manual.html#登录" >
登录
< / a >
< / li >
< li class = "chapter " data-level = "1.2.2.2" data-path = "guide-manual.html" >
< a href = "guide-manual.html#安全中心" >
安全中心
< / a >
< / li >
< li class = "chapter " data-level = "1.2.2.3" data-path = "guide-manual.html" >
< a href = "guide-manual.html#资源中心" >
资源中心
< / a >
< / li >
< li class = "chapter " data-level = "1.2.2.4" data-path = "guide-manual.html" >
< a href = "guide-manual.html#数据源中心" >
数据源中心
< / a >
< / li >
< li class = "chapter " data-level = "1.2.2.5" data-path = "guide-manual.html" >
< a href = "guide-manual.html#项目管理" >
项目管理
< / a >
< / li >
< li class = "chapter " data-level = "1.2.2.6" data-path = "guide-manual.html" >
< a href = "guide-manual.html#首页" >
站点首页
< / a >
< / li >
< li class = "chapter " data-level = "1.2.2.7" data-path = "guide-manual.html" >
< a href = "guide-manual.html#任务依赖" >
任务依赖
< / a >
< / li >
< li class = "chapter " data-level = "1.2.2.8" data-path = "guide-manual.html" >
< a href = "guide-manual.html#系统参数" >
系统参数
< / a >
< / li >
< / ul >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "1.3" >
< span >
项目部署文档
< / span >
< ul class = "articles" >
< li class = "chapter active" data-level = "1.3.1" data-path = "deploy-foreground.html" >
< a href = "deploy-foreground.html" >
前端部署
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "1.3.1.1" data-path = "deploy-foreground.html" >
< a href = "deploy-foreground.html#前端项目环境构建及编译" >
前端项目环境构建及编译
< / a >
< / li >
< li class = "chapter " data-level = "1.3.1.2" data-path = "deploy-foreground.html" >
< a href = "deploy-foreground.html#安装及配置" >
安装及配置
< / a >
< / li >
< li class = "chapter " data-level = "1.3.1.3" data-path = "deploy-foreground.html" >
< a href = "deploy-foreground.html#项目生产环境配置" >
项目生产环境Nginx配置
< / a >
< / li >
< li class = "chapter " data-level = "1.3.1.4" data-path = "deploy-foreground.html" >
< a href = "deploy-foreground.html#前端项目发布" >
前端项目发布
< / a >
< / li >
< li class = "chapter " data-level = "1.3.1.5" data-path = "deploy-foreground.html" >
< a href = "deploy-foreground.html#问题" >
问题
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "1.3.2" data-path = "deploy-background.html" >
< a href = "deploy-background.html" >
后端部署
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "1.3.2.1" data-path = "deploy-background.html" >
< a href = "deploy-background.html#基础软件安装" >
基础软件安装
< / a >
< / li >
< li class = "chapter " data-level = "1.3.2.2" data-path = "deploy-background.html" >
< a href = "deploy-background.html#项目编译" >
项目编译
< / a >
< / li >
< li class = "chapter " data-level = "1.3.2.3" data-path = "deploy-background.html" >
< a href = "deploy-background.html#数据库初始化" >
数据库初始化
< / a >
< / li >
< li class = "chapter " data-level = "1.3.2.4" data-path = "deploy-background.html" >
< a href = "deploy-background.html#创建部署用户" >
创建部署用户
< / a >
< / li >
< li class = "chapter " data-level = "1.3.2.5" data-path = "deploy-background.html" >
< a href = "deploy-background.html#配置文件" >
配置文件
< / a >
< ul class = "articles" >
< li class = "chapter " data-level = "1.3.2.5.1" data-path = "deploy-background.html" >
< a href = "deploy-background.html#escheduler-alert" >
escheduler-alert
< / a >
< / li >
< li class = "chapter " data-level = "1.3.2.5.2" data-path = "deploy-background.html" >
< a href = "deploy-background.html#escheduler-common" >
escheduler-common
< / a >
< / li >
< li class = "chapter " data-level = "1.3.2.5.3" data-path = "deploy-background.html" >
< a href = "deploy-background.html#escheduler-dao" >
escheduler-dao
< / a >
< / li >
< li class = "chapter " data-level = "1.3.2.5.4" data-path = "deploy-background.html" >
< a href = "deploy-background.html#escheduler-server" >
escheduler-server
< / a >
< / li >
< li class = "chapter " data-level = "1.3.2.5.5" data-path = "deploy-background.html" >
< a href = "deploy-background.html#escheduler-web" >
escheduler-web
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "1.3.2.6" data-path = "deploy-background.html" >
< a href = "deploy-background.html#启动停止命令" >
启动停止命令
< / a >
< / li >
< li class = "chapter " data-level = "1.3.2.7" data-path = "deploy-background.html" >
< a href = "deploy-background.html#一键启停脚本" >
一键启停脚本
< / a >
< / li >
< li class = "chapter " data-level = "1.3.2.8" data-path = "deploy-background.html" >
< a href = "deploy-background.html#监控服务" >
监控服务
< / a >
< / li >
< li class = "chapter " data-level = "1.3.2.9" data-path = "deploy-background.html" >
< a href = "deploy-background.html#日志查看" >
日志查看
< / a >
< / li >
< / ul >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "1.4" >
< span >
前端开发文档
< / span >
< ul class = "articles" >
< li class = "chapter " data-level = "1.4.1" data-path = "foreground-2.html" >
< a href = "foreground-2.html" >
安装
< / a >
< / li >
< / ul >
< / li >
< li class = "chapter " data-level = "1.5" >
< span >
后端开发文档
< / span >
< ul class = "articles" >
< li class = "chapter " data-level = "1.5.1" data-path = "background-2.html" >
< a href = "background-2.html" >
后端说明2
< / a >
< / li >
< / ul >
< / li >
< li class = "divider" > < / li >
< li >
< a href = "https://www.gitbook.com" target = "blank" class = "gitbook-link" >
本书使用 GitBook 发布
< / a >
< / li >
< / ul >
< / nav >
< / div >
< div class = "book-body" >
< div class = "body-inner" >
< div class = "book-header" role = "navigation" >
<!-- Title -->
< h1 >
< i class = "fa fa-circle-o-notch fa-spin" > < / i >
< a href = ".." > 前端部署< / a >
< / h1 >
< / div >
< div class = "page-wrapper" tabindex = "-1" role = "main" >
< div class = "page-inner" >
< div id = "book-search-results" >
< div class = "search-noresults" >
< section class = "normal markdown-section" >
< h1 id = "前端部署文档" > 前 端 部 署 文 档 < / h1 >
< h2 id = "前端项目环境构建及编译" > 前 端 项 目 环 境 构 建 及 编 译 < / h2 >
< h4 id = "escheduler项目前端技术栈" > Escheduler项 目 前 端 技 术 栈 < / h4 >
< h5 id = "vue--es6--ans-ui--d3--jsplumb--lodash" > < code > Vue + es6 + Ans-ui + d3 + jsplumb + lodash< / code > < / h5 >
< h4 id = "开发环境" > 开 发 环 境 < / h4 >
< h5 id = "node" > < code > Node< / code > < / h5 >
< ul >
< li > < h4 id = "node安装" > node安 装 < / h4 >
< p > Node包 下 载 (注 意 版 本 8.9.4) < code > https://nodejs.org/download/release/v8.9.4/< / code > < / p >
< / li >
< li > < h4 id = "拉取前端项目到本地" > 拉 取 前 端 项 目 到 本 地 < / h4 >
< p > 项 目 git仓 库 地 址 < code > git@git.analysys.cn:analysys_changsha/escheduler.git< / code > < / p >
< / li >
< li > < h4 id = "前端项目构建" > 前 端 项 目 构 建 < / h4 >
< p > 用 命 令 行 模 式 < code > cd< / code > 进 入 < code > escheduler< / code > 项 目 目 录 并 执 行 < code > npm install< / code > 拉 取 项 目 依 赖 包 < / p >
< / li >
< / ul >
< blockquote >
< p > 如 果 < code > npm install< / code > 速 度 非 常 慢 < / p >
< p > 可 以 转 淘 宝 镜 像 命 令 行 输 入 < code > npm install -g cnpm --registry=https://registry.npm.taobao.org< / code > < / p >
< p > 运 行 < code > cnpm install< / code > < / p >
< h5 id = "!!!这里特别注意-项目如果在拉取依赖包的过程中报--node-sass-error--错误,请在执行完后再次执行以下命令" > ! ! ! 这 里 特 别 注 意 项 目 如 果 在 拉 取 依 赖 包 的 过 程 中 报 " node-sass error " 错 误 , 请 在 执 行 完 后 再 次 执 行 以 下 命 令 < / h5 >
< pre > < code > npm install node-sass --unsafe-perm //单 独 安 装 node-sass依 赖
< / code > < / pre > < / blockquote >
< p > 项 目 根 目 录 创 建 < code > .env< / code > 为 后 缀 名 的 文 件 并 输 入 < / p >
< pre > < code > # 前 端 代 理 的 接 口 地 址
API_BASE = http://192.168.220.204:12345
# 如 果 您 需 要 用 ip访 问 项 目 可 以 把 " #" 号 去 掉
#DEV_HOST = 192.168.6.132
< / code > < / pre > < p > 运 行 < / p >
< ul >
< li > < p > < code > npm start< / code > 项 目 开 发 环 境 (启 动 后 访 问 地 址 < a href = "http://localhost:8888/#/" target = "_blank" > http://localhost:8888/#/< / a > )< / p >
< / li >
< li > < p > < code > npm run build< / code > 项 目 打 包 (打 包 后 根 目 录 会 创 建 一 个 名 为 dist文 件 夹 , 用 于 发 布 线 上 Nginx)< / p >
< / li >
< / ul >
< h2 id = "安装及配置" > 安 装 及 配 置 < / h2 >
< h3 id = "1-1-nginx安装" > (1-1) Nginx安 装 < / h3 >
< p > 安 装 < code > wget http://nginx.org/download/nginx-1.10.1.tar.gz< / code > < / p >
< p > Nginx的 配 置 及 运 行 需 要 pcre、 zlib等 软 件 包 的 支 持 , 因 此 应 预 先 安 装 这 些 软 件 的 开 发 包 ( devel) , 以 便 提 供 相 应 的 库 和 头 文 件 , 确 保 Nginx的 安 装 顺 利 完 成 。 < / p >
< pre > < code > [root@nginx ~]# service iptables stop
[root@nginx ~]# setenforce 0
[root@nginx ~]# mount /dev/cdrom /mnt/
[root@nginx ~]# vim /etc/yum.repos.d/yum.repo
[base]
name=RedHat Enterprise Linux Server
baseurl=file:///mnt/Packages
gpgcheck=0
[root@nginx ~]# yum -y install pcre-devel zilb-devel openssl-devel
< / code > < / pre > < h3 id = "1-2-创建运行用户、组" > (1-2) 创 建 运 行 用 户 、 组 < / h3 >
< p > Nginx服 务 程 序 默 认 以 nobody身 份 运 行 , 建 议 为 其 创 建 专 门 的 用 户 账 号 , 以 便 更 准 确 地 控 制 其 访 问 权 限 , 增 加 灵 活 性 、 降 低 安 全 风 险 。 如 : 创 建 一 个 名 为 nginx的 用 户 , 不 建 立 宿 主 目 录 , 也 禁 止 登 录 到 shell环 境 。 < / p >
< pre > < code > [root@nginx ~]# useradd -M -s /sbin/nologin escheduler
< / code > < / pre > < h3 id = "1-3-编译安装nginx" > (1-3) 编 译 安 装 nginx< / h3 >
< p > 释 放 nginx源 码 包 < / p >
< pre > < code > [root@nginx ~]# tar xf nginx-1.6.2.tar.gz -C /usr/src/
< / code > < / pre > < p > 编 译 前 配 置 < / p >
< pre > < code > [root@nginx ~]# cd /usr/src/nginx-1.6.2/
[root@nginx nginx-1.6.2]# ./configure --prefix=/usr/local/nginx --user=escheduler --group=escheduler --with-http_stub_status_module --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module
< / code > < / pre > < p > 注 : 配 置 前 可 以 参 考 ./configure --help给 出 说 明 < / p >
< pre > < code > --prefix 设 定 Nginx的 安 装 目 录
--user和 — group 指 定 Nginx运 行 用 户 和 组
--with-http_stub_status_module 启 用 http_stub_status_module模 块 以 支 持 状 态 统 计
--with-http_ssl_module 启 用 SSL模 块
< / code > < / pre > < blockquote >
< h4 id = "错误" > 错 误 < / h4 >
< pre > < code > [root@centos nginx-1.6.2]# ./configure --prefix=/usr/local/nginx --user=escheduler --group=escheduler --with-http_stub_status_module --with-http_ssl_module --with-http_flv_module --with-http_gzip_static_module
checking for OS
+ Linux 2.6.32-431.el6.i686 i686
checking for C compiler ... not found
./configure: error: C compiler cc is not found
< / code > < / pre > < h4 id = "解决方法" > 解 决 方 法 < / h4 >
< pre > < code > yum -y install gcc gcc-c++
< / code > < / pre > < / blockquote >
< p > 编 译 安 装 < / p >
< pre > < code > [root@nginx nginx-1.6.2]# make & & make install
< / code > < / pre > < p > 为 了 使 Nginx服 务 器 的 运 行 更 加 方 便 , 可 以 为 主 程 序 nginx创 建 链 接 文 件 , 以 便 管 理 员 直 接 执 行 nginx命 令 就 可 以 调 用 Nginx的 主 程 序 。 < / p >
< pre > < code > [root@nginx nginx-1.6.2]# ln -s /usr/local/nginx/sbin/nginx /usr/local/bin/
[root@nginx nginx-1.6.2]# ll /usr/local/bin/nginx
lrwxrwxrwx 1 root root 27 12-29 07:24 /usr/local/bin/nginx -> /usr/local/nginx/sbin/nginx
< / code > < / pre > < p > Nginx的 运 行 控 制
与 Apache的 主 程 序 httpd类 似 , Nginx的 主 程 序 也 提 供 了 " -t" 选 项 用 来 对 配 置 文 件 进 行 检 查 , 以 便 找 出 不 当 或 错 误 的 配 置 。 配 置 文 件 nginx.conf默 认 位 于 安 装 目 录 /usr/local/nginx/conf/目 录 中 。 若 要 检 查 位 于 其 他 位 置 的 配 置 文 件 , 可 使 用 " -c" 选 项 来 指 定 路 径 。 < / p >
< pre > < code > root@nginx conf]# nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
< / code > < / pre > < p > 启 动 、 停 止 Nginx
直 接 运 行 nginx即 可 启 动 Nginx服 务 器 , 这 种 方 式 将 使 用 默 认 的 配 置 文 件 , 若 要 改 用 其 他 配 置 文 件 , 需 添 加 " -c 配 置 文 件 路 径 " 选 项 来 指 定 路 径 。 需 要 注 意 的 是 , 若 服 务 器 中 已 安 装 有 httpd等 其 他 WEB服 务 软 件 , 应 采 取 措 施 ( 修 改 端 口 , 停 用 或 卸 载 ) 避 免 部 突 。 < / p >
< pre > < code > [root@nginx conf]# chown -R escheduler:escheduler /usr/local/nginx
/usr/local/nginx/conf/nginx.conf
[root@nginx conf]# netstat -anpt |grep :80
[root@nginx conf]# nginx
[root@nginx conf]# netstat -anpt |grep :80
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 6810/nginx: master
< / code > < / pre > < p > 通 过 检 查 Nginx程 序 的 监 听 状 态 , 或 者 在 浏 览 器 中 访 问 此 WEB服 务 ( 默 认 页 面 将 显 示 " Welcome to nginx!" ) , 可 以 确 认 Nginx服 务 是 否 正 常 运 行 。 < / p >
< pre > < code > [root@nginx ~]# yum -y install elinks
[root@nginx ~]# elinks --dump http://localhost
Welcome to nginx!
< / code > < / pre > < p > 主 程 序 Nginx支 持 标 准 的 进 程 信 号 , 通 过 kill或 者 killall命 令 传 送 < / p >
< pre > < code > HUP 重 载 配 置 等 同 于 -1
QUIT 退 出 进 程 等 同 于 -3
KILL 杀 死 进 程
[root@nginx ~]# killall -s HUP nginx
[root@nginx ~]# killall -s QUIT nginx
[root@nginx ~]# netstat -anpt |grep :80
< / code > < / pre > < p > 当 Nginx进 程 运 行 时 , PID号 默 认 存 放 在 logs/目 录 下 的 nginx.pid文 件 中 , 因 此 若 改 用 kill命 令 , 也 可 以 根 据 nginx.pid文 件 中 的 PID号 来 进 行 控 制 。
为 了 使 Nginx服 务 的 启 动 、 停 止 、 重 载 等 操 作 更 加 方 便 , 可 以 编 写 Nginx服 务 脚 本 , 并 使 用 chkconfig和 service工 具 来 进 行 管 理 , 也 更 加 符 合 RHEL系 统 的 管 理 习 惯 。 < / p >
< pre > < code > [root@nginx ~]# vim /etc/init.d/nginx
< / code > < / pre > < p > 脚 本 一 < / p >
< pre > < code > #!/bin/bash
# chkconfig: 2345 99 20
# description: Nginx Server Control Script
PROG=" /usr/local/nginx/sbin/nginx"
PIDF=" /usr/local/nginx/logs/nginx.pid"
case " $1" in
start)
$PROG
;;
stop)
kill -s QUIT $(cat $PIDF)
;;
restart)
$0 stop
$0 start
;;
reload)
kill -s HUP $(cat $PIDF)
;;
*)
echo " Usage: $0 (start|stop|restart|reload)"
exit 1
esac
exit 0
[root@nginx ~]# chmod +x /etc/init.d/nginx
[root@nginx ~]# chkconfig --add nginx
[root@nginx ~]# chkconfig nginx on
[root@nginx ~]# chkconfig --list nginx
nginx 0:关 闭 1:关 闭 2:启 用 3:启 用 4:启 用 5:启 用 6:关 闭
< / code > < / pre > < p > 报 错 的 话 : < code > /usr/local/nginx/sbin/nginx -c /usr/local/nginx/conf/nginx.conf< / code > < / p >
< p > 这 样 就 可 以 通 过 nginx脚 本 来 启 动 、 停 止 、 重 启 、 重 载 Nginx服 务 器 了 。 < / p >
< h3 id = "2-1-root安装" > (2-1) root安 装 < / h3 >
< p > 安 装 epel源 < code > yum install epel-release -y< / code > < / p >
< p > 安 装 Nginx < code > yum install nginx -y< / code > < / p >
< h4 id = "命令" > 命 令 < / h4 >
< ul >
< li > < p > 启 用 < code > systemctl enable nginx< / code > < / p >
< / li >
< li > < p > 重 启 < code > systemctl restart nginx< / code > < / p >
< / li >
< li > < p > 状 态 < code > systemctl status nginx< / code > < / p >
< / li >
< / ul >
< h1 id = "项目生产环境配置" > 项 目 生 产 环 境 配 置 < / h1 >
< blockquote >
< h4 id = "创建静态页面存放目录" > 创 建 静 态 页 面 存 放 目 录 < / h4 >
< pre > < code > mkdir /data2_4T/escheduler_front/escheduler/server
< / code > < / pre > < h4 id = "配置文件地址" > 配 置 文 件 地 址 < / h4 >
< pre > < code > /etc/nginx/conf.d/default.conf
< / code > < / pre > < h4 id = "配置信息" > 配 置 信 息 < / h4 >
< pre > < code > server {
listen 8888;# 访 问 端 口
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location / {
root /data2_4T/escheduler_front/escheduler/server; # 静 态 文 件 目 录
index index.html index.html;
}
location /escheduler {
proxy_pass http://192.168.220.181:12345; # 接 口 地 址
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header x_real_ipP $remote_addr;
proxy_set_header remote_addr $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_connect_timeout 4s;
proxy_read_timeout 30s;
proxy_send_timeout 12s;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection " upgrade" ;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}
< / code > < / pre > < h4 id = "重启nginx服务" > 重 启 Nginx服 务 < / h4 >
< pre > < code > systemctl restart nginx
< / code > < / pre > < / blockquote >
< h2 id = "前端项目发布" > 前 端 项 目 发 布 < / h2 >
< p > 前 端 在 开 发 环 境 ( dev) 中 运 行 < code > npm run build< / code > 命 令 , 生 成 打 包 文 件 ( dist) 包 < / p >
< p > 再 拷 贝 到 服 务 器 < code > /data2_4T/escheduler_front/escheduler/server< / code > ( 服 务 器 静 态 页 面 存 放 目 录 ) < / p >
< p > 访 问 地 址 < code > http://localhost:8888/#/< / code > < / p >
< h2 id = "问题" > 问 题 < / h2 >
< h4 id = "1-上传文件大小限制" > 1. 上 传 文 件 大 小 限 制 < / h4 >
< p > 编 辑 配 置 文 件 < code > vi /etc/nginx/nginx.conf< / code > < / p >
< pre > < code > # 更 改 上 传 大 小
client_max_body_size 1024m
< / code > < / pre >
< / section >
< / div >
< div class = "search-results" >
< div class = "has-results" >
< h1 class = "search-results-title" > < span class = 'search-results-count' > < / span > results matching "< span class = 'search-query' > < / span > "< / h1 >
< ul class = "search-results-list" > < / ul >
< / div >
< div class = "no-results" >
< h1 class = "search-results-title" > No results matching "< span class = 'search-query' > < / span > "< / h1 >
< / div >
< / div >
< / div >
< / div >
< / div >
< / div >
< a href = "deploy-foreground.html#前端项目环境构建及编译" class = "navigation navigation-next navigation-unique" aria-label = "Next page: 前端项目环境构建及编译" >
< i class = "fa fa-angle-right" > < / i >
< / a >
< / div >
< script >
var gitbook = gitbook || [];
gitbook.push(function() {
gitbook.page.hasChanged({"page":{"title":"前端部署","level":"1.3.1","depth":2,"next":{"title":"前端项目环境构建及编译","level":"1.3.1.1","depth":3,"anchor":"#前端项目环境构建及编译","path":"pages/deploy-foreground.md","ref":"pages/deploy-foreground.md#前端项目环境构建及编译","articles":[]},"previous":{"title":"项目部署文档","level":"1.3","depth":1,"ref":"","articles":[{"title":"前端部署","level":"1.3.1","depth":2,"path":"pages/deploy-foreground.md","ref":"pages/deploy-foreground.md","articles":[{"title":"前端项目环境构建及编译","level":"1.3.1.1","depth":3,"anchor":"#前端项目环境构建及编译","path":"pages/deploy-foreground.md","ref":"pages/deploy-foreground.md#前端项目环境构建及编译","articles":[]},{"title":"安装及配置","level":"1.3.1.2","depth":3,"anchor":"#安装及配置","path":"pages/deploy-foreground.md","ref":"pages/deploy-foreground.md#安装及配置","articles":[]},{"title":"项目生产环境Nginx配置","level":"1.3.1.3","depth":3,"anchor":"#项目生产环境配置","path":"pages/deploy-foreground.md","ref":"pages/deploy-foreground.md#项目生产环境配置","articles":[]},{"title":"前端项目发布","level":"1.3.1.4","depth":3,"anchor":"#前端项目发布","path":"pages/deploy-foreground.md","ref":"pages/deploy-foreground.md#前端项目发布","articles":[]},{"title":"问题","level":"1.3.1.5","depth":3,"anchor":"#问题","path":"pages/deploy-foreground.md","ref":"pages/deploy-foreground.md#问题","articles":[]}]},{"title":"后端部署","level":"1.3.2","depth":2,"path":"pages/deploy-background.md","ref":"pages/deploy-background.md","articles":[{"title":"基础软件安装","level":"1.3.2.1","depth":3,"anchor":"#基础软件安装","path":"pages/deploy-background.md","ref":"pages/deploy-background.md#基础软件安装","articles":[]},{"title":"项目编译","level":"1.3.2.2","depth":3,"anchor":"#项目编译","path":"pages/deploy-background.md","ref":"pages/deploy-background.md#项目编译","articles":[]},{"title":"数据库初始化","level":"1.3.2.3","depth":3,"anchor":"#数据库初始化","path":"pages/deploy-background.md","ref":"pages/deploy-background.md#数据库初始化","articles":[]},{"title":"创建部署用户","level":"1.3.2.4","depth":3,"anchor":"#创建部署用户","path":"pages/deploy-background.md","ref":"pages/deploy-background.md#创建部署用户","articles":[]},{"title":"配置文件","level":"1.3.2.5","depth":3,"anchor":"#配置文件","path":"pages/deploy-background.md","ref":"pages/deploy-background.md#配置文件","articles":[{"title":"escheduler-alert","level":"1.3.2.5.1","depth":4,"anchor":"#escheduler-alert","path":"pages/deploy-background.md","ref":"pages/deploy-background.md#escheduler-alert","articles":[]},{"title":"escheduler-common","level":"1.3.2.5.2","depth":4,"anchor":"#escheduler-common","path":"pages/deploy-background.md","ref":"pages/deploy-background.md#escheduler-common","articles":[]},{"title":"escheduler-dao","level":"1.3.2.5.3","depth":4,"anchor":"#escheduler-dao","path":"pages/deploy-background.md","ref":"pages/deploy-background.md#escheduler-dao","articles":[]},{"title":"escheduler-server","level":"1.3.2.5.4","depth":4,"anchor":"#escheduler-server","path":"pages/deploy-background.md","ref":"pages/deploy-background.md#escheduler-server","articles":[]},{"title":"escheduler-web","level":"1.3.2.5.5","depth":4,"anchor":"#escheduler-web","path":"pages/deploy-background.md","ref":"pages/deploy-background.md#escheduler-web","articles":[]}]},{"title":"启动停止命令","level":"1.3.2.6","depth":3,"anchor":"#启动停止命令","path":"pages/deploy-background.md","ref":"pages/deploy-background.md#启动停止命令","articles":[]},{"title":"一键启停脚本","level":"1.3.2.7","depth":3,"anchor":"#一键启停脚本","path":"pages/deploy-background.md","ref":"pages/deploy-background.md#一键启停脚本","articles":[]},{"title":"监控服务","level":"1.3.2.8","depth":3,"anchor":"#监控服务","path":"pages/deploy-background.md","ref":"pages/deploy-background
});
< / script >
< / div >
< script src = "../gitbook/gitbook.js" > < / script >
< script src = "../gitbook/theme.js" > < / script >
< script src = "../gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js" > < / script >
< script src = "../gitbook/gitbook-plugin-insert-logo-link/plugin.js" > < / script >
< script src = "../gitbook/gitbook-plugin-livereload/plugin.js" > < / script >
< script src = "../gitbook/gitbook-plugin-search/search-engine.js" > < / script >
< script src = "../gitbook/gitbook-plugin-search/search.js" > < / script >
< script src = "../gitbook/gitbook-plugin-lunr/lunr.min.js" > < / script >
< script src = "../gitbook/gitbook-plugin-lunr/search-lunr.js" > < / script >
< script src = "../gitbook/gitbook-plugin-sharing/buttons.js" > < / script >
< script src = "../gitbook/gitbook-plugin-fontsettings/fontsettings.js" > < / script >
< / body >
< / html >