maven私服搭建問題If you insist running as root, then set the environment variable RUN_AS_USER=root...


原文:http://blog.csdn.net/Senior_lee/article/details/50054313

 

   背景

        今天筆者在配置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,再啟動,如下圖


        

        簡簡單單的幾步就OK啦

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM