6月 122019
 

Sonatype Nexus 3 最低运行环境要求:

Minimum CPUs: 4
Recommended CPUs: 8+
Host Physical/RAM Minimum ( default ) 4GB

安装JDK 1.8环境

查看Java版本信息

访问Sonatype Nexus下载页面

 选择对应操作系统版本点击下载

解压缩文件到指定路径

进入安装目录

进入可执行程序bin目录

快捷键:Shift+鼠标右键,在此处打开命令窗口

注册nexus为系统服务

确认服务注册成功

启动nexu服务并查看运行状态

使用浏览器访问Web管理控制台

首次登录的初始密码设置

6月 112019
 

安装JDK

[root@iZj6cehstgjoj3qav88fidZ ~]# yum -y install jdk-8u211-linux-x64.rpm

查看JDK版本信息

[root@iZj6cehstgjoj3qav88fidZ ~]# java -version
java version "1.8.0_211"
Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)
[root@iZj6cehstgjoj3qav88fidZ ~]#

下载Nexus二进制包

[root@iZj6cehstgjoj3qav88fidZ ~]# wget https://download.sonatype.com/nexus/oss/nexus-latest-bundle.tar.gz
--2019-06-25 18:44:20-- https://download.sonatype.com/nexus/oss/nexus-latest-bundle.tar.gz
Resolving download.sonatype.com (download.sonatype.com)... 34.206.81.156, 35.168.192.73
Connecting to download.sonatype.com (download.sonatype.com)|34.206.81.156|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://sonatype-download.global.ssl.fastly.net/repository/repositoryManager/oss/nexus-2.14.13-01-bundle.tar.gz [following]
--2019-06-25 18:44:21-- https://sonatype-download.global.ssl.fastly.net/repository/repositoryManager/oss/nexus-2.14.13-01-bundle.tar.gz
Resolving sonatype-download.global.ssl.fastly.net (sonatype-download.global.ssl.fastly.net)... 151.101.77.194
Connecting to sonatype-download.global.ssl.fastly.net (sonatype-download.global.ssl.fastly.net)|151.101.77.194|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 82396385 (79M) [application/x-gzip]
Saving to: ‘nexus-latest-bundle.tar.gz’

100%[=======================================================================================================================================================>] 82,396,385 12.2MB/s in 5.4s

2019-06-25 18:44:27 (14.5 MB/s) - ‘nexus-latest-bundle.tar.gz’ saved [82396385/82396385]

[root@iZj6cehstgjoj3qav88fidZ ~]#

解压缩文件

[root@iZj6cehstgjoj3qav88fidZ ~]# mkdir -p /usr/local/nexus
[root@iZj6cehstgjoj3qav88fidZ ~]# tar xzf nexus-latest-bundle.tar.gz -C /usr/local/nexus/
[root@iZj6cehstgjoj3qav88fidZ ~]# ls /usr/local/nexus/
nexus-2.14.13-01 sonatype-work
[root@iZj6cehstgjoj3qav88fidZ ~]#

添加用户并修改目录所有权限

[root@iZj6cehstgjoj3qav88fidZ ~]# useradd nexus
[root@iZj6cehstgjoj3qav88fidZ ~]# chown -R nexus.nexus /usr/local/nexus/
[root@iZj6cehstgjoj3qav88fidZ ~]#

切换用户并进入Nexus可执行程序目录

[root@iZj6cehstgjoj3qav88fidZ ~]# su - nexus
Last login: Tue Jun 25 18:36:38 CST 2019 on pts/1
[nexus@iZj6cehstgjoj3qav88fidZ ~]$ cd /usr/local/nexus/nexus-2.14.13-01/bin/
[nexus@iZj6cehstgjoj3qav88fidZ bin]$ ./nexus --help
Usage: ./nexus { console | start | stop | restart | status | dump }
[nexus@iZj6cehstgjoj3qav88fidZ bin]$

启动服务并查看服务运行状态

[nexus@iZj6cehstgjoj3qav88fidZ bin]$ ./nexus start
Starting Nexus OSS...
Started Nexus OSS.
[nexus@iZj6cehstgjoj3qav88fidZ bin]$

[nexus@iZj6cehstgjoj3qav88fidZ bin]$ ./nexus status
Nexus OSS is running (14829).
[nexus@iZj6cehstgjoj3qav88fidZ bin]$

查看监听

使用浏览器访问Nexus控制台服务

6月 092019
 

下载JDK

https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

下载Maven

http://maven.apache.org/download.cgi

准备就绪的安装包

安装JDK

安装JDK

验证JAVA版本信息

解压缩Maven压缩包

查看Maven完整安装包路径

设置环境变量

控制面板-系统与安全-系统-高级系统设置

高级-环境变量

系统变量-PATH-新增

变量路径

C:\apache-maven-3.6.1-bin\apache-maven-3.6.1\bin

验证maven环境配置及版本信息

修改公共代理仓库为国内镜像服务器

修改conf/settings.xml配置文件,在<mirrors></mirrors>添加以下配置
阿里云镜像配置

<mirror>
<id>aliyunmaven</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共仓库</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>

网易163镜像配置

<mirror>
<id>nexus-163</id>
<mirrorOf>*</mirrorOf>
<name>Nexus 163</name>
<url>http://mirrors.163.com/maven/repository/maven-public/</url>
</mirror>