maven 私服 nexus-2.14.4-03 安装
一、下载最新的 Nexus 2.x
下载链接:https://www.sonatype.com/oss-thank-you-zip
百度网盘下载, 链接:http://pan.baidu.com/s/1bo5l5Vp 密码:df1t
也可以到官网或其他第三方网站下载。
二、安装、配置nexus-2.14.4-03私服
#解压 tar.gz
tar zxvf nexus-2.14.4-03-bundle.tar.gz
#移动到/usr/local 中
mv nexus-2.14.4-03 /usr/local
mv sonatype-work/ /usr/local
# 查看、编辑配置文件
cd /usr/local/nexus-2.14.4-03
vi conf/nexus.properties # 默认配置如下,保持默认配置即可
# Jetty section
application-port=8081 #端口
application-host=0.0.0.0
nexus-webapp=${bundleBasedir}/nexus
nexus-webapp-context-path=/nexus #上下文
# Nexus section
nexus-work=${bundleBasedir}/../sonatype-work/nexus
runtime=${bundleBasedir}/nexus/WEB-INF
# orientdb buffer size in megabytes
storage.diskCache.bufferSize=4096
vi /usr/local/nexus-2.14.4-03/bin/nexus #修改RUN_AS_USER 为root, NEXUS_HOME程序主目录最好用绝对路径。
#! /bin/sh
#
# Copyright (c) 1999, 2006 Tanuki Software Inc.
#
# Java Service Wrapper sh script. Suitable for starting and stopping
# wrapped Java applications on UNIX platforms.
#
#-----------------------------------------------------------------------------
# These settings can be modified to fit the needs of your application
# Set this to the root of the Nexus installation
NEXUS_HOME="/usr/local/nexus-2.14.4-03"
# If specified, the Wrapper will be run as the specified user.
# IMPORTANT - Make sure that the user has the required privileges to write into the Nexus installation directory.
# NOTE - This will set the user which is used to run the Wrapper as well as
# the JVM and is not useful in situations where a privileged resource or
# port needs to be allocated prior to the user being changed.
#RUN_AS_USER=
RUN_AS_USER="root"
# Application
APP_NAME="nexus"
APP_LONG_NAME="Nexus OSS"
赋予NEXUS_HOME 目录写入权限
chmod -R +w /usr/local/nexus-2.14.4-03
三、nexus服务启动、停止等命令
./nexus {console | start | stop |restart |status | dump }
./nexus console 在当前控制台窗口启动,按ctrl+c结束进程
./nexus start 后台进程启动nexus服务,可查看 logs目录中wrapper.log 输出日志
./nexus stop 停止nexus服务。
四、nexus服管理控制台
nexus 服务启动比较慢,启动后稍待1分钟左右,访问IP:8081/nexus 进入管理控制台。
默认超级管理员为 admin,登陆密码 admin123
默认部署员 deployment, 登陆密码deployment123 .
使用超级管理员登陆上,点击左侧Respositories ,即可看到所有的仓库了。
---------------------
作者:jasnet_u
来源:CSDN
原文:https://blog.csdn.net/jasnet_u/article/details/78235625
版权声明:本文为博主原创文章,转载请附上博文链接!