This guide describes how to install the manager and API for CentOS 6 or greater from source code. In addition, for distributed architectures, you will find some guidance on how to install Filebeat.
Install the development tools and compilers. In Linux, this can easily be done using your distribution’s package manager:
# yum install make gcc policycoreutils-python automake autoconf libtool
1.1 Optional. Install the following dependencies only if the installation directory is not
/var/ossec. Since v3.9.0,
make depswill download a pre-compiled version of CPython, built to be installed in
/var/ossec. Otherwise, it will download a modified version of CPython sources and it will be necessary to compile it.
To install the build dependencies of CPython, follow these steps:
# yum install epel-release yum-utils -y # yum-builddep python34 -y
The Python version from the previous command may change depending of the OS used to build the binaries. More information in Install dependencies.
Download and extract the latest version:
# curl -Ls https://github.com/wazuh/wazuh/archive/v3.9.5.tar.gz | tar zx
install.shscript. This will display a wizard to guide you through the installation process using the Wazuh sources:
If you want to enable the database output, check out this section before running the installation script.# cd wazuh-* # ./install.sh
If you have previously compiled for another platform, you must clean the build using the Makefile in
src:# cd wazuh-* # make -C src clean # make -C src clean-deps
When the script asks what kind of installation you want, type
managerto install the Wazuh manager:
1- What kind of installation do you want (manager, agent, local, hybrid or help)? manager
During the installation, users can decide the installation path. Execute the
./install.sh and select the language, set the installation mode to
manager, then set the installation path (
Choose where to install Wazuh [/var/ossec]). The default path of installation is
/var/ossec. A commonly used custom path might be
Be extremely careful not to select a critical installation directory if you choose a different path than the default. If the directory already exist the installer will ask if delete the directory or if installing Wazuh inside.
The installer asks if you want to start Wazuh at the end of the installation. If you chosen not to, you can start it later with:
For Systemd:# systemctl start wazuh-manager
For SysV Init:# service wazuh-manager start
If you want to confirm that it started:
For Systemd:# systemctl status wazuh-manager
For SysV Init:# service wazuh-manager status
NodeJS >= 4.6.1 is required in order to run the Wazuh API. If you do not have NodeJS installed or your version is older than 4.6.1, we recommend you add the official repository as this has more recent versions.
# curl --silent --location https://rpm.nodesource.com/setup_8.x | bash - # yum -y install nodejs # npm config set user 0
Download and execute the installation script:
# curl -s -o install_api.sh https://raw.githubusercontent.com/wazuh/wazuh-api/v3.9.5/install_api.sh && bash ./install_api.sh download
Once the process is complete, you can check the service status with:
For Systemd:# systemctl status wazuh-api
For SysV Init:# service wazuh-api status
You can also run an unattended installation for the Wazuh manager and API.
Filebeat is the tool on the Wazuh server that securely forwards alerts and archived events to Elasticsearch.
While Filebeat can be installed from sources (see this doc), the process is more complex than you may like and it is beyond the scope of Wazuh documentation. We recommend installing Filebeat via repository package.
Once you have installed the manager, API and Filebeat (only needed for distributed architectures), you are ready to install Elastic Stack.