搭建Jrebel激活服務

  • 2019 年 10 月 4 日
  • 筆記

搭建Jrebel激活服務

1. 下載源碼

下載地址: 碼雲源碼地址

git clone https://gitee.com/suveng/JrebelLicenseServerforJava.git

2. 本地運行服務 or 部署到伺服器

本地運行

運行MainServer這個類中的main方法

License Server started at http://localhost:8081  JetBrains Activation address was: http://localhost:8081/  JRebel 7.1 and earlier version Activation address was: http://localhost:8081/{tokenname}, with any email.  JRebel 2018.1 and later version Activation address was: http://localhost:8081/{guid}(eg:http://localhost:8081/779a56c2-4163-430e-9492-087bbb568a30), with any email.

看到如下日誌後,就說明啟動成功了。可以直接使用本地的這個服務激活Jrebel了。

3. 激活

  1. 需要在IDEA中安裝Jrebel中,安裝步驟(Windows):File->Settings->Plugins,然後在線安裝插件處搜索Jrebel,然後進行安裝,重啟IDEA後生效。在安裝完Jrebel後,進行激活,Help->Jrebel->Activation。
  2. 選擇第一個選項,Connect to online licensing service,在第一個輸入框中輸入拼接好的在線激活服務,例如:http://140.143.12.222:8081/ea1d67dc-bb7a-4db0-9ed4-1b6742b0f38b,然後在第二個輸入框中隨便輸入一個郵箱地址(符合格式的郵箱都可以)。
  3. 點擊Change license按鈕即可激活。如果激活不成功,可以用上面說的那個在線生成GUID的網站再生成一個新的GUID再試一次。

部署到Linux伺服器

1. 打包

mvn clean package -Dmaven.test.skip=true

2.上傳

在target目錄下找到打好的jar包,上傳到伺服器。

3.啟動

nohup java -jar JrebelBrainsLicenseServerforJava-1.0-SNAPSHOT-jar-with-dependencies.jar  >log 2>&1

4.測試服務是否可以訪問

dependencies.jar >log 2>&1

### 4.測試服務是否可以訪問    `telnet ip 埠`