Nexus installation Configuration (Linux)

Source: Internet
Author: User
Tags jboss maven central sonatype

Nexus installation Configuration (Linux)

, building a Nexus1, decompression nexus-oss-webapp-1.8.0-bundle.Tar. gz files to the specified directory Java code #Tar-ZVXF nexus-oss-webapp-1.8.0-bundle.Tar. GZ2, launch Nexus Java code #cd/opt/maven/nexus-oss-webapp-1.8.0/bin/JSW Choose the version of your machine: #cd linux-x86- +/ #./Nexus start reboot: #./Nexus Restart Stop: #./Nexus Stop3, run Nexus in Browser input: http://Localhost:8081/nexusYou'll see the Nexus's homepage,
inch the default user name and password are:
Admin/admin123 will automatically generate a Nexus working directory after running Sonatype-Work,nexus downloaded jar packages will be stored in the Sonatype-work/nexus/in storage4, Configuration1Click on the left menu repositories the Java code Apache snapshots Codehaus snapshots Maven Central three repository on the right list respectively Nload Remote Index configuration to True, and save the settings, and then right-click on the list of three repository, click Reindex2Add a new repository, some of the more common jar packages may not be found in the nexus provided by the repository, generally more commonly used Java code JBoss two: http://repository.jboss.org/maven2/http//repository.jboss.org/nexus/content/repositories/releases/ Sun's: http://download.java.net/maven/2/K-int: http://developer.k-int.com/maven2/ For looking for Juel:juel .-impl:2.2.1this jar package, so I also added a look for myself: http://repository.exoplatform.org/content/groups/public/ Add Step: Java code click Add->proxy repository->fill in the Repository ID, Repository Name, and other default of the remote Storage location. 3Add the new repository to the public repositories in the public repositories configuration, add all the items in the multiple-selection select to the left, and then save. 4add your own jar package Java code in the repository list there is a 3rd party, that is, third parties jar package, click will see a Artifact Upload tab, click, fill in the corresponding information. GAV Definition General Select GAV Parameters then add Group:Artifact:Version:Package example Juel:juel-impl:2.2.1: Jar and select the jar package to upload, save5In the nexus, set the proxy server option in the left Administrator menu, and in the lower middle of the page that opens on the right, there is a selection: Default HTTP Proxy Settings (optional) Selects the check box, Fill in the appropriate proxy server information. 6Write your own settings.xml with the following file contents: Java code<settings> <proxies> <proxy> <ID>normal</ID> <active>true</active> <protocol>http</protocol> <username>deployment</username> <password>deploy</password> 8081/nexus the</port> <nonproxyhosts>localhost:8081/nexus</nonproxyhosts> </proxy> </proxies> <mirrors> <mir Ror> <!--This was used to direct the public snapshots repoinchThe profile below-to- a different Nexus group-<ID>nexus-public-snapshots</ID> <mirrorOf>public-snapshots</mirrorOf> <url>http://localhost:8081/nexus/content/groups/public-snapshots</url></mirror> <mirror> <!--this sends everythingElseTo/public-<ID>nexus</ID> <mirrorOf>*</mirrorOf> <url>http://localhost:8081/nexus/content/groups/public</url></mirror> </mirrors> <profiles> <profile> <ID>development</ID> <repositories> <repository> <ID>central</ID> <url>http://central</url><releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> <pluginr Epositories> <pluginRepository> <ID>central</ID> <url>http://central</url><releases><enabled>true</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </pluginRepository> </pluginRepositories> </profile> <profile> <!--This profile would allow snapshots to be searched when activate D--> <ID>public-snapshots</ID> <repositories> <repository> <ID>public-snapshots</ID> <url>http://public-snapshots</url><releases><enabled>false</enabled></releases> <snapshots><enabled>true</enabled></snapshots> </repository> </repositories> <pluginr Epositories>--------------------------------------------------------------------------------Encounter this warning:

****************************************
Warning–not RECOMMENDED to RUN as ROOT
****************************************
If you insist running as root and then set the environment variable run_as_user=root before running this script.

The idea is to configure export run_as_user=root in the environment, temporarily configure

At the command line, enter:

Export Run_as_user=root

And then execute it, no more prompts.
./nexus Start

---------------------------------------------------------------

When Linux starts, it automatically executes the initialization program in the/ETC/RC.D directory, so we can put the startup task in that directory:

1, because the rc.local is executed after all initialization has been completed, so you can write the startup script inside;
2, log in with the root account linux,vi/etc/rc.d/rc.local edit the file, in the end to add the need to execute the script program:

Su-l $username-C "/nexus/nexus-2.8.0-05/bin/nexus start"

Nexus installation Configuration (Linux)

Related Article

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.