- Login to your Linux server and update the yum packages. Also install required utilities.
sudo yum update -y
sudo yum install wget -y
- Install OpenJDK 1.8
sudo yum install java-1.8.0-openjdk.x86_64 -y
- Create a directory named app and cd into the directory.
sudo mkdir /app && cd /app
- Download the latest nexus. You can get the latest download links fo for nexus
sudo wget -O nexus.tar.gz https://download.sonatype.com/nexus/3/latest-unix.tar.gz
- Untar the downloaded file.
sudo tar -xvf nexus.tar.gz
- Rename the untared file to nexus.
sudo mv nexus-3* nexus
- create a new user named nexus to run the nexus service.
sudo adduser nexus
- Change the ownership of nexus files and nexus data directory to nexus user.
sudo chown -R nexus:nexus /app/nexus
sudo chown -R nexus:nexus /app/sonatype-work
- Open /app/nexus/bin/nexus.rc file
sudo vi /app/nexus/bin/nexus.rc
run_as_user="nexus"
- Create a svc for nexus
sudo vi /etc/systemd/system/nexus.service
[Unit]
Description=nexus service
After=network.target
[Service]
Type=forking
LimitNOFILE=65536
User=nexus
Group=nexus
ExecStart=/app/nexus/bin/nexus start
ExecStop=/app/nexus/bin/nexus stop
User=nexus
Restart=on-abort
[Install]
WantedBy=multi-user.target
- Manage Nexus Service
sudo chkconfig nexus on
sudo systemctl start nexus
- Access nexus using ip:8081
localhost:8081
- Default username and password location will be given there
admin
-
Login to Nexus using admin user and password
-
Click on Server Administrations and configuration
- Click on Repositories
- Click on create repository
- Select maven 2 hosted
- Give any name and click on select
- You will see on newly created repo
- Login to Jenkins and install the plugin
nexus platform
- Configure nexus Server










