Home

传传的工作甜点

A strong man will struggle with the storms of fade.

Blog About Email Github

2019-03-26
搭建 JetBrains 授权服务器

1. 设置运行脚本

1.1 下载脚本文件链接

https://pan.baidu.com/s/1vtzz0DSQadIiXdV2J_-fug
提取码:ciqc

1.2 添加执行权限
1
2
3
4
mkdir /home/IntellijIdea  
mv IntelliJIDEALicenseServer_linux_amd64 /home/IntellijIdea/IdeaServer
cd /home/IntellijIdea
chmod +x IdeaServer #并添加上执行权限
1.3 后台添加运行方法
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#安装screen
yum install screen -y
# 启动程序
screen -dmS IdeaServer -d -m /home/IntellijIdea/IdeaServer -p 1029 -u Lewen -prolongationPeriod 999999999999
[后台启动] [服务名]     [脚本位置]            [运行的端口][用户名]

[注释]:关键参数替换成你自己的
screen -dmS 后台运行
IdeaServer 服务名称[你也可以叫别的]
d -m /home/IntellijIdea/IdeaServer 你脚本存放的路径
-p 1029 服务绑定的端口[不要与系统的端口冲突]
-u Lewen 用户名[自定义起]
-prolongationPeriod 999999999999 有限时间

#查看程序是否正常运行
ss -lntup | grep IdeaServer

2. 配置反向代理

2.1 通过宝塔面板
添加站点

TIM截图20190326094821

添加反向代理

TIM截图20190326094916

TIM截图20190326095010

TIM截图20190326095031

验证是否配置成功

访问你的域名看反向代理是否成功,出现not found 就是成功了

2.2 手动配置
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
worker_processes  1;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server{

listen 80;
server_name idea.xxxxxx.com; # 准备好的域名,没有的话直接写 127.0.0.1,到时候激活时填写你服务器的IP
index index.php index.html index.htm default.php default.htm default.html;
root /www/wwwroot/idea.wenyule.com;

location / {
proxy_pass http://127.0.0.1:1029; #指定监听的端口
proxy_redirect off;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
access_log /www/wwwlogs/idea.wenyule.com.log;
error_log /www/wwwlogs/idea.wenyule.com.error.log;
}
}

反向代理

3. 激活

TIM截图20190326095100

注意:地址链接后面不要加 /


LucienWu

scribble

Blog About Email Github