linux下安装maven nexus私服

从nexus官网下载Nexus Repository Manager OSS 2.x的安装包:nexus-2.14.1-01-bundle.tar.gz,3.x版本需要jdk8及以上

解压

tar xvf nexus-2.14.1-01-bundle.tar.gz -C /usr/java配置环境变量
vi /etc/PRofile追加
# maven nexus conf
export RUN_AS_USER=root
使配置立即生效
source /etc/profile启动nexus
cd /usr/java/nexus-2.14.2-01/bin
./nexus start
如果不配置环境变量,启动会报错
****************************************
WARNING - NOT RECOMMENDED TO RUN AS ROOT
****************************************
If you insist running as root, then set the environment variable RUN_AS_USER=root before running this script.
配置了环境变量,启动时提示
****************************************
WARNING - NOT RECOMMENDED TO RUN AS ROOT
****************************************
启动完成后,浏览器访问http://192.168.25.130:8081/nexus/

nexus常用命令

./nexus start
./nexus stop
./nexus restart
./nexus status

仓库说明

Public Repositories:公共仓库组,包含了特定的仓库3rd party:第三方组件仓库Central:*仓库Releases:发布版本仓库