Using username "root".
root@192.168.1.9's password:
Last login: Tue Mar 19 23:59:05 2019
[root@c-mysql5 ~]# cd /opt/
[root@c-mysql5 opt]# wget https://download.sonatype.com/nexus/oss/nexus-latest-
bundle.tar.gz
--2019-03-20 00:24:36-- https://download.sonatype.com/nexus/oss/nexus-latest-
bundle.tar.gz
Resolving download.sonatype.com (download.sonatype.com)... 34.236.248.53,
54.164.58.135
Connecting to download.sonatype.com (download.sonatype.com)|34.236.248.53|:443...
connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://sonatype-
download.global.ssl.fastly.net/repository/repositoryManager/oss/nexus-2.14.12-02-
bundle.tar.gz [following]
--2019-03-20 00:24:38-- https://sonatype-
download.global.ssl.fastly.net/repository/repositoryManager/oss/nexus-2.14.12-02-
bundle.tar.gz
Resolving sonatype-download.global.ssl.fastly.net (sonatype-
download.global.ssl.fastly.net)... 151.101.37.194
Connecting to sonatype-download.global.ssl.fastly.net (sonatype-
download.global.ssl.fastly.net)|151.101.37.194|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 82390689 (79M) [application/x-gzip]
Saving to: ‘nexus-latest-bundle.tar.gz’
100%
[==================================================================================
============================================>] 8,23,90,689 1.10MB/s in 85s
Last-modified header invalid -- time-stamp ignored.
2019-03-20 00:26:22 (952 KB/s) - ‘nexus-latest-bundle.tar.gz’ saved
[82390689/82390689]
[root@c-mysql5 opt]# ll
total 80460
-rw-r--r--. 1 root root 82390689 Mar 20 00:26 nexus-latest-bundle.tar.gz
[root@c-mysql5 opt]# tar -zxvf nexus-latest-bundle.tar.gz
[root@c-mysql5 opt]# ll
total 80460
drwxr-xr-x. 8 1001 1001 113 Mar 6 09:54 nexus-2.14.12-02
-rw-r--r--. 1 root root 82390689 Mar 20 00:26 nexus-latest-bundle.tar.gz
drwxr-xr-x. 3 1001 1001 37 Mar 6 10:06 sonatype-work
[root@c-mysql5 opt]# cd nexus-2.14.12-02/bin
[root@c-mysql5 bin]# ll
total 20
drwxr-xr-x. 15 1001 1001 272 Mar 6 10:06 jsw
-rwxr-xr-x. 1 1001 1001 14602 Mar 6 09:54 nexus
-rwxr-xr-x. 1 1001 1001 2339 Mar 6 09:54 nexus.bat
[root@c-mysql5 bin]# ./nexus start
****************************************
WARNING - NOT RECOMMENDED TO RUN AS ROOT
****************************************
If you insist running as root, then set the environment variable RUN_AS_USER=root
before running this script.
[root@c-mysql5 bin]# cd
[root@c-mysql5 ~]# useradd rajesh
[root@c-mysql5 ~]# passwd rajesh
Changing password for user rajesh.
New password:
BAD PASSWORD: The password contains the user name in some form
Retype new password:
passwd: all authentication tokens updated successfully.
[root@c-mysql5 ~]# su - rajesh
[rajesh@c-mysql5 ~]$ cd /opt/nexus-2.14.12-02/bin
[rajesh@c-mysql5 bin]$ ./nexus start
Starting Nexus OSS...
Failed to start Nexus OSS.
[rajesh@c-mysql5 bin]$ sudo RUN_AS_USER=root ./nexus stop
****************************************
WARNING - NOT RECOMMENDED TO RUN AS ROOT
****************************************
Stopping Nexus OSS...
Waiting for Nexus OSS to exit...
Waiting for Nexus OSS to exit...
Stopped Nexus OSS.