nexus

下载

https://help.sonatype.com/repomanager3/download/download-archives---repository-manager-3

#修改环境变量
vim /etc/profile
export NEXUS_HOME=/usr/local/nexus/nexus-3.18.1
export PATH=$PATH:$NEXUS_HOME/bin

source /etc/profile

#修改启动用户
vim /usr/local/nexus/nexus-3.18.1/bin/nexus.rc
run_as_user=nexus		#内容就这一行,放开注释,填写用户即可
不好使
run_as_user="root"	
 

useradd nexus
passwd nexus chown -R nexus:nexus /opt/soft/nexus-3.19

添加用户也不好使
#修改端口 vim /usr/local/nexus/nexus-3.18.1/etc/nexus-default.properties #默认是8081 #最后启动nexus cd /usr/local/nexus/nexus-3.18.1/bin ./nexus start ./nexus status #访问http://ip:8081,登陆用户admin 密码存放在:/usr/local/nexus/sonatype-work/nexus3/admin.password 目录 #开机自启动(不好用) vim /etc/rc.d/rc.local /usr/local/nexus/nexus-3.18.1/bin/nexus start #添加这一行内容 chmod 755 /etc/rc.d/rc.local

/etc/security/limits.conf添加,*号不要去掉

* soft nofile 65536
* hard nofile 65536  

然后重启系统。若扔热不好使,直接将/etc/systemd/system.conf 和 /etc/systemd/user.conf  中DefaultLimitNOFILE=65536修改,默认是注释的。

用户admin

密码

/opt/soft/sonatype-work/nexus3/admin.password

文件4096警告解决

/etc/security/limits.conf

添加

@root - nofile  65536

nexus - nofile 65536

重启系统

开机启动

创建软连接

```
ln -s /opt/nexus/nexus-3.16.1-02/bin/nexus /etc/init.d/nexus
```



添加服务到开机自启

```
chkconfig --add nexus
chkconfig --levels 345 nexus on
```



启动、停止、重新启动

```
service nexus start|stop|restart
```



```
ln -s /opt/soft/nexus-3.19/bin/nexus /etc/init.d/nexus
```

原文地址:https://www.cnblogs.com/jentary/p/14313032.html