Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy new agent sections needs to be completed will all agents deployment options. #1625

Closed
Tracked by #4178
alberpilot opened this issue Jun 6, 2022 · 18 comments
Closed
Tracked by #4178
Assignees
Labels
Milestone

Comments

@alberpilot
Copy link
Contributor

The Wazuh dashboard section Deploy new agent should be redefined, including all agent OS, with architecture differences, service support (systems or SysV), etc.
We need to define a list with all available options.

@alberpilot alberpilot added type/feature New feature request target: minor labels Jun 6, 2022
@gdiazlo gdiazlo moved this to Triage in Release 4.4.0 Jun 6, 2022
@snaow snaow moved this from Triage to Todo in Release 4.4.0 Jun 8, 2022
@okynos okynos moved this from Todo to In Progress in Release 4.4.0 Jul 25, 2022
@okynos
Copy link
Contributor

okynos commented Jul 25, 2022

First of all we recommend to remove Systemd/SysV section and left only suggested options below.

Combinations (First iteration)

System Version Architecture command
Red Hat 5 i386 sudo WAZUH_MANAGER='ip' yum install http://packages.wazuh.com/4.x/yum5/i386/wazuh-agent-4.3.6-1.el5.i386.rpm
Red Hat 5 x86_64 sudo WAZUH_MANAGER='ip' yum install http://packages.wazuh.com/4.x/yum5/x86_64/wazuh-agent-4.3.6-1.el5.x86_64.rpm
Red Hat 6+ i386 sudo WAZUH_MANAGER='ip' yum install https://packages.wazuh.com/4.x/yum/wazuh-agent-4.3.6-1.i386.rpm
Red Hat 6+ x86_64 sudo WAZUH_MANAGER='ip' yum install https://packages.wazuh.com/4.x/yum/wazuh-agent-4.3.6-1.x86_64.rpm
Red Hat 6+ armhf sudo WAZUH_MANAGER='ip' yum install https://packages.wazuh.com/4.x/yum/wazuh-agent-4.3.6-1.armv7hl.rpm
Red Hat 6+ aarch64 sudo WAZUH_MANAGER='ip' yum install https://packages.wazuh.com/4.x/yum/wazuh-agent-4.3.6-1.aarch64.rpm
CentOS 5 i386 sudo WAZUH_MANAGER='ip' yum install http://packages.wazuh.com/4.x/yum5/i386/wazuh-agent-4.3.6-1.el5.i386.rpm
CentOS 5 x86_64 sudo WAZUH_MANAGER='ip' yum install http://packages.wazuh.com/4.x/yum5/x86_64/wazuh-agent-4.3.6-1.el5.x86_64.rpm
CentOS 6+ i386 sudo WAZUH_MANAGER='ip' yum install https://packages.wazuh.com/4.x/yum/wazuh-agent-4.3.6-1.i386.rpm
CentOS 6+ x86_64 sudo WAZUH_MANAGER='ip' yum install https://packages.wazuh.com/4.x/yum/wazuh-agent-4.3.6-1.x86_64.rpm
CentOS 6+ armhf sudo WAZUH_MANAGER='ip' yum install https://packages.wazuh.com/4.x/yum/wazuh-agent-4.3.6-1.armv7hl.rpm
CentOS 6+ aarch64 sudo WAZUH_MANAGER='ip' yum install https://packages.wazuh.com/4.x/yum/wazuh-agent-4.3.6-1.aarch64.rpm
Debian 7+ i386 curl -so wazuh-agent-4.3.6.deb https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.3.6-1_i386.deb && sudo WAZUH_MANAGER='ip' dpkg -i ./wazuh-agent-4.3.6.deb
Debian 7+ x86_64 curl -so wazuh-agent-4.3.6.deb https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.3.6-1_amd64.deb && sudo WAZUH_MANAGER='ip' dpkg -i ./wazuh-agent-4.3.6.deb
Debian 7+ armhf curl -so wazuh-agent-4.3.6.deb https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.3.6-1_armhf.deb && sudo WAZUH_MANAGER='ip' dpkg -i ./wazuh-agent-4.3.6.deb
Debian 7+ aarch64 curl -so wazuh-agent-4.3.6.deb https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.3.6-1_arm64.deb && sudo WAZUH_MANAGER='ip' dpkg -i ./wazuh-agent-4.3.6.deb
Ubuntu 14+ i386 curl -so wazuh-agent-4.3.6.deb https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.3.6-1_i386.deb && sudo WAZUH_MANAGER='ip' dpkg -i ./wazuh-agent-4.3.6.deb
Ubuntu 14+ x86_64 curl -so wazuh-agent-4.3.6.deb https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.3.6-1_amd64.deb && sudo WAZUH_MANAGER='ip' dpkg -i ./wazuh-agent-4.3.6.deb
Ubuntu 14+ armhf curl -so wazuh-agent-4.3.6.deb https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.3.6-1_armhf.deb && sudo WAZUH_MANAGER='ip' dpkg -i ./wazuh-agent-4.3.6.deb
Ubuntu 14+ aarch64 curl -so wazuh-agent-4.3.6.deb https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.3.6-1_arm64.deb && sudo WAZUH_MANAGER='ip' dpkg -i ./wazuh-agent-4.3.6.deb
Windows XP+ i386 Invoke-WebRequest -Uri https://packages.wazuh.com/4.x/windows/wazuh-agent-4.3.6-1.msi -OutFile ${env:tmp}\wazuh-agent-4.3.6.msi; msiexec.exe /i ${env:tmp}\wazuh-agent-4.3.6.msi /q WAZUH_MANAGER='ip' WAZUH_REGISTRATION_SERVER='ip'
macOS Sierra+ i386 curl -so wazuh-agent-4.3.6.pkg https://packages.wazuh.com/4.x/macos/wazuh-agent-4.3.6-1.pkg && sudo launchctl setenv WAZUH_MANAGER 'ip' && sudo installer -pkg ./wazuh-agent-4.3.6.pkg -target /

