下载后有很多版本,如果你电脑是windows,对应的使用windows后缀的,Mac OS使用darwin后缀,
Ubuntu/centos等没有对应后缀的用linux,要注意区别32/64位,amd64是64位,386是32位。
windows下就不介绍了,点击就可以用,如果需要自定义参数,请根据采用命令行带参数运行,,参数如下:
-u 用户名参数,当未设置-u参数,且计算机用户名为^[a-zA-Z0-9]+$时,使用计算机用户名作为idea用户名 -p 参数,用于指定监听的端口 -prolongationPeriod 指定过期时间参数
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命令
我们可以通过nohup的方式实现后台运行
cd /root/ nohup ./IdeaServer -p <span class="hljs-number">1024</span> -prolongationPeriod <span class="hljs-number">999999999999 > idea.out 2>&1 &
也可以通过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 }
转载于:https://blog.51cto.com/wangzhiqiang/1872300