Configuring a Nexus warehouse in a Unbuta environment

Source: Internet
Author: User

Nexus is the repository for managing Gradle and MAVEN Packages

Private Server , a special remote repository on a local area network, is designed to broker remote warehouses and deploy third-party components. When Maven needs to download the widget, it will be downloaded to the local repository if it is available, otherwise the remote repository will be requested to download the widget to the local repository.

Ubuntu Linux-based free open-source desktop PC operating system that fits Intel's ultra-polar positioning and supports x86, 64-bit, and PPC architectures.

Because the company server is based on the Ubunta system, so to build a Nexus warehouse under the system, the next step is to build

The first thing to do is to configure the Java environment of the system, because the Nexus is written in Java.

1. To download the JDK version on the Oracle website, I downloaded it here

Linux x64 version because the server is 64-bit, remember to download the . tar.gz Format


Move the installation package to the new Java folder under the/usr/local directory, because there is no Java name folder in the directory, so we can create a new folder, right-click on the console

2. Enter sudo mkdir/usr/local/java to create a new folder, we can see that the path generates a new Java folder,. Sudo is the highest privilege, because creating a file modification file requires high permissions to operate.

Then copy the download to the archive into the Java folder, the command line:
Enter the directory where the JDK source package resides

3.sudo CP Jdk-8u25-linux-x64.tar.gz/usr/local/java Copy the package to the destination folder

Then go to the Java directory, command line:

4.cd/usr/local/java

Unzip the Tarball, command line:

5.sudo Tar xvf jdk-8u25-linux-x64.tar.gz

You can then delete the compressed package, command line:

6.sudo RM jdk-8u25-linux-x64.tar.gz

7. Setting the JDK environment variable

This is the global setting method, which is a common environment variable for all users.

$sudo gedit ~/.BASHRC

After opening, add at the end

Export java_home=/usr/local/java/jdk1.8.0_25
Export JRE_HOME=${JAVA_HOME}/JRE
Export Classpath=.:${java_home}/lib:${jre_home}/lib
Export Path=${java_home}/bin: $PATH




Save off, and in console input java_version see if the Java environment is configured successfully.

Two.

1. Next, download the Nexus installation package to the Nexus official Web site.

Enter the Nexus website http://www.sonatype.org/nexus/go to download, I download here is 2. XX version, because many tutorials on the web are based on this version, and the 2.XX version can support the Java version prior to jdk1.6.



Remember to download the. tar.gz format.

2. After the download is complete, copy the nexus-latest-bundle.tar.gz to the/usr/local/directory and enter the/usr/local directory.

sudo cp nexus-2.13.0-01-bundle.tar.gz /usr/local/   将安装包拷贝到目标文件中
cd /usr/local  切换目录
3.解压nexus-latest-bundle.tar.gz,得到nexus-2.7.0-05和sonatype-work,并做一个软链接nexus2
tar -nexus-2.13.0-01-bundle.tar.gz
ln -s nexus-2.13.0-01 nexus2
4.开启root权限开启nexus,因为这里如果不开启su权限的话会一直启动失败
su   然后输入密码进入root权限,
然后运行Nexus  
CD Nexus2

./bin/nexus Start

This explanation has been turned on successfully 、、、、、、、

But..........

How to enter the Localhost:8081/nexus in the browser has not been in, read the next log


Found a lot of log is unable to start the JVM, online check, the original path has not been set

Go to this path to modify the configuration

Right-click in the directory to open the console, enter sudo gedit wrapper.conf open the file

Change the Wapper.java.command=java inside the file into Wapper.java.command=%java_home%/bin/java.

Click Save to save, and then restart the Nexus, you will find that can start successfully, and then in the browser input Localhost:8081/nexus can be configured in the warehouse!! Done!




Configuring a Nexus warehouse in a Unbuta environment

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.