root@iZuf66zx8tquy3643i81efZ:~# sudo apt list -a opensearch
Listing... Done
root@iZuf66zx8tquy3643i81efZ:~# sudo apt -y install curl lsb-release gnupg2 ca-certificates
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
lsb-release is already the newest version (11.1.0ubuntu4).
ca-certificates is already the newest version (20230311ubuntu0.22.04.1).
curl is already the newest version (7.81.0-1ubuntu1.16).
The following packages were automatically installed and are no longer required:
at bolt cups-bsd cups-client cups-common debugedit dh-autoreconf dh-strip-nondeterminism dwz fwupd-signed
gir1.2-packagekitglib-1.0 intel-microcode iucode-tool libarchive-cpio-perl libarchive-zip-perl libatasmart4 libblockdev-crypto2
libblockdev-fs2 libblockdev-loop2 libblockdev-part-err2 libblockdev-part2 libblockdev-swap2 libblockdev-utils2 libblockdev2
libcups2 libdebhelper-perl libfile-stripnondeterminism-perl libfsverity0 libfwupd2 libgcab-1.0-0 libgpgme11 libgstreamer1.0-0
libgudev-1.0-0 libgusb2 libinih1 libintl-perl libintl-xs-perl libjcat1 libjson-glib-1.0-0 libjson-glib-1.0-common liblmdb0
libmail-sendmail-perl libmaxminddb0 libmbim-glib4 libmbim-proxy libmm-glib0 libmodule-find-perl libmodule-scandeps-perl
libmspack0 libpackagekit-glib2-18 libparted-fs-resize0 libproc-processtable-perl libqmi-glib5 libqmi-proxy librpm9 librpmbuild9
librpmio9 librpmsign9 libsmbios-c2 libsort-naturally-perl libstemmer0d libsub-override-perl libsys-hostname-long-perl
libudisks2-0 libvolume-key1 libxmlb2 lsb-security modemmanager pax python3-software-properties rpm-common udisks2
usb-modeswitch usb-modeswitch-data zerofree
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
gnupg2
0 upgraded, 1 newly installed, 0 to remove and 79 not upgraded.
Need to get 5,548 B of archives.
After this operation, 52.2 kB of additional disk space will be used.
Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu jammy-updates/universe amd64 gnupg2 all 2.2.27-3ubuntu2.1 [5,548 B]
Fetched 5,548 B in 0s (235 kB/s)
Selecting previously unselected package gnupg2.
(Reading database ... 116142 files and directories currently installed.)
Preparing to unpack .../gnupg2_2.2.27-3ubuntu2.1_all.deb ...
Unpacking gnupg2 (2.2.27-3ubuntu2.1) ...
Setting up gnupg2 (2.2.27-3ubuntu2.1) ...
Processing triggers for man-db (2.10.2-1) ...
root@iZuf66zx8tquy3643i81efZ:~# curl -fsSL https://artifacts.opensearch.org/publickeys/opensearch.pgp|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/opensearch.gpg
root@iZuf66zx8tquy3643i81efZ:~# echo "deb https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable main" | sudo tee /etc/apt/sources.list.d/opensearch-2.x.list
deb https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable main
root@iZuf66zx8tquy3643i81efZ:~# sudo apt list -a opensearch
Listing... Done
root@iZuf66zx8tquy3643i81efZ:~# sudo apt update
Hit:1 http://mirrors.cloud.aliyuncs.com/ubuntu jammy InRelease
Get:2 http://mirrors.cloud.aliyuncs.com/ubuntu jammy-updates InRelease [119 kB]
Hit:3 http://mirrors.cloud.aliyuncs.com/ubuntu jammy-backports InRelease
Get:4 http://mirrors.cloud.aliyuncs.com/ubuntu jammy-security InRelease [110 kB]
Get:5 http://mirrors.cloud.aliyuncs.com/ubuntu jammy-updates/main amd64 Packages [1,518 kB]
Get:6 http://mirrors.cloud.aliyuncs.com/ubuntu jammy-updates/universe amd64 Packages [1,061 kB]
Get:7 https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable InRelease [7,536 B]
Get:8 https://artifacts.opensearch.org/releases/bundle/opensearch/2.x/apt stable/main amd64 Packages [2,188 B]
Fetched 2,818 kB in 2s (1,730 kB/s)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
79 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@iZuf66zx8tquy3643i81efZ:~# sudo apt list -a opensearch
Listing... Done
opensearch/stable 2.12.0 amd64
opensearch/stable 2.11.1 amd64
opensearch/stable 2.11.0 amd64
opensearch/stable 2.10.0 amd64
opensearch/stable 2.9.0 amd64
opensearch/stable 2.8.0 amd64
opensearch/stable 2.7.0 amd64
opensearch/stable 2.6.0 amd64
opensearch/stable 2.5.0 amd64
root@iZuf66zx8tquy3643i81efZ:~#
sudo apt install opensearch=2.5.0
参考: https://computingforgeeks.com/how-to-install-opensearch-on-ubuntu/