@okynos
Copy link
Contributor

okynos commented Jul 29, 2022

Install commands

Package manager Extension Command
YUM RPM sudo WAZUH_MANAGER='manager.ip' yum install -y URL/wazuh-agent.rpm
APT DEB curl -so wazuh-agent.deb URL/wazuh-agent.deb && sudo WAZUH_MANAGER='manager.ip' dpkg -i ./wazuh-agent.deb
ZYPPER RPM sudo rpm --import https://packages.wazuh.com/key/GPG-KEY-WAZUH && sudo WAZUH_MANAGER='manager.ip' zypper install -y URL/wazuh-agent.rpm
WIN MSI Invoke-WebRequest -Uri URL/wazuh-agent.msi -OutFile ${env:tmp}\wazuh-agent.msi; msiexec.exe /i ${env:tmp}\wazuh-agent.msi /q WAZUH_MANAGER='172.31.76.147' WAZUH_REGISTRATION_SERVER='172.31.76.147'
MAC PKG curl -so wazuh-agent.pkg URL/wazuh-agent.pkg && sudo launchctl setenv WAZUH_MANAGER '172.31.76.147' && sudo installer -pkg ./wazuh-agent.pkg -target /
PKGADD PKG sudo curl -so URL/wazuh-agent.pkg && pkgadd -d wazuh-agent.pkg
PKG P5P sudo curl -so URL/wazuh-agent.p5p && pkg install -g wazuh-agent.p5p wazuh-agent
RPM RPM sudo WAZUH_MANAGER='manager.ip' rpm -ivh URL/wazuh-agent.rpm
HP TAR cd / && sudo curl -so URL/wazuh-agent.tar && sudo groupadd wazuh && sudo useradd -G wazuh wazuh && sudo tar -xvf wazuh-agent.tar

Start commands

