Skip to content

Commit 4e6a4f9

Browse files
authored
Update installation instructions for Nexus Repository
1 parent 997729d commit 4e6a4f9

1 file changed

Lines changed: 43 additions & 1 deletion

File tree

nexus/slides.md

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ layout: section
88
<br>
99
<Link to="toc" title="Table of Contents"/>
1010

11+
---
12+
layout: section
13+
---
14+
15+
# Install self-hosted Nexus Repository
16+
17+
<br>
18+
<br>
19+
<Link to="toc" title="Table of Contents"/>
20+
1121
---
1222
hideInToc: true
1323
---
@@ -29,12 +39,17 @@ default['nexus_repository_manager']['nexus_home']['path'] = default['nexus_repos
2939
hideInToc: true
3040
---
3141

42+
# Install Java and create nexus user
43+
3244
```bash
3345
# Install Java
3446
sudo apt-get update
47+
# Java 17 supported on Sonatype Nexux 3.69.0 or later
3548
sudo apt-get install openjdk-17-jdk
49+
# Java 21 supported on Sonatype Nexus 3.87.0 or later
50+
sudo apt-get install openjdk-21-jdk
3651

37-
# Create user for ROS
52+
# Create user for nexus
3853
sudo useradd \
3954
--system \
4055
--shell /bin/false \
@@ -49,8 +64,12 @@ sudo groupadd --system nexus
4964
hideInToc: true
5065
---
5166

67+
# Download and unpack the install archive
68+
5269
```bash
5370
# https://help.sonatype.com/en/download.html
71+
72+
## x86_64
5473
$ curl -o /tmp/nexus-linux-x86_64.tar.gz \
5574
-L https://download.sonatype.com/nexus/3/nexus-3.87.1-01-linux-x86_64.tar.gz
5675
$ shasum -a 256 /tmp/nexus-linux-x86_64.tar.gz
@@ -61,6 +80,7 @@ tar -xvzf /tmp/nexus-linux-x86_64.tar.gz \
6180
--directory=/opt/sonatype \
6281
--keep-directory-symlink
6382

83+
## aarch64
6484
$ curl -o /tmp/nexus-linux-aarch_64.tar.gz \
6585
-L https://download.sonatype.com/nexus/3/nexus-3.87.1-01-linux-aarch_64.tar.gz
6686
$ shasum -a 256 /tmp/nexus-linux-aarch_64.tar.gz
@@ -79,14 +99,36 @@ ln -s "$(ls -d /opt/sonatype/nexus-* | sort -V | tail -n 1)" /opt/sonatype/nexus
7999
sudo chown -R nexus:nexus /opt/sonatype/sonatype-work
80100
```
81101

102+
---
103+
hideInToc: true
104+
---
105+
82106
```bash
107+
# https://help.sonatype.com/en/configuring-the-runtime-environment.html
108+
109+
mkdir /opt/sonatype/sonatype-work/nexus3/javaprefs
110+
chown -R nexus:nexus /opt/sonatype/sonatype-work/nexus3
111+
# Add the following to /opt/sonatype/nexus/bin/nexus.vmoptions
112+
# This will avoid 'java.util.prefs' spamming the log
113+
-Djava.util.prefs.userRoot=/opt/sonatype/sonatype-work/nexus3/javaprefs
114+
83115
cat <<EOF > /opt/sonatype/nexus/bin/nexus.rc
84116
run_as_user="nexus"
85117
EOF
86118

87119
sudo -u nexus /opt/sonatype/nexus/bin/nexus run
88120
```
89121

122+
---
123+
layout: section
124+
---
125+
126+
# Docker install
127+
128+
<br>
129+
<br>
130+
<Link to="toc" title="Table of Contents"/>
131+
90132
---
91133
hideInToc: true
92134
---

0 commit comments

Comments
 (0)