- 下載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 系統中,修改防火牆和開啓啓動有所差異。