If you insist running as root, then set theenvironment variable RUN_AS_USER=root before running this script.
When configuring Nexus, enter the command ./nexus start and the warning message " If you insist running as root, then set thee nvironment variable RUN_AS_USER=root before running this script. " appears . The rough meaning is: if you want to use the root user, you should set the environment variable " RUN_AS_USER=root" before running the start script .
Solution
There are two solutions to this problem, one is a temporary solution, and the other is a permanent solution.
1. Temporary method
Enter: export RUN_AS_USER=root and execute ./nexus start, the result of the operation is as follows:
2. Permanent method
Just use the configuration in the system, enter: vi /etc/profile add exportRUN_AS_USER=root to it, save and exit after modification, as shown below
After modification, close nexus first, and then start it, as shown below
Just a few simple steps is OK