Ubuntu Nexus Installation

Source: Internet
Author: User
Tags maven central sonatype

Today, organizations learn to use Linux to build a Nexus Maven central repository, build one in the company using CentOS, and go home with Ubuntu to build one, mainly to be familiar with the entire process, The main process is summarized as follows: (PS: Lou Zhu is just beginning to learn to build a Maven, heroes do not spray ...) )

One. Download Nexus

Nexus can be downloaded on the official website (http://www.sonatype.org), but the speed is slow, so the landlord choose direct Baidu "Nexus Download", you can download to the corresponding Nexus installation package.

Ps: At the time of the company is nexus3.x, but this version of the Nexus to JKD higher requirements, need to jdk1.8 version above, but the landlord is using jdk1.7, and do not want to upgrade the JDK version, so the use of nexus2.12.0 version, and later on Ubuntu is also used in this version.

Landlord Download Nexus Address: http://www.sonatype.org/nexus/archived/

OK, go to the beginning to install.

Two. Installation

First, the installation package extracted to the directory you specified, such as:/usr/local/src/nexus2.12.0/

After decompression there are two directories: nexus-2.12.0-01 and Sonatype-work

OK, now create a Nexus for system users: Useradd-r Nexus--shell/bin/bash

You can use: cat/ect/passwd to see if a user was created successfully

Next, switch the users and groups of the two folders you just unzipped to the Nexus: Chown-hr Nexus:nexus <file_path>, File_path is the directory where you want to switch attribution, for example:/usr/local/ nexus2.12.0

Now start modifying the Nexus configuration file, the Nexus file under the bin/directory

Main changes:

Nexus_home= (Nexus installation directory) PS: This version of the Nexus default seemingly can not change

Run_as_user=nexus

Add java_home= (JAVA installation directory)

Add Export nexus_home run_as_user java_home

Three. Start

Now that the Nexus is basically installed, let's start with a boot.

Switch but nexus user down and into the Nexus installation directory

Try to start the Nexus,./bin/nexus console (this is started with the console because you are not sure whether it will start correctly on the first boot, so you can see the boot log)

Landlord in Ubuntu started when the reported a unable to start jvm:no such file or directory (2) of the wrong (before the company in the CentOS version of the problem, do not know whether the system is different), and later on the internet search for a bit , is to have a wrapper.conf file in the/bin/jsw/conf/directory under the installation directory, with the following: Wrapper.java.command=java, replaced by: Wrapper.java.command=%java_ Home%/bin/java, the%java_hom% here is the Java environment variable you configured

OK, start Nexus successful

Now access Nuexs, the default address is: Localhost:8081/nexus

(PS: Not accessible after starting nexus in CentOS, need to turn off the firewall, but in Ubuntu without shutting down the firewall can also access, a bit strange ...) )

Successful access ...

At this point, our Nexus maven even if the building is successful, the landlord is just beginning to learn, I hope in the future use of the process, and then slowly summed up ...

Ubuntu Nexus Installation

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.