@@ -12,10 +12,6 @@ layout: section
1212hideInToc: true
1313---
1414
15- ```
16- tar -tzf archive.tar.gz
17- ```
18-
1915```
2016default['nexus_repository_manager']['sonatype']['path'] = '/opt/sonatype'
2117default['nexus_repository_manager']['nexus_data']['path'] = '/nexus-data'
@@ -25,37 +21,70 @@ default['nexus_repository_manager']['sonatype_work']['path'] = default['nexus_re
2521default['nexus_repository_manager']['nexus_home']['path'] = default['nexus_repository_manager']['sonatype']['path'] + '/nexus'
2622
2723
24+ ./nexus-3.78.0-14 # Application Directory
25+ ./sonatype-work # Parent of the default Data Directory
26+ ```
27+
28+ ---
29+ hideInToc: true
30+ ---
31+
32+ ``` bash
33+ # Install Java
34+ sudo apt-get update
35+ sudo apt-get install openjdk-17-jdk
36+
2837# Create user for ROS
2938sudo useradd \
3039 --system \
3140 --shell /bin/false \
32- --comment "Nexus Repository Manager user" \<img width="1325" height="982" alt="2025-12-10_19-22-21" src="https://github.com/user-attachments/assets/15609a23-1134-4de9-97c4-f254676c1bb4" />
33-
41+ --comment " Nexus Repository Manager user" \
3442 --home-dir /opt/sonatype/nexus \
3543 nexus
3644
3745sudo groupadd --system nexus
46+ ```
3847
39- echo "nexus ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee "/etc/sudoers.d/dont-prompt-ros-for-sudo-password"
40- sudo su - nexus
41-
42- sudo apt update
43- sudo apt install openjdk-17-jdk
48+ ---
49+ hideInToc: true
50+ ---
4451
52+ ``` bash
4553# https://help.sonatype.com/en/download.html
46- $ curl -LO https://download.sonatype.com/nexus/3/nexus-3.87.1-01-linux-x86_64.tar.gz
47- $ shasum -a 256 nexus-3.87.1-01-linux-x86_64.tar.gz
54+ $ curl -o /tmp/nexus-linux-x86_64.tar.gz \
55+ -L https://download.sonatype.com/nexus/3/nexus-3.87.1-01-linux-x86_64.tar.gz
56+ $ shasum -a 256 /tmp/nexus-linux-x86_64.tar.gz
48579403cc4a78e11af09fc65e217e381dfcf435755dea31cdba9c947d6e1d439cd7 nexus-3.87.1-01-linux-x86_64.tar.gz
4958
50- cd /opt
51- tar xvz --keep-directory-symlink -f ./nexus-3.87.1-01-linux-x86_64.tar.gz
59+ mkdir -p /opt/sonatype
60+ tar -xvzf /tmp/nexus-linux-x86_64.tar.gz \
61+ --directory=/opt/sonatype \
62+ --keep-directory-symlink
63+
64+ $ curl -o /tmp/nexus-linux-aarch_64.tar.gz \
65+ -L https://download.sonatype.com/nexus/3/nexus-3.87.1-01-linux-aarch_64.tar.gz
66+ $ shasum -a 256 /tmp/nexus-linux-aarch_64.tar.gz
67+ 35847fc66895d3bd5cf8582b4d6c22161a00ce36924aed19f9b38107334b2ebb /tmp/nexus-linux-aarch_64.tar.gz
5268
53- tar -xvzf /path/to/nexus-3.87.1-01-linux-x86_64.tar.gz \
54- --directory=/opt \
69+ mkdir -p /opt/sonatype
70+ tar -xvzf /tmp/nexus-linux-aarch_64.tar.gz \
71+ --directory=/opt/sonatype \
5572 --keep-directory-symlink
73+ ```
5674
57- ./nexus-3.78.0-14 # Application Directory
58- ./sonatype-work # Parent of the default Data Directory
75+ ``` bash
76+ # Pick the latest version explicitly
77+ ln -s " $( ls -d /opt/sonatype/nexus-* | sort -V | tail -n 1) " /opt/sonatype/nexus
78+
79+ sudo chown -R nexus:nexus /opt/sonatype/sonatype-work
80+ ```
81+
82+ ``` bash
83+ cat << EOF > /opt/sonatype/nexus/bin/nexus.rc
84+ run_as_user="nexus"
85+ EOF
86+
87+ sudo -u nexus /opt/sonatype/nexus/bin/nexus run
5988```
6089
6190---
0 commit comments