upgrade to nexus 3.84.0-03
This commit is contained in:
parent
88acd8c3c0
commit
d78ce6dc39
13
README.md
13
README.md
|
|
@ -152,14 +152,21 @@ The Web based H2 Database Console is available at https://nexus.example.com/h2-c
|
|||
You can also access the database cli shell as:
|
||||
|
||||
```bash
|
||||
sudo su -l # switch to the root user.
|
||||
sudo -i # switch to the root user.
|
||||
systemctl stop nexus # make sure nexus is not running while you use the database.
|
||||
su -s /bin/bash nexus # switch to the nexus user.
|
||||
nexus_home=/opt/nexus/nexus-3.83.2-01 # make sure you have the correct version here.
|
||||
nexus_home=/opt/nexus/nexus-3.84.0-03 # make sure you have the correct version here.
|
||||
nexus_data="$(realpath $nexus_home/../sonatype-work/nexus3)"
|
||||
install -d $nexus_data/../tmp
|
||||
rm -f $nexus_data/../tmp/h2-*.jar
|
||||
unzip \
|
||||
-j \
|
||||
-d $nexus_data/../tmp \
|
||||
$nexus_home/bin/sonatype-nexus-repository-*.jar \
|
||||
'BOOT-INF/lib/h2-*.jar'
|
||||
function h2-shell {
|
||||
java \
|
||||
-cp $nexus_home/system/com/h2database/h2/*/h2*.jar \
|
||||
-cp $nexus_data/../tmp/h2-*.jar \
|
||||
org.h2.tools.Shell \
|
||||
-url jdbc:h2:$nexus_data/db/nexus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,12 +35,12 @@ pushd /opt/nexus
|
|||
# see https://help.sonatype.com/en/download-archives---repository-manager-3.html
|
||||
# see https://help.sonatype.com/en/release-notes.html
|
||||
# see https://help.sonatype.com/en/sonatype-nexus-repository.html
|
||||
nexus_version=3.83.2-01
|
||||
nexus_version=3.84.0-03
|
||||
nexus_home=/opt/nexus/nexus-$nexus_version
|
||||
nexus_tarball=nexus-$nexus_version-linux-x86_64.tar.gz
|
||||
nexus_download_url=https://download.sonatype.com/nexus/3/$nexus_tarball
|
||||
wget -q $nexus_download_url
|
||||
tar xf $nexus_tarball # NB this creates the $nexus_home (e.g. nexus-3.83.2-01) and sonatype-work directories.
|
||||
tar xf $nexus_tarball # NB this creates the $nexus_home (e.g. nexus-3.84.0-03) and sonatype-work directories.
|
||||
rm $nexus_tarball
|
||||
sed -i -E 's,#!.+,#!/usr/bin/bash,g' "$nexus_home/bin/nexus"
|
||||
install -d -o nexus -g nexus -m 700 .java # java preferences are saved here (the default java.util.prefs.userRoot preference).
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ binaries: binaries-download
|
|||
|
||||
binaries-download:
|
||||
mkdir -p binaries
|
||||
wget -qO- https://download.sonatype.com/nexus/3/nexus-3.83.2-01-unix.tar.gz \
|
||||
wget -qO- https://download.sonatype.com/nexus/3/nexus-3.84.0-03-unix.tar.gz \
|
||||
| tar xzf - --strip-components 1 -C binaries
|
||||
|
||||
clean:
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
<version>1.0-SNAPSHOT</version>
|
||||
|
||||
<properties>
|
||||
<nx-version>3.83.2-01</nx-version>
|
||||
<nx-version>3.84.0-03</nx-version>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -34,9 +34,16 @@ curl \
|
|||
nexus_apt_hosted_keyring_path="/etc/apt/keyrings/$nexus_domain-apt-hosted.gpg"
|
||||
gpg --dearmor -o "$nexus_apt_hosted_keyring_path" </vagrant/shared/apt-hosted-public.key
|
||||
|
||||
# install the hello-world package.
|
||||
# configure the apt-hosted repository.
|
||||
echo "deb [arch=amd64 signed-by=$nexus_apt_hosted_keyring_path] https://$nexus_domain/repository/apt-hosted jammy main" >"/etc/apt/sources.list.d/$nexus_domain-apt-hosted.list"
|
||||
apt-get update
|
||||
# NB for some odd reason, nexus 3.84.0-03, does not immediately sign the
|
||||
# repository metadata after a package is uploaded, so to prevent the
|
||||
# following error, we loop until apt-get update succeeds.
|
||||
# E: The repository 'https://nexus.example.com/repository/apt-hosted jammy Release' is not signed.
|
||||
# see https://github.com/sonatype/nexus-public/issues/725
|
||||
while ! apt-get update; do sleep 5; done
|
||||
|
||||
# install the hello-world package.
|
||||
apt-get install -y hello-world
|
||||
apt-cache show hello-world
|
||||
apt-cache policy hello-world
|
||||
|
|
|
|||
Loading…
Reference in New Issue