Service manager Command
Upstart update-rc.d wazuh-agent defaults && service wazuh-agent start
SysV service wazuh-agent start
SystemD systemctl daemon-reload && systemctl enable wazuh-agent && systemctl start wazuh-agent
NET NET START WazuhSvc
Wazuh-control /var/ossec/bin/wazuh-control start
init.d /sbin/init.d/wazuh-agent start
Wazuh-control-macos /Library/Ossec/bin/wazuh-control start
System Version Service manager
Red Hat 5 SysV
Red Hat 6 SysV
Red Hat 7 SystemD
Red Hat 8 SystemD
Red Hat 9 SystemD
CentOS 5 SysV
CentOS 6 SysV
CentOS 7 SystemD
CentOS 8 SystemD
Debian 7 SysV
Debian 8 SystemD
Debian 9 SystemD
Debian 10 SystemD
Debian 11 SystemD
Ubuntu 14 SysV/Upstart
Ubuntu 16 SystemD
Ubuntu 18 SystemD
Ubuntu 20 SystemD
Ubuntu 22 SystemD
Windows XP NET
Windows Vista NET
Windows 7 NET
Windows Server2008 NET
Windows 8 NET
Windows Server2012 NET
Windows Server2016 NET
Windows 10 NET
Windows Server2019 NET
Windows 11 NET
macOS Sierra Wazuh-control-macos
macOS High Sierra Wazuh-control-macos
macOS Mojave Wazuh-control-macos
macOS Catalina Wazuh-control-macos
macOS Monterey Wazuh-control-macos
OpenSuse Leap 15+ SystemD
Solaris 10 Wazuh-control
Solaris 11 Wazuh-control
AIX 6.1 TL9+ Wazuh-control
HP-UX 11.31+ init.d

Supported systems

System Version Architecture command
Red Hat 7+ i386 YUM
Red Hat 7+ x86_64 YUM
Red Hat 7+ armhf YUM
Red Hat 7+ aarch64 YUM
CentOS 7+ i386 YUM
CentOS 7+ x86_64 YUM
CentOS 7+ armhf YUM
CentOS 7+ aarch64 YUM
Debian 10+ i386 APT
Debian 10+ x86_64 APT
Debian 10+ armhf APT
Debian 10+ aarch64 APT
Ubuntu 16+ i386 APT
Ubuntu 16+ x86_64 APT
Ubuntu 16+ armhf APT
Ubuntu 16+ aarch64 APT
Windows Server2012/8+ i386 WIN
macOS Sierra+ i386 MAC
OpenSuse Leap 15+ i386 ZYPPER
OpenSuse Leap 15+ x86_64 ZYPPER
Solaris 10 i386 PKGADD
Solaris 10 SPARC PKGADD
Solaris 11 i386 PKG
Solaris 11 SPARC PKG
AIX 6.1 TL9+ PowerPC RPM
HP-UX 11.31+ Itanium2 HP

To systems with deprecated libraries as:

  • CentOS 5 and 6
  • RedHat 5 and 6
  • Debian 7, 8 and 9
  • Ubuntu 14
  • Windows XP, Vista, 2008, 7

The user will need to perform set up steps with their environment in addition to the mentioned here. To know:

  • Manage working repositories to get Wazuh dependencies.
  • Install required packages like curl, sudo, Invoke-webrequests and others.
  • Keep the system updated and connected to the network.

@okynos
Copy link
Contributor

okynos commented Sep 14, 2022

Additional information

  • For C7 we support ARMV7HL(ARMHF), AARCH64, I386, X86_64 and PPC64LE. The command is the same in all of them (The system and the package manager are the same).
  • For D9+ we support the same architectures than C7 and the command is the same (same system and same package manager)
  • For OpenSuse we support the same architectures as it needs RPM package. It is built and provided.
  • AL2,Fedora,OL, RHEL, SUSE.... All of them use RPM and uses the same commands than C7
  • For Raspbian OS we support the same. It's a Debian 9/10 fork.
  • AL1 is a fork of CentOS 6
  • AL2 is a fork of CentOS 7
  • AL2022 is similar to RHEL 9
  • Red Hat and Oracle Linux are the same as CentOS (forks)
  • Red Hat 6 are the same as CentOS 6
  • Oracle Linux 6 are the same as CentOS 6

Related to the commands

  • The default download command inside macOS is cURL. Wget doesn't exists as a default option.
  • In Ubuntu 14 we have an upstart option, later on Ubuntu 16 remove it in favor of SystemD.
  • We suggest to keep SysV command in Ubuntu 14 selector to avoid users misconceptions.

@okynos
Copy link
Contributor

okynos commented Oct 20, 2022

The team has decided to include documentation steps to allow users the provision of the following systems:

  • AIX 6.1 TL9+
  • HP-UX 11.31+
  • Solaris 10u11 SPARC
  • Solaris 11.3+ SPARC
  • CentOS 5.11
  • Debian 7+
  • Ubuntu 14
  • Ubuntu 16

It's necessary to include the required steps to allow HTTP/HTTPS Wazuh agent package download and guarantee the correct Wazuh agent deployment in all systems supported by Wazuh.

