本文共 2600 字,大约阅读时间需要 8 分钟。
[root@linux-node1 ~]# http://www.sonatype.com/download-oss-sonatype[root@linux-node1 ~]# tar -xf nexus-2.13.0-01-bundle.tar.gz[root@linux-node1 ~]# cd nexus-2.13.0-01/bin[root@linux-node1 ~]# mv nexus-2.13.0-01 /usr/local/[root@linux-node1 ~]# cd /usr/local/[root@linux-node1 local]# lsapache-maven-3.3.9 bin games lib libexec nexus-2.13.0-01 sbin srcapache-maven-3.3.9-bin.tar.gz etc include lib64 maven nodejs share[root@linux-node1 local]# ln -s nexus-2.13.0-01 nexus[root@linux-node1 local]# cd /usr/local/nexus[root@linux-node1 nexus]# lsbin conf lib LICENSE.txt logs nexus NOTICE.txt tmp[root@linux-node1 nexus]# cp bin/nexus /etc/init.d/[root@linux-node1 nexus]# chmod 755 /etc/init.d/nexus [root@linux-node1 nexus]# chown root /etc/init.d/nexus 、[root@linux-node1 nexus]# vim /etc/init.d/nexusNEXUS_HOME="/usr/local/nexus"RUN_AS_USER=root[root@linux-node1 init.d]# cd /etc/init.d/[root@linux-node1 init.d]# chkconfig --add nexus[root@linux-node1 init.d]# chkconfig --levels 345 nexus on[root@linux-node1 init.d]# service nexus start****************************************WARNING - NOT RECOMMENDED TO RUN AS ROOT****************************************Starting Nexus OSS...Started Nexus OSS.
登录界面:
默认用户名密码 admin admin123Nexus MAVEN的私有仓库
如果没有nexus 项目的打包都需要通过公网下载不利于包的管理和共用如果没有私服,我们所需的所有构件都需要通过maven的中央仓库和第三方的Maven仓库下载到本地,而一个团队中的所有人都重复的从maven仓库下载构件部署工作流:Apache Maven
To use Nexus Repository Manager Pro and Nexus Repository Manager OSS with Apache Maven, configure Maven to check the repository manager instead of the default, built-in connection to the Central Repository.To do this, you add a mirror configuration and override the default configuration for the central repository in your ~/.m2/settings.xml as shown:
nexus * http://localhost:8081/nexus/content/groups/public nexus central http://central true true central http://central true true nexus
转载于:https://blog.51cto.com/molewan/2132635