搭建Jetbrains家族IDE授权服务器

虽然VS号称宇宙第一IDE但是也有不方便的地方,如果你也是C#码农我不得不向你推荐一个强大的插件ReSharper,他会是你的开发更加便捷,大大加快了开发的速度以及开发的乐趣。但是ReSharper并不免费啊,SO这并难不倒我们程序员。

首先下载Jetbrains家族IDE授权服务器

  1. 服务器下载地址:点击我
  2.  百度云链接:https://pan.baidu.com/s/173r-F2ZeB0OVRuTtolz0Mw 密码:6917

下载好之后文件如下图,

下载后有很多版本,如果你电脑是windows,对应的使用windows后缀的,Mac OS使用darwin后缀,
Ubuntu/centos等没有对应后缀的用linux,要注意区别32/64位,amd64是64位,386是32位。
windows下就不介绍了,点击就可以用,如果需要自定义参数,请根据采用命令行带参数运行,参数如下:

PS:若在程序工作目录中存在IntelliJIDEALicenseServer.html文件,则返回IntelliJIDEALicenseServer.html中的内容到用户浏览器。

接下来,介绍如何部署到Linux服务器上,首先将IntelliJIDEALicenseServer_linux_amd64上传到任意目录,我这里是root目录

 mv IntelliJIDEALicenseServer_linux_amd64 IdeaServer

接下来 需要把它运行起来,先加一个可执行权限

chmod +x IdeaServer

开始运行

/root/IdeaServer -p 1024 -prolongationPeriod 999999999999

默认运行会出现以下信息,则为成功

我们可以通过nohup的方式实现后台运行

cd /root/  
nohup ./IdeaServer -p <span class="hljs-number">1024</span> -prolongationPeriod <span class="hljs-number">999999999999 &gt; idea.out 2&gt;&amp;1 &amp;</span>
 
也可以通过supervisor实现守护进程,自启动。命令如下
vi /etc/supervisord.conf
#添加以下内容
[program:idea-server]
command = /root/IdeaServer -p 1024 -u imsxm.com -prolongationPeriod 999999999 -l 127.0.0.1
autostart=true
autorestart=true
startsecs=3
 
接下来,将自己的域名采用nginx反向代理过来,nginx如以下配置
 
server
{
listen 80;
server_name idea.imsxm.com;
root /home/wwwroot/;
 
location / {
proxy_pass http://127.0.0.1:1017;
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 off; #access_log end
error_log /dev/null; #error_log end
}
 
这样就大功告成了!
 
 
主要部分转自  五分钟搭建Jetbrains家族IDE授权服务器,在这里表示感谢啦
 

猜你喜欢

转载自www.cnblogs.com/miaoziblog/p/9454080.html
今日推荐