1、下載 LicenseServer
地址:https://mega.nz/#!7B5UVY6b!Hae2ceTBPIrTowQN0sV9fQ5lGOKzGxas2ug02RZAdGU,里面有不同的服務器對應的文件。
2、配置
找一個合適的文件夾,放進去。可重命名為其他名稱。防火牆端口要放開,我的是1017端口,具體端口可先運行一下看看是什么端口。成功如下圖:
chmod +x IdeaServer IdeaServer -p 1024 -prolongationPeriod 999999999999
3、后台及開機運行
參考文章http://www.cnblogs.com/zhaoyihao/p/8778502.html,先新建start.sh就放在IdeaServer文件夾下吧。start.sh中的內容是:路徑必須寫全
nohup /usr/IdeaServer/IdeaServer -p 1024 -prolongationPeriod 999999999999 &
更改start.sh文件的權限
chmod 755 start.sh
新建服務文件IdeaServer,要放在/etc/init.d/ 文件夾下
#!/bin/sh #chkconfig:2345 70 30 #description:IdeaServer ss_path=/usr/IdeaServer case "$1" in start) echo "start idea service.." sh ${ss_path}/start.sh ;; *) exit 1 ;; esac
chmod 755 IdeaServer
添加開機啟動
chkconfig --add IdeaServer service IdeaServer start //測試服務是否能啟動成功
4、參考地址,下載最新的破解文件以防被封
http://blog.lanyus.com/archives/174.html
5、nginx配置,使用域名代替IP地址
因為ip地址加端口號的方式有可能被封。nginx的安裝就不再贅述。1027的端口號要根據下載的新版破解文件的端口號來定義。如果使用域名的方式,1027的端口號就不用加到firewall中了。
server { listen 80; server_name xx.xncoding.com; root /var/www/html/; location / { proxy_pass http://127.0.0.1:1027; 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 }
nginx安裝好之后,默認不會開機自動啟動,設置默認開機啟動。
設置開機啟動
systemctl enable nginx