@okynos
Copy link
Contributor

okynos commented Oct 20, 2022

CentOS 5.11

Starting from centos:5.11 from Docker hub. Instructions:

sudo docker run -it --name c5-1625 centos:5.11 bash
cp -r /etc/yum.repos.d /etc/yum.repos.d.bak
rm -f /etc/yum.repos.d/* && echo "exactarch=1" >> /etc/yum.conf

function __curl() {
  read proto server path <<<$(echo ${1//// })
  DOC=/${path// //}
  HOST=${server//:*}
  PORT=${server//*:}
  [[ x"${HOST}" == x"${PORT}" ]] && PORT=80

  exec 3<>/dev/tcp/${HOST}/$PORT
  echo -en "GET ${DOC} HTTP/1.0\r\nHost: ${HOST}\r\n\r\n" >&3
  (while read line; do
   [[ "$line" == $'\r' ]] && break
  done && cat) <&3
  exec 3>&-
}

__curl http://packages.wazuh.com/utils/system/c5/CentOS-Base.repo > /etc/yum.repos.d/CentOS-Base.repo
rpm --import http://packages.wazuh.com/key/GPG-KEY-WAZUH-5
__curl http://packages.wazuh.com/4.x/yum5/x86_64/wazuh-agent-4.3.9-1.el5.x86_64.rpm > ./wazuh-agent.rpm
WAZUH_MANAGER=X.X.X.X yum localinstall -y wazuh-agent.rpm

@okynos okynos added the epic label Oct 21, 2022
@okynos
Copy link
Contributor

okynos commented Oct 21, 2022

Debian 7

Starting from debian:wheezy-slim from Docker hub. Instructions:

echo "deb http://archive.debian.org/debian/ wheezy contrib main non-free" > /etc/apt/sources.list
echo "deb-src http://archive.debian.org/debian/ wheezy contrib main non-free" >> /etc/apt/sources.list

function __curl() {
  read proto server path <<<$(echo ${1//// })
  DOC=/${path// //}
  HOST=${server//:*}
  PORT=${server//*:}
  [[ x"${HOST}" == x"${PORT}" ]] && PORT=80

  exec 3<>/dev/tcp/${HOST}/$PORT
  echo -en "GET ${DOC} HTTP/1.0\r\nHost: ${HOST}\r\n\r\n" >&3
  (while read line; do
   [[ "$line" == $'\r' ]] && break
  done && cat) <&3
  exec 3>&-
}

__curl http://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.3.9-1_amd64.deb > ./wazuh-agent.deb
apt-get update
apt-get install -y lsb-release adduser python2.7 python2.7-minimal libssl1.0.0 mime-support libexpat1 libncursesw5 libsqlite3-0 python python-minimal procps
WAZUH_MANAGER=X.X.X.X dpkg -i wazuh-agent.deb

@okynos
Copy link
Contributor

okynos commented Oct 21, 2022

Solaris 10u11 SPARC

Instructions:

/usr/bin/bash

function __curl() {
  read proto server path <<<$(echo ${1//// })
  DOC=/${path// //}
  HOST=${server//:*}
  PORT=${server//*:}
  [[ x"${HOST}" == x"${PORT}" ]] && PORT=80

  exec 3<>/dev/tcp/${HOST}/$PORT
  echo -en "GET ${DOC} HTTP/1.0\r\nHost: ${HOST}\r\n\r\n" >&3
  (while read line; do
   [[ "$line" == $'\r' ]] && break
  done && cat) <&3
  exec 3>&-
}

__curl http://packages.wazuh.com/4.x/solaris/sparc/10/wazuh-agent_v4.3.9-sol10-sparc.pkg > ./wazuh-agent.pkg
# Wait...
/usr/bin/su # Insert root password
/usr/sbin/pkgadd -d wazuh-agent.pkg

@okynos
Copy link
Contributor

okynos commented Oct 21, 2022

Solaris 11.3 SPARC (Tentative)

Instructions:

/usr/bin/bash

function __curl() {
  read proto server path <<<$(echo ${1//// })
  DOC=/${path// //}
  HOST=${server//:*}
  PORT=${server//*:}
  [[ x"${HOST}" == x"${PORT}" ]] && PORT=80

  exec 3<>/dev/tcp/${HOST}/$PORT
  echo -en "GET ${DOC} HTTP/1.0\r\nHost: ${HOST}\r\n\r\n" >&3
  (while read line; do
   [[ "$line" == $'\r' ]] && break
  done && cat) <&3
  exec 3>&-
}

__curl http://packages.wazuh.com/4.x/solaris/sparc/11/wazuh-agent_v4.3.9-sol11-sparc.p5p > ./wazuh-agent.p5p
# Wait...
/usr/bin/su # Insert root password
/usr/sbin/pkg install -g wazuh-agent.p5p wazuh-agent

@okynos
Copy link
Contributor

okynos commented Oct 21, 2022

AIX (Tentative)

Instructions:

/usr/bin/bash

function __curl() {
  read proto server path <<<$(echo ${1//// })
  DOC=/${path// //}
  HOST=${server//:*}
  PORT=${server//*:}
  [[ x"${HOST}" == x"${PORT}" ]] && PORT=80

  exec 3<>/dev/tcp/${HOST}/$PORT
  echo -en "GET ${DOC} HTTP/1.0\r\nHost: ${HOST}\r\n\r\n" >&3
  (while read line; do
   [[ "$line" == $'\r' ]] && break
  done && cat) <&3
  exec 3>&-
}

__curl http://packages.wazuh.com/4.x/aix/wazuh-agent-4.3.9-1.aix.ppc.rpm > ./wazuh-agent.rpm
# Wait...
/usr/bin/su # Insert root password
WAZUH_MANAGER="10.0.0.2" rpm -ivh wazuh-agent.rpm

@okynos
Copy link
Contributor

okynos commented Oct 21, 2022

HP-UX (Tentative)

Instructions:

/usr/local/bin
/usr/bin/bash

function __curl() {
  read proto server path <<<$(echo ${1//// })
  DOC=/${path// //}
  HOST=${server//:*}
  PORT=${server//*:}
  [[ x"${HOST}" == x"${PORT}" ]] && PORT=80

  exec 3<>/dev/tcp/${HOST}/$PORT
  echo -en "GET ${DOC} HTTP/1.0\r\nHost: ${HOST}\r\n\r\n" >&3
  (while read line; do
   [[ "$line" == $'\r' ]] && break
  done && cat) <&3
  exec 3>&-
}

__curl http://packages.wazuh.com/4.x/aix/wazuh-agent-4.3.9-1.aix.ppc.rpm > ./wazuh-agent.rpm
# Wait...
/usr/bin/su # Insert root password
WAZUH_MANAGER="10.0.0.2" rpm -ivh wazuh-agent.rpm

@okynos
Copy link
Contributor

okynos commented Oct 25, 2022

HP-UX (Tested)

It has performed various tests over HP-UX instance.
On ash/csh/ksh/sh it couldn't open sockets through /dev as bash does. so, it's required to handle another option.
Target -> PERL
Instructions:

/usr/bin/su # Insert root password
perl -e 'use LWP::Simple; getstore("http://packages.wazuh.com/4.x/hp-ux/wazuh-agent-4.3.9-1-hpux-11v3-ia64.tar", "/tmp/wazuh-agent.tar")'
# Wait...
groupadd wazuh
useradd -G wazuh wazuh
tar -xvf /tmp/wazuh-agent.tar

AIX (Tentative)

perl -e 'use File::Fetch; $File::Fetch::BLACKLIST = [qw|wget lftp lynx netftp ftp curl rsync ncftp|]; $ff = File::Fetch->new(uri => "http://packages.wazuh.com/4.x/aix/wazuh-agent-4.3.9-1.aix.ppc.rpm"); $ff->fetch() or die $ff->error;'

@okynos
Copy link
Contributor

okynos commented Oct 26, 2022

Reformulation

After test each combination into each system we can conclude the following (It has improved from initial version)

CentOS 5.11

Tested image: centos:5.11, command: sudo docker run -it --name c5-1625 centos:5.11 bash

export PACKAGE_PATH="/4.x/yum5/x86_64/wazuh-agent-4.3.9-1.el5.x86_64.rpm"
{ echo -en "GET ${PACKAGE_PATH} HTTP/1.0\r\nHost: packages.wazuh.com\r\n\r\n" >&3; (while read l; do [ "$l" = $'\r' ] && break; done && cat) <&3; } 3<> /dev/tcp/"packages.wazuh.com"/80 > wazuh-agent.rpm

rpm --import http://packages.wazuh.com/key/GPG-KEY-WAZUH-5
WAZUH_MANAGER=X.X.X.X rpm -ivh wazuh-agent.rpm

Debian 7

Tested image: debian:wheezy-slim, command: sudo docker run -it --rm debian:wheezy-slim

echo "deb http://archive.debian.org/debian/ wheezy contrib main non-free" > /etc/apt/sources.list
echo "deb-src http://archive.debian.org/debian/ wheezy contrib main non-free" >> /etc/apt/sources.list

export PACKAGE_PATH="/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_4.3.9-1_amd64.deb"
{ echo -en "GET ${PACKAGE_PATH} HTTP/1.0\r\nHost: packages.wazuh.com\r\n\r\n" >&3; (while read l; do [ "$l" = $'\r' ] && break; done && cat) <&3; } 3<> /dev/tcp/"packages.wazuh.com"/80 > wazuh-agent.deb

apt-get update
apt-get install -y lsb-release adduser python2.7 python2.7-minimal libssl1.0.0 mime-support libexpat1 libncursesw5 libsqlite3-0 python python-minimal procps
WAZUH_MANAGER=X.X.X.X dpkg -i wazuh-agent.deb

HP-UX

/usr/bin/su # Insert root password
perl -e 'use LWP::Simple; getstore("http://packages.wazuh.com/4.x/hp-ux/wazuh-agent-4.3.9-1-hpux-11v3-ia64.tar", "/tmp/wazuh-agent.tar")'
# Wait...
groupadd wazuh
useradd -G wazuh wazuh
tar -xvf /tmp/wazuh-agent.tar

Solaris 10u11 SPARC

/usr/bin/su # Insert root password
/usr/bin/bash

export PACKAGE_PATH="/4.x/solaris/sparc/10/wazuh-agent_v4.3.9-sol10-sparc.pkg"
{ echo -en "GET ${PACKAGE_PATH} HTTP/1.0\r\nHost: packages.wazuh.com\r\n\r\n" >&3; (while read l; do [ "$l" = $'\r' ] && break; done && cat) <&3; } 3<> /dev/tcp/"packages.wazuh.com"/80 > wazuh-agent.pkg
# Wait...
/usr/sbin/pkgadd -d wazuh-agent.pkg

Solaris 11.3 SPARC

/usr/bin/su # Insert root password
/usr/bin/bash

export PACKAGE_PATH="/4.x/solaris/sparc/11/wazuh-agent_v4.3.9-sol11-sparc.p5p"
{ echo -en "GET ${PACKAGE_PATH} HTTP/1.0\r\nHost: packages.wazuh.com\r\n\r\n" >&3; (while read l; do [ "$l" = $'\r' ] && break; done && cat) <&3; } 3<> /dev/tcp/"packages.wazuh.com"/80 > wazuh-agent.p5p
# Wait...
/usr/sbin/pkg install -g wazuh-agent.p5p wazuh-agent

AIX

/usr/bin/su # Insert root password
perl -e 'use LWP::Simple; getstore("http://packages.wazuh.com/4.x/aix/wazuh-agent-4.3.9-1.aix.ppc.rpm", "/tmp/wazuh-agent.rpm")'
# Wait...
WAZUH_MANAGER="10.0.0.2" rpm -ivh /tmp/wazuh-agent.rpm

@alberpilot
Copy link
Contributor Author

Instructions were provided. I proceed to close this issue.

@okynos
Copy link
Contributor

okynos commented Nov 18, 2022

Windows coverage

OPTION1: Download and install command

Invoke-WebRequest -Uri URL/wazuh-agent.msi -OutFile ${env:tmp}\wazuh-agent.msi; msiexec.exe /i ${env:tmp}\wazuh-agent.msi /q WAZUH_MANAGER='172.31.76.147' WAZUH_REGISTRATION_SERVER='172.31.76.147'

OPTION2: Just install command:

# Provide MSI package URL and request the user to download the package and run the following command:
msiexec.exe /i wazuh-agent.msi /q WAZUH_MANAGER='172.31.76.147' WAZUH_REGISTRATION_SERVER='172.31.76.147'
System Command
Windows Server 2012 OPTION1
Windows Server 2016 OPTION1
Windows Server 2019 OPTION1
Windows Server 2022 OPTION1
Windows Vista OPTION1
Windows 7 OPTION1
Windows 8 OPTION1
Windows 8.1 OPTION1
Windows 10 OPTION1
Windows 11 OPTION1
Windows XP OPTION2
Windows Server 2008 OPTION2

@okynos
Copy link
Contributor

okynos commented Nov 28, 2022

We need to include Alpine instructions, reopened.

@okynos okynos reopened this Nov 28, 2022
@okynos
Copy link
Contributor

okynos commented Nov 28, 2022

Alpine instructions

Instructions to @wazuh/content

To include Alpine into documentation installation steps we will need to perform the following steps:

  1. Include Wazuh signing key into keys folder:
# wget -O /etc/apk/keys/alpine-devel@wazuh.com-633d7457.rsa.pub https://packages-dev.wazuh.com/key/alpine-devel%40wa
zuh.com-633d7457.rsa.pub
  1. Set up repository into repositories list:
echo "https://packages-dev.wazuh.com/trash/alpine/v3.12/main" >> /etc/apk/repositories

⚠️ Remember to replace the trash repository and packages-dev to production one for example https://packages.wazuh.com/4.x/alpine/v3.12/main
3. Update repository metadata:

apk update
  1. Install Wazuh agent:
apk add wazuh-agent
  1. ⚠️ Reminder, by now the auto deployment variables doesn't work. It will be included in a next iteration.

Instructions to @wazuh/frontend

Alpine is a system based on containers, so at first we haven't any service management in the system.
So we won't have any way to enable or start the agent without wazuh-control keep that in mind.

To the rest the one-liner installation command could be something like this:

  • Option A (Using signed way):
wget -O /etc/apk/keys/alpine-devel@wazuh.com-633d7457.rsa.pub https://packages-dev.wazuh.com/key/alpine-devel%40wazuh.com-633d7457.rsa.pub && \
echo "https://packages-dev.wazuh.com/trash/alpine/v3.12/main" >> /etc/apk/repositories && \
apk update && \
apk add wazuh-agent
  • Option B (Using allow untrusted):
wget -O wazuh-agent.apk https://packages-dev.wazuh.com/trash/alpine/v3.12/main/x86_64/wazuh-agent-4.4.0-r1.apk && 
apk add wazuh-agent.apk --allow-untrusted

⚠️ Remember to replace packages-dev to production packages and repository trash to production one 4.x. Also it's required to replace the architecture for example x86_64 to required one. Wazuh supports the following architectures:

  • x86_64
  • x86
  • armhf
  • armv7
  • aarch64
  • ppc64le

The A option won't need to set up the architecture.

@okynos
Copy link
Contributor

okynos commented Dec 19, 2022

We detected an error into this comment, at the first table #1625 (comment)

The solved table is:

Install commands

Package manager Extension Command
YUM RPM sudo WAZUH_MANAGER='manager.ip' yum install -y URL/wazuh-agent.rpm
APT DEB curl -so wazuh-agent.deb URL/wazuh-agent.deb && sudo WAZUH_MANAGER='manager.ip' dpkg -i ./wazuh-agent.deb
ZYPPER RPM sudo rpm --import https://packages.wazuh.com/key/GPG-KEY-WAZUH && sudo WAZUH_MANAGER='manager.ip' zypper install -y URL/wazuh-agent.rpm
WIN MSI Invoke-WebRequest -Uri URL/wazuh-agent.msi -OutFile ${env:tmp}\wazuh-agent.msi; msiexec.exe /i ${env:tmp}\wazuh-agent.msi /q WAZUH_MANAGER='172.31.76.147' WAZUH_REGISTRATION_SERVER='172.31.76.147'
MAC PKG curl -so wazuh-agent.pkg URL/wazuh-agent.pkg && sudo launchctl setenv WAZUH_MANAGER '172.31.76.147' && sudo installer -pkg ./wazuh-agent.pkg -target /
PKGADD PKG sudo curl -so wazuh-agent.pkg URL/wazuh-agent.pkg && pkgadd -d wazuh-agent.pkg
PKG P5P sudo curl -so wazuh-agent.p5p URL/wazuh-agent.p5p && pkg install -g wazuh-agent.p5p wazuh-agent
RPM RPM sudo WAZUH_MANAGER='manager.ip' rpm -ivh URL/wazuh-agent.rpm
HP TAR cd / && sudo curl -so wazuh-agent.tar URL/wazuh-agent.tar && sudo groupadd wazuh && sudo useradd -G wazuh wazuh && sudo tar -xvf wazuh-agent.tar

@okynos
Copy link
Contributor

okynos commented Dec 27, 2022

After a meeting we want to update the last table with this one:

Install commands

Package manager Extension Command
YUM RPM sudo WAZUH_MANAGER='MANAGER_IP' yum install -y https://packages.wazuh.com/4.x/yum/wazuh-agent-TARGET_VERSION-1.TARGET_ARCHITECTURE.rpm
APT DEB curl -so wazuh-agent.deb https://packages.wazuh.com/4.x/apt/pool/main/w/wazuh-agent/wazuh-agent_TARGET_VERSION-1_TARGET_ARCHITECTURE.deb && sudo WAZUH_MANAGER='MANAGER_IP' dpkg -i ./wazuh-agent.deb
ZYPPER RPM sudo rpm --import https://packages.wazuh.com/key/GPG-KEY-WAZUH && sudo WAZUH_MANAGER='MANAGER_IP' zypper install -y https://packages.wazuh.com/4.x/yum/wazuh-agent-TARGET_VERSION-1.TARGET_ARCHITECTURE.rpm
WIN MSI Invoke-WebRequest -Uri https://packages.wazuh.com/4.x/windows/wazuh-agent-TARGET_VERSION-1.msi -OutFile ${env:tmp}\wazuh-agent.msi; msiexec.exe /i ${env:tmp}\wazuh-agent.msi /q WAZUH_MANAGER='MANAGER_IP' WAZUH_REGISTRATION_SERVER='MANAGER_IP'
MAC PKG curl -so wazuh-agent.pkg https://packages.wazuh.com/4.x/macos/wazuh-agent-TARGET_VERSION-1.pkg && sudo launchctl setenv WAZUH_MANAGER 'MANAGER_IP' && sudo installer -pkg ./wazuh-agent.pkg -target /
PKGADD PKG sudo curl -so wazuh-agent.pkg https://packages.wazuh.com/4.x/solaris/TARGET_ARCHITECTURE/10/wazuh-agent_vTARGET_VERSION-sol10-TARGET_ARCHITECTURE.pkg && pkgadd -d wazuh-agent.pkg
PKG P5P sudo curl -so wazuh-agent.p5p https://packages.wazuh.com/4.x/solaris/TARGET_ARCHITECTURE/11/wazuh-agent_vTARGET_VERSION-sol11-TARGET_ARCHITECTURE.p5p && pkg install -g wazuh-agent.p5p wazuh-agent
AIX RPM sudo WAZUH_MANAGER='MANAGER_IP' rpm -ivh https://packages.wazuh.com/4.x/aix/wazuh-agent-TARGET_VERSION-1.aix.ppc.rpm
HP TAR cd / && sudo curl -so wazuh-agent.tar https://packages.wazuh.com/4.x/hp-ux/wazuh-agent-TARGET_VERSION-1-hpux-11v3-ia64.tar && sudo groupadd wazuh && sudo useradd -G wazuh wazuh && sudo tar -xvf wazuh-agent.tar
APK/Alpine APK wget -O /etc/apk/keys/alpine-devel@wazuh.com-633d7457.rsa.pub https://packages.wazuh.com/key/alpine-devel%40wazuh.com-633d7457.rsa.pub && echo "https://packages.wazuh.com/4.x/alpine/v3.12/main" >> /etc/apk/repositories && apk update && apk add wazuh-agent=TARGET_VERSION-r1

⚠️ ⚠️ ⚠️
Remember to replace TARGET_VERSION with current version in production. Currently, 4.3.10. Or next version currently, 4.4.0
Remember to replace TARGET_ARCHITECTURE with user selected architecture.
Remember to replace MANAGER_IP with user specified manager IP or DNS.

⚠️ ⚠️ ⚠️

End of life of Ubuntu systems.
https://endoflife.software/operating-systems/linux/ubuntu

Deprecated Systems:

Possible deprecated systems:

  • macOS Sierra.
  • macOS High Sierra.
  • macOS Mojave.

Systems with deprecated libraries:

  • HP-UX
  • AIX
  • Solaris 10
  • Solaris 11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

No branches or pull requests

3 participants