一.搭建环境
1.centos7
2.nexus安装包nexus-3.20.1-01-unix.tar.gz
二.安装搭建
1.将nexus安装包放到服务器/home目录上并解压,解压命令tar -zxvf nexus-3.20.1-01-unix.tar.gz
2.启动私服,进入到解压后的/home/nexus-3.20.1-01/bin/目录下,输入命令:./nexus start回车
3.进入到/home/sonatype-work/nexus3/log/目录下,查看启动日志,命令:tail -f nexus.log
4.如果启动报错: Error occurred while executing a write operation to database 'OSystem' due to limited free space on the disk (2378 MB). The databa se is now working in read-only mode. Please close the database (or stop OrientDB), make room on you r hard drive and then reopen the database. The minimal required space is 4096 MB. Required space is now set to 4096MB (you can change it by setting parameter storage.diskCache.diskFreeSpaceLimit)
则可以通过进入到/bin目录下修改nexus.vmoptions里的值的方式解决,添加-Dstorage.diskCache.diskFreeSpaceLimit=1024,然后在启动私服
如图:
5.启动成功后,通过ip+端口访问,默认端口是8081。可以在/home/nexus-3.20.1-01/etc/nexus-default.properties里修改访问的端口