Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
老大叔也想要天天的爱情
DolphinScheduler
提交
fb19ddce
DolphinScheduler
项目概览
老大叔也想要天天的爱情
/
DolphinScheduler
与 Fork 源项目一致
Fork自
apache / DolphinScheduler
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
DolphinScheduler
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fb19ddce
编写于
4月 08, 2019
作者:
G
gongzijian
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
update .gitignore
上级
f17dff70
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
162 addition
and
1 deletion
+162
-1
escheduler-ui/.env
escheduler-ui/.env
+1
-1
escheduler-ui/install.sh
escheduler-ui/install.sh
+161
-0
未找到文件。
escheduler-ui/.env
浏览文件 @
fb19ddce
# 后端接口地址
# 后端接口地址
API_BASE = http://192.168.
xx.xx
:12345
API_BASE = http://192.168.
220.154
:12345
# 本地开发如需ip访问项目把"#"号去掉
# 本地开发如需ip访问项目把"#"号去掉
#DEV_HOST = 192.168.xx.xx
#DEV_HOST = 192.168.xx.xx
escheduler-ui/install.sh
0 → 100755
浏览文件 @
fb19ddce
#!/bin/bash
echo
"escheduler-ui-install.sh"
# 配置前端访问端口
esc_proxy
=
"8888"
# 配置代理后端接口
esc_proxy_port
=
"http://192.168.220.154:12345"
# 当前路径
esc_basepath
=
$(
cd
`
dirname
$0
`
;
pwd
)
# 本机ip
esc_ipaddr
=
'172.0.0.1'
esc_ipaddr
=
$(
ip addr |
awk
'/^[0-9]+: / {}; /inet.*global/ {print gensub(/(.*)\/(.*)/, "\\1", "g", $2)}'
)
# 区分版本
version
=
`
cat
/etc/redhat-release|sed
-r
's/.* ([0-9]+)\..*/\1/'
`
echo
"========================================================================配置信息======================================================================="
echo
"前端访问端口:
${
esc_proxy
}
"
echo
"后端代理接口地址:
${
esc_proxy_port
}
"
echo
"静态文件地址:
${
esc_basepath
}
/dist"
echo
"当前路径:
${
esc_basepath
}
"
echo
"本机ip:
${
esc_ipaddr
}
"
echo
"========================================================================配置信息======================================================================="
echo
""
# 创建文件并配置nginx
eschedulerConf
(){
E_host
=
'$host'
E_remote_addr
=
'$remote_addr'
E_proxy_add_x_forwarded_for
=
'$proxy_add_x_forwarded_for'
E_http_upgrade
=
'$http_upgrade'
echo
"
server {
listen
$esc_proxy
;# 访问端口
server_name localhost;
#charset koi8-r;
#access_log /var/log/nginx/host.access.log main;
location / {
root
${
esc_basepath
}
/dist; # 静态文件目录
index index.html index.html;
}
location /escheduler {
proxy_pass
${
esc_proxy_port
}
; # 接口地址
proxy_set_header Host
$E_host
;
proxy_set_header X-Real-IP
$E_remote_addr
;
proxy_set_header x_real_ipP
$E_remote_addr
;
proxy_set_header remote_addr
$E_remote_addr
;
proxy_set_header X-Forwarded-For
$E_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
$E_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;
}
}
"
>>
/etc/nginx/conf.d/escheduler.conf
}
centos7
(){
# nginx是否安装
sudo
rpm
-Uvh
http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
sudo
yum
install
-y
nginx
echo
"nginx 安装成功"
# 配置nginx
eschedulerConf
# 解决 0.0.0.0:8888 问题
yum
-y
install
policycoreutils-python
semanage port
-a
-t
http_port_t
-p
tcp
$esc_proxy
# 开放前端访问端口
firewall-cmd
--zone
=
public
--add-port
=
$esc_proxy
/tcp
--permanent
# 重启防火墙
firewall-cmd
--reload
# 启动nginx
systemctl start nginx
# 调整SELinux的参数
sed
-i
"s/SELINUX=enforcing/SELINUX=disabled/g"
/etc/selinux/config
# 临时生效
setenforce 0
}
centos6
(){
# yum
E_basearch
=
'$basearch'
E_releasever
=
'$releasever'
echo
"
[nginx]
name=nginx repo
baseurl=http://nginx.org/packages/centos/
$E_releasever
/
$E_basearch
/
gpgcheck=0
enabled=1
"
>>
/etc/yum.repos.d/nginx.repo
# install nginx
yum
install
nginx
-y
# 配置nginx
eschedulerConf
# 防火墙
E_iptables
=
`
lsof
-i
:
$esc_proxy
|
wc
-l
`
if
[
"
$E_iptables
"
-gt
"0"
]
;
then
# 已开启端口防火墙重启
service iptables restart
else
# 未开启防火墙添加端口再重启
iptables
-I
INPUT 5
-i
eth0
-p
tcp
--dport
$esc_proxy
-m
state
--state
NEW,ESTABLISHED
-j
ACCEPT
service iptables save
service iptables restart
fi
# start
/etc/init.d/nginx start
# 调整SELinux的参数
sed
-i
"s/SELINUX=enforcing/SELINUX=disabled/g"
/etc/selinux/config
# 临时生效
setenforce 0
}
# centos 6
if
[[
$version
-eq
6
]]
;
then
centos6
fi
# centos 7
if
[[
$version
-eq
7
]]
;
then
centos7
fi
echo
"请浏览器访问:http://
${
esc_ipaddr
}
:
${
esc_proxy
}
"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录