How to install Apache Archiva in Ubuntu

The Apache Archiva is a powerful repository manager, here is a simple guide to install the Apache Archiva in Ubuntu.

Apache Archiva installation

1. Download Apache Archiva

Visit Apache Archiva official website. Click on the more download link, access the download page and click on the the tar version to download it – e.g apache-archiva-1.2.2-bin.tag.gz.

P.S Choose the standalone version, Jetty is build-in as web container.

2. Extract it

Extract it with tar command.


mkyong$ tar -xvzf apache-archiva-1.2.2-bin.tar.gz

P.S More detail about tar command

3. Start it

Locale the Apache Archiva bin folder, start it with command “./archiva start“.


mkyong@mkyong-desktop:~/Desktop/apache-archiva-1.2.2/bin$ ./archiva
Usage: ./archiva { console | start | stop | restart | status | dump }
mkyong@mkyong-desktop:~/Desktop/apache-archiva-1.2.2/bin$ ./archiva start
Starting Apache Archiva...

4. Done

Access Apache Archiva web admin via http://localhost:8080/archiva.

Post Installation

You may need to change the Apache Archiva default 8080 port number to avoid port conflict issue.

1. Archiva configuration file

Access the Apache Archiva web container configuration file “{achiva_folder}/conf/jetty.xml“, edit it with your favor editor.


vim {achiva_folder}/conf/jetty.xml

2. Update port number

Find the following pattern


<Call name="addConnector">
   <Arg>
       <New class="org.mortbay.jetty.nio.SelectChannelConnector">
         <Set name="host"><SystemProperty name="jetty.host"/></Set>
         <Set name="port"><SystemProperty name="jetty.port" default="8080"/></Set>
         <Set name="maxIdleTime">30000</Set>
         <Set name="Acceptors">2</Set>
         <Set name="statsOn">false</Set>
         <Set name="confidentialPort">8443</Set>
	 <Set name="lowResourcesConnections">5000</Set>
	 <Set name="lowResourcesMaxIdleTime">5000</Set>
       </New>
   </Arg>
</Call>

Change the jetty port to other post – 8888


<Set name="port"><SystemProperty name="jetty.port" default="8888"/></Set>

3. Restart it

Restart Apache Archiva to take effect, done.


mkyong@mkyong-desktop:~/Desktop/apache-archiva-1.2.2/bin$ ./archiva restart
Stopping Apache Archiva...
Stopped Apache Archiva.
Starting Apache Archiva...

Now, you can access the Apache Archiva web admin via http://localhost:8888/archiva.

About the Author

author image
mkyong
Founder of Mkyong.com, love Java and open source stuff. Follow him on Twitter. If you like my tutorials, consider make a donation to these charities.

Comments

avatar
3 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
1 Comment authors
marghituApache Archiva Tutorials | TutorialsHow to integrate between Apache Archiva and Maven | Maven Recent comment authors
newest oldest most voted
marghitu
Guest
marghitu

thanks, God bless you

trackback
Apache Archiva Tutorials | Tutorials

[…] Install Apache Archiva in Ubuntu A guide to install the Apache Archiva in Ubuntu. […]

trackback
How to integrate between Apache Archiva and Maven | Maven

[…] Install Apache Archiva in Ubuntu […]