Nexus

From KevinWiki

Revision as of 00:39, 13 October 2009 by Kevin (Talk | contribs)
Jump to: navigation, search


Contents

Nexus

Nexus is a Maven Repository Manager software developed by Sonatype, the maven company producing m2eclipse. There is also an open source version of it.

Installation

Download

Download the Nexus from http://nexus.sonatype.org/downloads/. To install it in Tomcat, download war file one (e.g. nexus-webapp-0.0.0.war).

Deployment (to Tomcat)

  • Install and enable mod_jk.
  • Open the workers.properties file in the /etc/apache2 directory.
  • Add a new worker for nexus.
workers.tomcat_home=/opt/tomcat
workers.java_home=/usr/lib/jvm/java-6-sun
ps=/
worker.list=worker1,nexus
worker.worker1.port=8009
worker.worker1.host=localhost
worker.worker1.type=ajp13
worker.worker1.lbfactor=1
worker.nexus.port=8009
worker.nexus.host=nexus.yourdomain.com
worker.nexus.type=ajp13
worker.nexus.lbfactor=1
  • Set up JkMount in the apache virtual host configuration.
<VirtualHost *:80>
    ServerAdmin master@yourdomain.com

    ServerName nexus.yourdomain.com

    JkMount / nexus
    JkMount /* nexus

</VirtualHost>
  • Open the $CATALINA_HOME/conf/server.xml file to set up a new tomcat virtual host for the nexus.
  • Add the virtual host info inside the Engine element.
    <Engine name="Catalina" defaultHost="localhost">
      ... Default Host Info ...
 
      <Host name="nexus.yourdomain.com" appBase="/opt/tomcat_user_dir/nexus_webapps"
            unpackWARs="true" autoDeploy="true"
            xmlValidation="false" xmlNamespaceAware="false">
      </Host>
    </Engine>
  1. Remove all the files and directories in the appBase directory which is, in the example above, /opt/tomcat_user_dir/nexus_webapps.
  2. Copy nexus-webapp-0.0.0.war file to the appBase directory and change nexus-webapp-0.0.0.war to ROOT.war.
  • Restart tomcat and apache.
$ /etc/init.d/tomcat stop 
$ /etc/init.d/tomcat start 
$ /etc/init.d/apache restart 
Personal tools