- 下载nexus
https://www.sonatype.com/download-oss-sonatype
- 上传到服务器/opt/
- 解压
tar -zxvf nexus-3.14.0-04-unix.tar.gz -C /usr/local/
- 由于nexus启动不建议使用root帐户,且root帐户权限过于太大,因此,建立用户
useradd admin admingroup
并将指定其所须要的目录全部权
chown -R 用户:用户组 /usr/
- 修改配置文件
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
- 浏览器打开并登录
启动nexus:./nexus start
http://192.168.56.102:端口/
帐号admin
密码 admin123
System Requirement: max file descriptors [4096] likely too low, increase to at least [65536].
- 修改ulimit
vim /etc/security/limits.conf
新增 * soft nofile 65535
* hard nofile 65535
- 配置开机自启动 vi /etc/rc.d/rc.local
su - 用户 -c '/usr/local/nexus-3.14.0-04/bin/nexus start'
注意在CentOS 7 系统中,修改防火墙和开启启动有所差别。vim