If you insist running as root, then set the environment variable RUN_AS_USER=root提示

转载自:

  http://www.aichengxu.com/view/2387142

If you insist running as root, then set theenvironment variable RUN_AS_USER=root before running this script.

背景

今天笔者在配置Nexus的时输入命令 ./nexus start后出现“ If you insist running as root, then set thee nvironment variable RUN_AS_USER=root before running this script. ”的警告信息。大概的意思是:如果你想使用root用户,那么在运行开始脚本之前应该设置环境变量”RUN_AS_USER=root"。



解决方法

关于这个问题共有两种解决方法,一种是临时解决,一种是永久的解决。

临时方法



输入:export RUN_AS_USER=root 后在执行 ./nexus start 运行结果如下图:




永久方法

在系统用配置即可,输入:vi /etc/profile向其中加入exportRUN_AS_USER=root,修改后保存退出,如下图




修改完之后,先关闭nexus,再启动,如下图




posted on 2016-04-19 17:03  zgz2016  阅读(178)  评论(0)    收藏  举报

导航