Nexus

admin
8081

Nexus:
  • Nexus (or) Sonatype Nexus
  • Nexus is an Open Source Software,
  • It an Artifactory repo,
  • It can be used to store the build Artifacts & retrieve the build artifacts whenever we required.
We can store:
  • Artifacts:  Jar, War, Ear
  • Docker:     Docker images
  • Node Js:    NPM Packages
What is difference between GitHub & Nexus?
GitHub:
        We can store Source code.
        GitHub is a SCM (Source Code Management Tool).
Nexus :
        Nexus is an artifactory repo.
        It can store your artifacts (Packages).

Installation:
  • Nexus   2.X ------------
  • Nexus   3. X -------------Java 1.8

  • sudo update-alternatives --config 'java'
  • sudo yum install java-1.8.0-openjdk
  • java -version

  • Yum install java-11-openjdk
After extract nexux file.

Sonatype-work
nexus-version-------------------two directorys created.

Creata a User:
  • useradd nexus
  • visudo
  • nexus      ALL=(ALL)         NOPASSWD: ALL
  • Change the owner permission and group permission.

  • go to Nexus hd
  • bin 
  • nexus.rc -------------------------(vi nexus.rc)
  • run_as_user= “nexus”

Create a Service :
  • ln -s /opt/nexus/bin/nexus   /etc/init.d/nexus -----------------------Create a softlink
  • sudo su – nexus
Enable nexus service:
  • sudo systemctl enable nexus
  • sudo systemctl start nexus
  • sudo systemctl status nexus
http://IPAddess:8081/ -------------------------Nexus 3.x
http://IPAddess:8081/nexus  -----------------Nexus 2.x

How to change the port number in Nexus Server? 
  • Go to  
  • Nexus Home directory ------------------( /opt/Nexus/etc )
  • Nuxus-default.properties   (vi)
  • application-port =    
  • sudo systemctl restart nexus
How to change the Context path in Nexus Server?
  • Go to 
  • Nexus Home directory ------------------(/opt/Nexus/etc )
  • Nuxus-default.properties   (vi)
  • nexus-context -path=/(Give your context path)
  • Once done the configure in the server we need to restart the service.
  • Sudo Systemctl restart nexus
Create a Repositories:
  • Go to  Settings
  • Repositories
    • Create Repositories
      • maven2(hosted)
      • Name: ---------------------------------Flipkart-Snapshot  (Flipkart-releases)
      • Version Policy: -----------------------snapshot  (Release)
      • Blob Store: default
      • Deployment Policy : Disable redeploy
      • Cleanup Policies:

Integrate maven with Nexus ?
                           (or)
Where we configure Nexus Repositories details?

Pom.xml    (Nexus Repo Details)
  • <distribution management>
    • <repository>
      • Id
      • Name
      • Url
    • </repository>
    • <Snapshot Repository>
      • Id
      • Name
      • Url
    • </Snapshot Repository>
  • </distribution management>
Settings.xml (Credentials Details)
  • Maven Home Directory
    • conf
    • settings.xml
      • <servers>
        • <server>
          • <id>nexus</id>
          • <username>admin</username>
          • <password>Ramadevi@09</password>
        • </server>
      • </servers>
              
How to create a Remote Repository?
  • Go to Settings
    • Repositories
    • Create Repositories
      • Maven2(hosted)
      • Name: ----------------------------------------Flipkart- Remote-Repo
      • Version Policy: Mixed
      • Blob Store: default
      • Deployment Policy : Disable redeploy
      • Cleanup Policy :
How Upload jar files into Remote Repo (Flipkart- Remote-Repo)?
  • Go to Browse tab
  • Go to (Flipkart- Remote-Repo)
    • Upload Component
    • Flipkart- Remote-Repo (Jar files)
      • Group Id
      • Artifact Id
      • Version
        • After Create Remote Repo
        • Take that dependency past in to Pom.xml
How to configure Remote Repository details in Pom.xml?  
  • Before dependency tag
    • <Repositories>
      • <Repository>
        • Id
        • Url (Remote Repo Url)
        • </Repository>
    • </Repositories>
How to create a Proxy Repository?
  • Go to Settings
  • Repositories
    • Create Repositories
      • maven2 (Proxy)
      • Name : ------------------------------Flipkart- proxy
      • Version Policy:     Mixed
    • Remote Storage:  https://repo1.maven.org/maven2/ (Provide maven Central Repo)



Where to provide proxy Repo details in POM.xml?       
  • Go to Pom.xml   
    • <Repositories>
      • <Repository>
        • Id
        • Url (Proxy Url)
      • </Repository>
    • </Repositories>
How to get the dependencies from Remote & Proxy Repository?
  • Go to Settings
  • Repositories
    • Create Repositories
      • maven2 (Group)
      • Name: -----------------------------Flipkart- Group-Repo
      • Group:  Flipkart- proxy , Flipkart- Remote-Repo
  • <Repositories>
    • <Repository>
      • Id
      • Url (Group Url)
    • </Repository>
  • </Repositories>
How to Create a User?
  • Go to Settings
  • Security
  • User
  • Create Local User
  • Roles
  • nx-Admin
  • nx-Anonymous
How to Create a Roles?
 
LDAP
Cleanup Policies
 
Support
 
System
           Api 






















Comments

Popular posts from this blog

AWS

Linux

kubernetes