centOS7搭建nexus私服

时间:2023-03-09 19:34:29
centOS7搭建nexus私服

1、保证JDK,MAVEN已安装,firewalld服务安装

PS:yum install firewalld

2、官网下载:https://www.sonatype.com/download-oss-sonatype

centOS7搭建nexus私服

然后执行rz上传至centOS,tar -xvf nexus-3.5.0-02-unix.tar.gz解压到指定目录,如/datas目录

centOS7搭建nexus私服

3、vim /etc/profile 配置nexus环境变量,保存退出执行source /etc/profile 使之生效

centOS7搭建nexus私服

4、进入nexus安装目录,执行./bin/nexus start  启动nexus

centOS7搭建nexus私服

5、访问nexus,http://192.168.42.128:8081/  默认端口是8081,IP地址是你安装所在的服务器IP

安装成功页面如图所示,默认登录名,密码:admin admin123

centOS7搭建nexus私服

Ps:如果访问页面打不开,centOS7以下版本执行vim /etc/sysconfig/iptables,添加8081端口-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 8080 -j ACCEPT

然后重启防火墙即可。

centOS7以下版本依次执行

systemctl enable firewalld

systemctl start firewalld

firewall-cmd --permanent --add-port=8081/tcp

systemctl restart firewalld

然后在启动nexus

./bin/nexus  start

centOS7搭建nexus私服

虚拟机和centOS7的安装可参考此文章,写的比较详细:http://blog.csdn.net/u010246789/article/details/51754660