MAVEN中央仓库搭建

wget https://sonatype-download.global.ssl.fastly.net/nexus/oss/nexus-2.13.0-01-bundle.tar.gz

tar -zxvf nexus-2.13.0-01-bundle.tar.gz

cd bin/
./nexus start


WARNING - NOT RECOMMENDED TO RUN AS ROOT


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

解决方案
临时方法
输入:export RUN_AS_USER=root 后在执行 ./nexus start 运行结果如下图:
MAVEN中央仓库搭建

永久方法
在系统用配置即可,输入:vi /etc/profile向其中加入exportRUN_AS_USER=root,修改后保存退出,如下图
MAVEN中央仓库搭建
修改完之后,先关闭nexus,再启动,如下图
MAVEN中央仓库搭建

  简简单单的几步就OK啦

附赠参考链接
http://www.tuicool.com/articles/E7ZBv2