应用目录 存放应用数据
对服务的配置等
工作目录 存放一些仓库数据
1.备份和迁移
2.管理员用户忘记密码
/usr/local/nexus/nexus-3.14.0-04/bin/nexus start 启动
监听端口:8081
访问:192.168.6.30:8081
初始密码 admin123
admin用户忘记密码 orientdb 开发服务
[root@localhost ~]# cd /usr/local/nexus/
[root@localhost nexus]# java -jar ./nexus-3.14.0-04/lib/support/nexus-orient-console.jar
orientdb> connect plocal:./sonatype-work/nexus3/db/security admin admin
orientdb {db=security}> update user SET password="$shiro1$SHA-512$1024$NE+wqQq/TmjZMvfI7ENh/g==$V4yPw8T64UQ6GfJfxYq2hLsVrBY8D1v+bktfOxGdt4b/9BthpWPNUy/CBk6V9iA0nHpzYzJFWO8v/tZFtES8CA==" UPSERT WHERE id="admin"
可不区分大小写 加密后的admin123 上述命令是把admin用户的密码强制设置为admin123
在maven主机上操作添加标签 写私服IP
vim /usr/local/maven/conf/settings.xml
166 -->
167 <mirror>
168 <id>nexus conf</id>
169 <name>nexusconf</name>
170 <url>http://192.168.6.30:8081/repository/maven-public/</url>
171 <mirrorOf>*</mirrorOf>
172 </mirror>
173 </mirrors>
在maven主机上
21 <distributionManagement>
22 <snapshotRepository>
23 <id>nexus</id>
24 <name>Snapshot Repository</name>
25 <url>http://192.168.6.30:8081/repository/maven-snapshots/</url>
26 </snapshotRepository>
27 <repository>
28 <id>nexus</id>
29 <name>Releases Repository</name>
30 <url>http://192.168.6.30:8081/repository/maven-releases/</url>
31 </repository>
32 </distributionManagement>
132 -->
133 <server>
134 <id>nexus</id>
135 <username>kgcdev</username>
136 <password>admin123</password>
137 </server>
138 </servers>
部署策略 :允许重复部署
重复发版
138 <server>
139 <id>third</id>
140 <username>kgcdev</username>
141 <password>admin123</password>
142 </server>
143 </servers>
[root@localhost ~]# mvn deploy:deploy-file -DgroupId=com.aliyun.oss -DartifactId=aliyun-sdk-oss -Dversion=2.6.1 -Dpackaging=jar -Dfile=/root/aliyun-sdk-oss-2.6.1.jar -DrepositoryId=third -Durl=http://192.168.6.30:8081/repository/third/