旧仓库停服务
bin/nexus stop
旧仓库备份
tar -czvf sonatype-work.tgz sonatype-work
新仓库上传备份文件并覆盖
alias cp='cp'
cp -rf temp/sonatype-work .
重置密码
java -jar ./lib/support/nexus-orient-console.jar
connect plocal:../sonatype-work/nexus3/db/security admin admin
update user SET password="$shiro1$SHA-512$1024$NE+wqQq/TmjZMvfI7ENh/g==$V4yPw8T64UQ6GfJfxYq2hLsVrBY8D1v+bktfOxGdt4b/9BthpWPNUy/CBk6V9iA0nHpzYzJFWO8v/tZFtES8CA==" UPSERT WHERE id="admin"
OrientDB console v.2.2.36 (build d3beb772c02098ceaea89779a7afd4b7305d3788, branch 2.2.x) https://www.orientdb.com
Type 'help' to display all the supported commands.
orientdb> connect plocal:../sonatype-work/nexus3/db/security admin adminConnecting to database [plocal:../sonatype-work/nexus3/db/security] with user 'admin'...
2020-04-21 17:07:05:546 WARNI {db=security} Storage 'security' was not closed properly. Will try to recover from write ahead log... [OLocalPaginatedStorage]
2020-04-21 17:07:05:550 WARNI {db=security} Record com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OFuzzyCheckpointEndRecord{lsn=LSN{segment=11, position=1459360}} will be skipped during data restore [OLocalPaginatedStorage]
2020-04-21 17:07:05:550 WARNI {db=security} Record OFuzzyCheckpointStartRecord{lsn=LSN{segment=11, position=1459367}} com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OFuzzyCheckpointStartRecord{lsn=null, previousCheckpoint=LSN{segment=11, position=1459320}} will be skipped during data restore [OLocalPaginatedStorage]
2020-04-21 17:07:05:551 WARNI {db=security} Record com.orientechnologies.orient.core.storage.impl.local.paginated.wal.OFuzzyCheckpointEndRecord{lsn=LSN{segment=11, position=1459407}} will be skipped during data restore [OLocalPaginatedStorage]OK
orientdb {db=security}> update user SET password="$shiro1$SHA-512$1024$NE+wqQq/TmjZMvfI7ENh/g==$V4yPw8T64UQ6GfJfxYq2hLsVrBY8D1v+bk
tfOxGdt4b/9BthpWPNUy/CBk6V9iA0nHpzYzJFWO8v/tZFtES8CA==" UPSERT WHERE id="admin"Updated record(s) '1' in 0.022000 sec(s).
orientdb {db=security}> quit
启动新仓库服务
bin/nexus start
登陆页面

修改环境变量
# nexus
export RUN_AS_USER=root
export PATH=$PATH:$RUN_AS_USER
修改用户:nexus-3.22.1-02/bin/nexus.rc
run_as_user="root"
修改JAVA:nexus-3.22.1-02/bin/nexus
INSTALL4J_JAVA_HOME_OVERRIDE=/usr/local/java
修改端口:nexus-3.22.1-02/etc/nexus-default.properties
application-port=8081
修改日志: nexus-3.22.1-02/bin/nexus.vmoptions
-XX:LogFile=../sonatype-work/nexus3/log/jvm.log
本文档详细介绍了Nexus仓库的迁移步骤,包括停服务、备份、上传覆盖、密码重置以及启动新服务等操作。在密码重置过程中,通过OrientDB console连接并更新了管理员密码。此外,还提供了登陆页面的URL以及如何修改环境变量、用户配置、JAVA设置、端口和日志设置的说明。
3256

被折叠的 条评论
为什么被折叠?



