Nexus3 使用root报“WARNING: Detected execution as "root" user. This is NOT recommended!”
1:在bin目录下的nexus.rc文件添加:
vim nexus.rc 加入run_as_user=root
2:或者加入系统变量
vim /etc/profile 加入export RUN_AS_USER=root
3:vim nexus,里面有一句:run_as_root=true ,原来是此处直接给拦死了,故只要改成run_as_root=false 就可以。
4:或者添加nexus用户,即:
useradd nexus
chown -R nexus:nexus /opt/nexus
然后su nexus 执行:./nexus start 就成功了。

浙公网安备 33010602011771号