yum -y install docker
service docker start
docker search nexus
docker pull docker.io/sonatype/nexus
run
就能夠找到如何啓動admin admin123
maven設置docker
setting.xml設置segmentfault

pom文件設置centos
 <repositories> <repository> <id>nexus</id> <name>Team Nexus Repository</name> <url>http://nexus.jetbrains.org.cn/nexus/content/groups/public</url> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </snapshots> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>nexus</id> <name>Team Nexus Repository</name> <url>http://nexus.jetbrains.org.cn/nexus/content/groups/public</url> <snapshots> <enabled>true</enabled> <updatePolicy>always</updatePolicy> </snapshots> </pluginRepository> </pluginRepositories>  <distributionManagement> <repository> <id>releases</id> <name>Nexus Release Repository</name> <url>http://nexus.jetbrains.org.cn/nexus/content/repositories/releases/</url> </repository> <snapshotRepository> <id>snapshots</id> <name>Nexus Snapshot Repository</name> <url>http://nexus.jetbrains.org.cn/nexus/content/repositories/snapshots/</url> </snapshotRepository> </distributionManagement>
備註: pom中上傳的設置id要與maven setting中的id保持一致。
至於releases庫與snaoshots庫的區別微信
-SNAPSHOT
的都會上傳到snaoshots庫。less
若是以爲中央倉庫慢的話,能夠用個人私服 只須要配置 repositories
標籤中的內容,下載
依賴, distributionManagement
標籤中的內容爲 上傳
, 無需配置,也不對外開放上傳權限。maven
如但願瞭解更多,請關注微信公衆號url