Linux 下迁移 Nexus3

Nexus3 的迁移过程还是非常简单,复制整个目录到新服务器,启动即可。
备份
在原来服务器上将 nexus3 整体目录备份即可。
$ tar -zcvf nexus3.tar.gz nexus3/
tips:我的 nexus3 整体目录有 13G,直接通过 tmux 使用 scp 命令远程复制到目标服务器的。
迁移
# 创建 nexus 用户
$ useradd nexus
$ passwd nexus
$ su - nexus
# scp 备份文件到新服务器
$ scp nexus@x.x.x.x:~/nexus3.tar.gz .
# 解压
$ tar -zxvf nexus3.tar.gz
# 启动
$ ./nexus3/nexus-3.12.1-01/bin/nexus start
# 验证
$ curl http://localhost:8081/nexus
配置文件
# 查看配置文件,根据需要修改
$ vi /home/nexus/nexus3/nexus-3.12.1-01/etc/nexus-default.properties
## DO NOT EDIT - CUSTOMIZATIONS BELONG IN $/>
解决方法
# 配置 nexus 的 nofile 为65536
$ echo "nexus - nofile 65536" >> /etc/security/limits.conf
# 重启 nexus 生效
$ ./nexus3/nexus-3.12.1-01/bin/nexus restart
问题二:Detected execution as “root” user. This is NOT recommended!
# 启动 nexus,报错警告
$ ./nexus start
WARNING: ************************************************************
WARNING: Detected execution as "root" user. This is NOT recommended!
WARNING: ************************************************************
Starting nexus
解决方法
# 在 bin 目录下创建 nexus.rc
$ echo "run_as_user=nexus" > /home/nexus/nexus3/nexus-3.12.1-01/bin/nexus.rc
相关推荐
-
nginx检查提示“unknown directive "stream" in /etc/*/nginx.conf”
nginx检查提示“unknown directive "stream" in /etc/*/nginx.conf”2025-02-26 00:38:21 -
php之多级目录下查找文件中是否含有某个字符串功能实现2025-02-26 00:36:35
-
mysql 启动不了1067错误如何解决?2025-02-26 00:33:31
-
MySQL简单INSERT超慢原因排查2025-02-26 00:22:42
-
mysql分布式数据库的主要构架是什么?2025-02-26 00:06:23