Installing the Wazuh indexer using the assisted installation method
Install and configure the Wazuh indexer as a single-node or multi-node cluster on a 64-bit (x86_64/AMD64 or AARCH64/ARM64) architecture using the assisted installation method. The Wazuh indexer is a highly scalable full-text search engine. It offers advanced security, alerting, index management, deep performance analysis, and several other features.
Wazuh indexer cluster installation
The installation process is divided into three stages.
Initial configuration
Wazuh indexer nodes installation
Cluster initialization
Note
You need root user privileges to run all the commands described below.
Initial configuration
Follow these steps to configure your Wazuh deployment, create SSL certificates to encrypt communications between the Wazuh components, and generate random passwords to secure your installation.
Download the Wazuh installation assistant and the configuration file.
# curl -sO https://packages.wazuh.com/4.13/wazuh-install.sh # curl -sO https://packages.wazuh.com/4.13/config.yml
Edit
./config.yml
and replace the node names and IP values with the corresponding names and IP addresses. You need to do this for all Wazuh server, Wazuh indexer, and Wazuh dashboard nodes. Add as many node fields as needed.nodes: # Wazuh indexer nodes indexer: - name: node-1 ip: "<indexer-node-ip>" #- name: node-2 # ip: "<indexer-node-ip>" #- name: node-3 # ip: "<indexer-node-ip>" # Wazuh server nodes # If there is more than one Wazuh server # node, each one must have a node_type server: - name: wazuh-1 ip: "<wazuh-manager-ip>" # node_type: master #- name: wazuh-2 # ip: "<wazuh-manager-ip>" # node_type: worker #- name: wazuh-3 # ip: "<wazuh-manager-ip>" # node_type: worker # Wazuh dashboard nodes dashboard: - name: dashboard ip: "<dashboard-node-ip>"
Run the Wazuh installation assistant with the option
--generate-config-files
to generate the Wazuh cluster key, certificates, and passwords necessary for installation. You can find these files in./wazuh-install-files.tar
.# bash wazuh-install.sh --generate-config-files
Copy the
wazuh-install-files.tar
file to all the servers of the distributed deployment, including the Wazuh server, the Wazuh indexer, and the Wazuh dashboard nodes. This can be done by using thescp
utility.
Wazuh indexer node installation
Follow these steps to install and configure a single-node or multi-node Wazuh indexer.
Download the Wazuh installation assistant. Skip this step if you performed the initial configuration on the same server and the Wazuh installation assistant is already in your working directory:
# curl -sO https://packages.wazuh.com/4.13/wazuh-install.sh
Run the Wazuh installation assistant with the option
--wazuh-indexer
and the node name to install and configure the Wazuh indexer. The node name must be the same one used inconfig.yml
for the initial configuration, for example,node-1
.Note
Make sure that a copy of
wazuh-install-files.tar
, created during the initial configuration step, is placed in your working directory.# bash wazuh-install.sh --wazuh-indexer node-1
Repeat this stage of the installation process for every Wazuh indexer node in your cluster. Then proceed with initializing your single-node or multi-node cluster in the next stage.
Note
For Wazuh indexer installation on hardened endpoints with noexec
flag on the /tmp
directory, additional setup is required. See the Wazuh indexer configuration on hardened endpoints section for necessary configuration.
Cluster initialization
The final stage of installing the Wazuh indexer single-node or multi-node cluster consists of running the security admin script.
Run the Wazuh installation assistant with option
--start-cluster
on any Wazuh indexer node to load the new certificates information and start the cluster.# bash wazuh-install.sh --start-cluster
Note
You only have to initialize the cluster once, there is no need to run this command on every node.
Testing the cluster installation
Verify that the Wazuh indexer installed correctly and the Wazuh indexer cluster is functioning as expected by following the steps below.
Run the following command to get the admin password:
# tar -axf wazuh-install-files.tar wazuh-install-files/wazuh-passwords.txt -O | grep -P "\'admin\'" -A 1
Run the following command to confirm that the installation is successful. Replace
<WAZUH_INDEXER_IP_ADDRESS>
with the IP address of the Wazuh indexer and use the password gotten from the output of the previous command:# curl -k -u admin https://<WAZUH_INDEXER_IP_ADDRESS>:9200
{ "name" : "node-1", "cluster_name" : "wazuh-cluster", "cluster_uuid" : "095jEW-oRJSFKLz5wmo5PA", "version" : { "number" : "7.10.2", "build_type" : "rpm", "build_hash" : "db90a415ff2fd428b4f7b3f800a51dc229287cb4", "build_date" : "2023-06-03T06:24:25.112415503Z", "build_snapshot" : false, "lucene_version" : "9.6.0", "minimum_wire_compatibility_version" : "7.10.0", "minimum_index_compatibility_version" : "7.0.0" }, "tagline" : "The OpenSearch Project: https://opensearch.org/" }
Run the following command to check if the cluster is working correctly. Replace
<WAZUH_INDEXER_IP_ADDRESS>
with the IP address of the Wazuh indexer and enter the password for the Wazuh indexeradmin
user when it prompts for password:# curl -k -u admin https://<WAZUH_INDEXER_IP_ADDRESS>:9200/_cat/nodes?v
The command output should be similar to the following:
ip heap.percent ram.percent cpu load_1m load_5m load_15m node.role node.roles cluster_manager name 192.168.107.240 19 94 4 0.22 0.21 0.20 dimr data,ingest,master,remote_cluster_client * node-1
Disable Wazuh updates
We recommend disabling the Wazuh package repositories after installing all components on this server to prevent accidental upgrades.
Execute the following command only after completing all installations:
# sed -i "s/^deb /#deb /" /etc/apt/sources.list.d/wazuh.list
# apt update
# sed -i "s/^enabled=1/enabled=0/" /etc/yum.repos.d/wazuh.repo
# sed -i "s/^enabled=1/enabled=0/" /etc/yum.repos.d/wazuh.repo
Next steps
The Wazuh indexer is now successfully installed, and you can proceed with installing the Wazuh server. To perform this action, see the Installing the Wazuh server using the assisted installation method section.