Ubnutu搭建IntelliJ IDEA授权服务器
2018-02-23 本文已影响214人
沐青之枫
1、下载IntelliJIDEALicenseServer,也可以去官网上购买。这里使用的是Lanyu提供服务器软件,非常感谢
链接:https://pan.baidu.com/s/1dFS9DaL 密码:xxc2
解压之后,把 IntelliJIDEALicenseServer_linux_amd64
传到服务器上,如果是32位系统则选择32位的文件。
2、修改权限:
chmod +x IntelliJIDEALicenseServer_linux_amd64
3、输出重定向的方式启动:
nohup ./IntelliJIDEALicenseServer_linux_amd64 -p 1017 -u hzy9738> info.log 2>&1 &
也可以写个启动脚本 start.sh
#!/bin/sh
rm -f tpid
nohup ../IntelliJIDEALicenseServer_linux_amd64 -p 1017 -u hzy9738> info.log 2>&1 &
echo $! > tpid
然后添加权限,启动即可
chmod +x start.sh
ps:-p后面是自定义端口,-u后面是自定义用户名
4、接下来配置nginx,使用一个二级域名方向代理到IntellijIDEAServer上。
#
# The default server
#
server {
listen 80;
server_name your.domain.com;
# Load configuration files for the default server block.
include /etc/nginx/default.d/*.conf;
location / {
proxy_pass http://127.0.0.1:1017/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}