美文网首页
Mac搭建自己的IntelliJ IDEA授权服务器

Mac搭建自己的IntelliJ IDEA授权服务器

作者: 简书超级会员 | 来源:发表于2018-11-15 14:01 被阅读93次

    Mac搭建自己的IntelliJ IDEA授权服务器

    一、下载服务器搭建软件

    官方各版本下载: https://mega.nz/#!7B5UVY6b!Hae2ceTBPIrTowQN0sV9fQ5lGOKzGxas2ug02RZAdGU

    二、安装

    下载完成后进行解压,里面几乎涵盖了所有操作系统的版本,所以不管你是Win、Mac或是Linux都可以放心使用。

    1.根据自己服务器的操作系统选择对应的32位/64位拷贝到服务器上

    IntelliJIDEALicenseServer_darwin_386 //32位
    IntelliJIDEALicenseServer_darwin_amd64 //64位
    

    2.添加文件执行权限

    chmod +x IntelliJIDEALicenseServer_darwin_amd64 
    

    3.用screen在后台执行,避免关闭terminal激活失败

    screen -dmS IntelliJIDEALicenseServer_darwin_amd64 -d -m
    

    4.启动

    sudo ./IntelliJIDEALicenseServer_darwin_amd64 -p1029 -uname -prolongationPeriod999999999
    

    5.相关参数

    -l #指定绑定监听到哪个IP(私人用)
    
    -u #用户名参数,当未设置-u参数,且计算机用户名为^[a-zA-Z0-9]+$时,使用计算机用户名作为idea用户名
    
    -p #参数,用于指定监听的端口
    
    -prolongationPeriod #指定过期时间参数
    

    三、实现域名远程连接

    1. 通过supervisor实现进程守护
    vi/etc/supervisord.conf
    
    #添加以下内容
    
    [program:idea-server]
    
    command=/root/IdeaServer -p1029 -umoonce -prolongationPeriod999999999
    
    autostart=true
    
    autorestart=true
    
    startsecs=3
    
    1. 配置nginx进行反向代理,实现域名远程连接
    server
    
    {
    
    listen 80;
    
    server_name idea.moonce.com;#自己准备好的域名
    
    root /home/wwwroot/;
    
    location / {
    
    proxy_pass http://127.0.0.1:1029;#指定监听的端口
    
    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
    
    }
    

    相关文章

      网友评论

          本文标题:Mac搭建自己的IntelliJ IDEA授权服务器

          本文链接:https://www.haomeiwen.com/subject/foslqftx.html