9.2.3 WAR方式安装Nexus

除了Bundle,Nexus还提供一个可以直接部署到Web容器中的war包。该war包支持主流的Web容器,如Tomcat、Glassfish、Jetty和Resin。

以Tomcat 6为例,笔者在Vista机器上的目录为D:\bin\apache-tomcat-6.0.20\,那么只需要复制Nexus war包至Tomcat的部署目录D:\bin\apache-tomcat-6.0.20\webapps\nex-us.war,然后转到D:\bin\apache-tomcat-6.0.20\bin\目录,运行startup.bat。这时,读者可以从Tomcat的console输出中看到它部署nexus.war。

待Tomcat启动完成后,访问http://localhost:8080/nexus/就能看到Nexus的界面了。