Linux nexus 私服搭建

  1. 下载nexus
    https://www.sonatype.com/download-oss-sonatype
  2. 上传到服务器/opt/
  3. 解压
    tar -zxvf nexus-3.14.0-04-unix.tar.gz -C /usr/local/
  4. 因为nexus启动不建议使用root账户,且root账户权限过于太大,所以,创建用户
    useradd admin admingroup
    并将指定其所需要的目录所有权
    chown -R 用户:用户组 /usr/
  5. 修改配置文件
    vim /usr/local/nexus-3.14.0-04/etc/nexus-default.properties
    修改对应的端口
    修改防火墙
    vim /etc/sysconfig/iptables
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 端口 -j ACCEPT
    重启防火墙service iptables start
  6. 浏览器打开并登陆
    启动nexus:./nexus start
    http://192.168.56.102:端口/
    账号admin
    密码 admin123
    System Requirement: max file descriptors [4096] likely too low, increase to at least [65536].
  7. 修改ulimit
    vim /etc/security/limits.conf
    新增
    * soft nofile 65535
    * hard nofile 65535
  8. 配置开机自启动 vi /etc/rc.d/rc.local
    su - 用户 -c '/usr/local/nexus-3.14.0-04/bin/nexus start'

注意在CentOS 7 系统中,修改防火墙和开启启动有所差异。

猜你喜欢

转载自blog.51cto.com/3265857/2347237