{"id":803,"date":"2018-10-18T13:51:36","date_gmt":"2018-10-18T13:51:36","guid":{"rendered":"https:\/\/www.nicktailor.com\/?p=803"},"modified":"2018-10-18T14:37:55","modified_gmt":"2018-10-18T14:37:55","slug":"how-to-deploy-wazuh","status":"publish","type":"post","link":"https:\/\/nicktailor.com\/tech-blog\/how-to-deploy-wazuh\/","title":{"rendered":"How to deploy Wazuh"},"content":{"rendered":"<p><span style=\"text-decoration: underline;\"><strong>Adding the Wazuh repository<\/strong><\/span><\/p>\n<p>The first step to setting up Wazuh is to add the Wazuh repository to your server. If you want to download the wazuh-manager package directly, or check the compatible versions, click\u00a0<a href=\"https:\/\/documentation.wazuh.com\/current\/installation-guide\/packages-list\/index.html#packages\">here<\/a>.<\/p>\n<p>To set up the repository, run this command:<\/p>\n<p># cat &gt; \/etc\/yum.repos.d\/wazuh.repo &lt;&lt;\\EOF<\/p>\n<p>[wazuh_repo]<br \/>\ngpgcheck=1<br \/>\ngpgkey=https:\/\/packages.wazuh.com\/key\/GPG-KEY-WAZUH<br \/>\nenabled=1<br \/>\nname=Wazuh repository<br \/>\nbaseurl=https:\/\/packages.wazuh.com\/3.x\/yum\/<br \/>\nprotect=1<br \/>\nEOF<\/p>\n<p>For CentOS-5 and RHEL-5:<\/p>\n<p># cat &gt; \/etc\/yum.repos.d\/wazuh.repo &lt;&lt;\\EOF<\/p>\n<p>[wazuh_repo]<br \/>\ngpgcheck=1<br \/>\ngpgkey=http:\/\/packages.wazuh.com\/key\/GPG-KEY-WAZUH-5<br \/>\nenabled=1<br \/>\nname=Wazuh repository<br \/>\nbaseurl=http:\/\/packages.wazuh.com\/3.x\/yum\/5\/$basearch\/<br \/>\nprotect=1<br \/>\nEOF<\/p>\n<p>Installing the Wazuh Manager<\/p>\n<p>The next step is to install the Wazuh Manager on your system:<\/p>\n<p># yum install wazuh-manager<\/p>\n<p>Once the process is complete, you can check the service status with:<\/p>\n<ol>\n<li>For Systemd:<\/li>\n<\/ol>\n<p># systemctl status wazuh-manager<\/p>\n<ol>\n<li>For SysV Init:<\/li>\n<\/ol>\n<p># service wazuh-manager status<\/p>\n<p>Installing the Wazuh API<\/p>\n<ol>\n<li>NodeJS &gt;= 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 that you add the official NodeJS repository like this:<\/li>\n<\/ol>\n<p># curl &#8211;silent &#8211;location https:\/\/rpm.nodesource.com\/setup_8.x | bash &#8211;<\/p>\n<p>and then, install NodeJS:<\/p>\n<p># yum install nodejs<\/p>\n<ol start=\"2\">\n<li>Python &gt;= 2.7 is required in order to run the Wazuh API. It is installed by default or included in the official repositories in most Linux distributions.<\/li>\n<\/ol>\n<p>To determine if the python version on your system is lower than 2.7, you can run the following:<\/p>\n<p># python &#8211;version<\/p>\n<p>&nbsp;<\/p>\n<p>It is possible to set a custom Python path for the API in &#8220;\/var\/ossec\/api\/configuration\/config.js&#8220;, in case the stock version of Python in your distro is too old:<\/p>\n<p>config.python <strong>=<\/strong> [<\/p>\n<p><em>\/\/ Default installation<\/em><\/p>\n<p>{<\/p>\n<p>bin<strong>:<\/strong> &#8220;python&#8221;,<\/p>\n<p>lib<strong>:<\/strong> &#8220;&#8221;<\/p>\n<p>},<\/p>\n<p><em>\/\/ Package &#8216;python27&#8217; for CentOS 6<\/em><\/p>\n<p>{<\/p>\n<p>bin<strong>:<\/strong> &#8220;\/opt\/rh\/python27\/root\/usr\/bin\/python&#8221;,<\/p>\n<p>lib<strong>:<\/strong> &#8220;\/opt\/rh\/python27\/root\/usr\/lib64&#8221;<\/p>\n<p>}<\/p>\n<p>];<\/p>\n<p>CentOS 6 and Red Hat 6 come with Python 2.6, however, you can install Python 2.7 in parallel to maintain the older version(s):<\/p>\n<ol>\n<li>For CentOS 6:<\/li>\n<\/ol>\n<p><em><strong># yum install -y centos-release-scl<\/strong><\/em><\/p>\n<p><em><strong># yum install -y python27<\/strong><\/em><\/p>\n<ol>\n<li>For RHEL 6:<\/li>\n<\/ol>\n<p><em><strong># yum install python27<\/strong><\/em><\/p>\n<p>&nbsp;<\/p>\n<p>You may need to first enable a repository in order to get python27, with a command like this:<\/p>\n<p>#\u00a0\u00a0<em><strong> yum-config-manager &#8211;enable rhui-REGION-rhel-server-rhscl<\/strong><\/em><\/p>\n<p>#\u00a0\u00a0 <strong><em>yum-config-manager &#8211;enable rhel-server-rhscl-6-rpms<\/em><\/strong><\/p>\n<ol start=\"3\">\n<li>Install the Wazuh API. It will update NodeJS if it is required:<\/li>\n<\/ol>\n<p># <em><strong>yum install wazuh-api<\/strong><\/em><\/p>\n<ol start=\"4\">\n<li>Once the process is complete, you can check the service status with:<\/li>\n<\/ol>\n<ol>\n<li>For Systemd:<\/li>\n<\/ol>\n<p>#<em><strong> systemctl status wazuh-api<\/strong><\/em><\/p>\n<ol>\n<li>For SysV Init:<\/li>\n<\/ol>\n<p># service wazuh-api status<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Installing Filebeat<\/strong><\/span><\/p>\n<p>Filebeat is the tool on the Wazuh server that securely forwards alerts and archived events to the Logstash service on the Elastic Stack server(s).<\/p>\n<p><strong>Warning<\/strong><\/p>\n<p>In a single-host architecture (where Wazuh server and Elastic Stack are installed in the same system), the installation of Filebeat is not needed since Logstash will be able to read the event\/alert data directly from the local filesystem without the assistance of a forwarder.<\/p>\n<p>The RPM package is suitable for installation on Red Hat, CentOS and other modern RPM-based systems.<\/p>\n<ol>\n<li>Install the GPG keys from Elastic and then the Elastic repository:<\/li>\n<\/ol>\n<p># rpm &#8211;import https:\/\/packages.elastic.co\/GPG-KEY-elasticsearch<\/p>\n<p>&nbsp;<\/p>\n<p># cat &gt; \/etc\/yum.repos.d\/elastic.repo &lt;&lt; EOF<\/p>\n<p>[elasticsearch-6.x]<br \/>\nname=Elasticsearch repository for 6.x packages<br \/>\nbaseurl=https:\/\/artifacts.elastic.co\/packages\/6.x\/yum<br \/>\ngpgcheck=1<br \/>\ngpgkey=https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearch<br \/>\nenabled=1<br \/>\nautorefresh=1<br \/>\ntype=rpm-md<br \/>\nEOF<\/p>\n<ol start=\"2\">\n<li>Install Filebeat <strong>Note: If you are doing an all in one setup do not install filebeat<\/strong><\/li>\n<\/ol>\n<p><em><strong># yum install filebeat-6.4.2<\/strong><\/em><\/p>\n<ol start=\"3\">\n<li>Download the Filebeat configuration file from the Wazuh repository. This is pre-configured to forward Wazuh alerts to Logstash:<\/li>\n<\/ol>\n<p># curl -so \/etc\/filebeat\/filebeat.yml https:\/\/raw.githubusercontent.com\/wazuh\/wazuh\/3.6\/extensions\/filebeat\/filebeat.yml<\/p>\n<ol start=\"4\">\n<li>Edit the file\u00a0\/etc\/filebeat\/filebeat.ymland replace\u00a0ELASTIC_SERVER_IP\u00a0with the IP address or the hostname of the Elastic Stack server. For example:<\/li>\n<\/ol>\n<p>output:<\/p>\n<p>logstash:<\/p>\n<p>hosts: [&#8220;ELASTIC_SERVER_IP:5000&#8221;]<\/p>\n<ol start=\"5\">\n<li>Enable and start the Filebeat service:<\/li>\n<\/ol>\n<ol>\n<li>For Systemd:<\/li>\n<\/ol>\n<p><em><strong># systemctl daemon-reload<\/strong><\/em><\/p>\n<p><em><strong># systemctl enable filebeat.service<\/strong><\/em><\/p>\n<p><em><strong># systemctl start filebeat.service<\/strong><\/em><\/p>\n<ol>\n<li>For SysV Init:<\/li>\n<\/ol>\n<p><em><strong># chkconfig &#8211;add filebeat<\/strong><\/em><\/p>\n<p><em><strong># service filebeat start<\/strong><\/em><\/p>\n<p>Next steps<\/p>\n<p>Once you have installed the manager, API and Filebeat (only needed for distributed architectures), you are ready to install<\/p>\n<p><strong><u>\u00a0<\/u><\/strong><\/p>\n<h1><strong>Installing Elastic Stack<\/strong><\/h1>\n<p>This guide describes the installation of an Elastic Stack server comprised of Logstash, Elasticsearch, and Kibana. We will illustrate package-based installations of these components. You can also install them from binary tarballs, however, this is not preferred or supported under Wazuh documentation.<\/p>\n<p>In addition to Elastic Stack components, you will also find the instructions to install and configure the Wazuh app (deployed as a Kibana plugin).<\/p>\n<p>Depending on your operating system you can choose to install Elastic Stack from RPM or DEB packages. Consult the table below and choose how to proceed:<\/p>\n<h1><strong>Install Elastic Stack with RPM packages<\/strong><\/h1>\n<p>The RPM packages are suitable for installation on Red Hat, CentOS and other RPM-based systems.<\/p>\n<p><strong>Note<\/strong><\/p>\n<p>Many of the commands described below need to be executed with root user privileges.<\/p>\n<h2>Preparation<\/h2>\n<ol>\n<li>Oracle Java JRE 8 is required by Logstash and Elasticsearch.<\/li>\n<\/ol>\n<p><strong>Note<\/strong><\/p>\n<p>The following command accepts the necessary cookies to download Oracle Java JRE. Please, visit\u00a0<a href=\"https:\/\/www.java.com\/en\/download\/manual.jsp\">Oracle Java 8 JRE Download Page<\/a>\u00a0for more information.<\/p>\n<p># curl -Lo jre-8-linux-x64.rpm &#8211;header &#8220;Cookie: oraclelicense=accept-securebackup-cookie&#8221; &#8220;https:\/\/download.oracle.com\/otn-pub\/java\/jdk\/8u191-b12\/2787e4a523244c269598db4e85c51e0c\/jre-8u191-linux-x64.rpm&#8221;<\/p>\n<p>Now, check if the package was download successfully:<\/p>\n<p># rpm -qlp jre-8-linux-x64.rpm &gt; \/dev\/null 2&gt;&amp;1 <strong>&amp;&amp;<\/strong> echo &#8220;Java package downloaded successfully&#8221; <strong>||<\/strong> echo &#8220;Java package did not download successfully&#8221;<\/p>\n<p>Finally, install the RPM package using yum:<\/p>\n<p># yum -y install jre-8-linux-x64.rpm# rm -f jre-8-linux-x64.rpm<\/p>\n<ol start=\"2\">\n<li>Install the Elastic repository and its GPG key:<\/li>\n<\/ol>\n<p># rpm &#8211;import https:\/\/packages.elastic.co\/GPG-KEY-elasticsearch\u00a0# cat &gt; \/etc\/yum.repos.d\/elastic.repo &lt;&lt; EOF[elasticsearch-6.x]name=Elasticsearch repository for 6.x packagesbaseurl=https:\/\/artifacts.elastic.co\/packages\/6.x\/yumgpgcheck=1gpgkey=https:\/\/artifacts.elastic.co\/GPG-KEY-elasticsearchenabled=1autorefresh=1type=rpm-mdEOF<\/p>\n<h2>Elasticsearch<\/h2>\n<p>Elasticsearch is a highly scalable full-text search and analytics engine. For more information, please see\u00a0<a href=\"https:\/\/www.elastic.co\/products\/elasticsearch\">Elasticsearch<\/a>.<\/p>\n<ol>\n<li>Install the Elasticsearch package:<\/li>\n<\/ol>\n<p># yum install elasticsearch-6.4.2<\/p>\n<ol start=\"2\">\n<li>Enable and start the Elasticsearch service:<\/li>\n<li>For Systemd:<\/li>\n<\/ol>\n<p># systemctl daemon-reload# systemctl enable elasticsearch.service# systemctl start elasticsearch.service<\/p>\n<ol>\n<li>For SysV Init:<\/li>\n<\/ol>\n<p># chkconfig &#8211;add elasticsearch# service elasticsearch start<\/p>\n<p>It\u2019s important to wait until the Elasticsearch server finishes starting. Check the current status with the following command, which should give you a response like the shown below:<\/p>\n<p># curl &#8220;localhost:9200\/?pretty&#8221;\u00a0{\u00a0 &#8220;name&#8221; : &#8220;Zr2Shu_&#8221;,\u00a0 &#8220;cluster_name&#8221; : &#8220;elasticsearch&#8221;,\u00a0 &#8220;cluster_uuid&#8221; : &#8220;M-W_RznZRA-CXykh_oJsCQ&#8221;,\u00a0 &#8220;version&#8221; : {\u00a0\u00a0\u00a0 &#8220;number&#8221; : &#8220;6.4.2&#8221;,\u00a0\u00a0\u00a0 &#8220;build_flavor&#8221; : &#8220;default&#8221;,\u00a0\u00a0\u00a0 &#8220;build_type&#8221; : &#8220;rpm&#8221;,\u00a0\u00a0\u00a0 &#8220;build_hash&#8221; : &#8220;053779d&#8221;,\u00a0\u00a0\u00a0 &#8220;build_date&#8221; : &#8220;2018-07-20T05:20:23.451332Z&#8221;,\u00a0\u00a0\u00a0 &#8220;build_snapshot&#8221; : false,\u00a0\u00a0\u00a0 &#8220;lucene_version&#8221; : &#8220;7.3.1&#8221;,\u00a0\u00a0\u00a0 &#8220;minimum_wire_compatibility_version&#8221; : &#8220;5.6.0&#8221;,\u00a0\u00a0\u00a0 &#8220;minimum_index_compatibility_version&#8221; : &#8220;5.0.0&#8221;\u00a0 },\u00a0 &#8220;tagline&#8221; : &#8220;You Know, for Search&#8221;}<\/p>\n<ol start=\"3\">\n<li>Load the Wazuh template for Elasticsearch:<\/li>\n<\/ol>\n<p># curl https:\/\/raw.githubusercontent.com\/wazuh\/wazuh\/3.6\/extensions\/elasticsearch\/wazuh-elastic6-template-alerts.json | curl -XPUT &#8216;http:\/\/localhost:9200\/_template\/wazuh&#8217; -H &#8216;Content-Type: application\/json&#8217; -d @-<\/p>\n<p><strong>Note<\/strong><\/p>\n<p>It is recommended that the default configuration be edited to improve the performance of Elasticsearch. To do so, please see\u00a0<a href=\"https:\/\/documentation.wazuh.com\/current\/installation-guide\/optional-configurations\/elastic-tuning.html#elastic-tuning\">Elasticsearch tuning<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<p>Logstash<\/p>\n<p>Logstash is the tool that collects, parses, and forwards data to Elasticsearch for indexing and storage of all logs generated by the Wazuh server. For more information, please see\u00a0<a href=\"https:\/\/www.elastic.co\/products\/logstash\">Logstash<\/a>.<\/p>\n<ol>\n<li>Install the Logstash package:<\/li>\n<\/ol>\n<p># yum install logstash-6.4.2<\/p>\n<ol start=\"2\">\n<li>Download the Wazuh configuration file for Logstash:<\/li>\n<\/ol>\n<ul>\n<li><strong>Local<\/strong>\u00a0configuration (only in a\u00a0<strong>single-host architecture<\/strong>):<\/li>\n<\/ul>\n<ul>\n<li># curl -so \/etc\/logstash\/conf.d\/01-wazuh.conf https:\/\/raw.githubusercontent.com\/wazuh\/wazuh\/3.6\/extensions\/logstash\/01-wazuh-local.conf<\/li>\n<\/ul>\n<p>Because the Logstash user needs to read the alerts.json file, please add it to OSSEC group by running:<\/p>\n<p># usermod -a -G ossec logstash<\/p>\n<ul>\n<li><strong>Remote<\/strong>\u00a0configuration (only in a\u00a0<strong>distributed architecture<\/strong>):<\/li>\n<\/ul>\n<ul>\n<li># curl -so \/etc\/logstash\/conf.d\/01-wazuh.conf https:\/\/raw.githubusercontent.com\/wazuh\/wazuh\/3.6\/extensions\/logstash\/01-wazuh-remote.conf<\/li>\n<\/ul>\n<p><strong>Note<\/strong><\/p>\n<p>Follow the next steps if you use CentOS-6\/RHEL-6 or Amazon AMI (logstash uses Upstart like a service manager and needs to be fixed, see\u00a0<a href=\"https:\/\/bugs.launchpad.net\/upstart\/+bug\/812870\/\">this bug<\/a>):<\/p>\n<ol>\n<li>Edit the file \/etc\/logstash\/startup.options changing line 30 from\u00a0<em>LS_GROUP=logstash<\/em>to\u00a0<em>LS_GROUP=ossec<\/em>.<\/li>\n<li>Update the service with the new parameters by running the command \/usr\/share\/logstash\/bin\/system-install<\/li>\n<li>Restart Logstash.<\/li>\n<li>Enable and start the Logstash service:<\/li>\n<\/ol>\n<ol>\n<li>For Systemd:<\/li>\n<\/ol>\n<p># systemctl daemon-reload<\/p>\n<p># systemctl enable logstash.service<\/p>\n<p># systemctl start logstash.service<\/p>\n<ol>\n<li>For SysV Init:<\/li>\n<\/ol>\n<p># chkconfig &#8211;add logstash<\/p>\n<p># service logstash start<\/p>\n<p><strong>Note<\/strong><\/p>\n<p>If you are running the Wazuh server and the Elastic Stack server on separate systems (<strong>distributed architecture<\/strong>), it is important to configure encryption between Filebeat and Logstash. To do so, please see\u00a0<a href=\"https:\/\/documentation.wazuh.com\/current\/installation-guide\/optional-configurations\/elastic_ssl.html#elastic-ssl\">Setting up SSL for Filebeat and Logstash<\/a>.<\/p>\n<p>Kibana<\/p>\n<p>Kibana is a flexible and intuitive web interface for mining and visualizing the events and archives stored in Elasticsearch. Find more information at\u00a0<a href=\"https:\/\/www.elastic.co\/products\/kibana\">Kibana<\/a>.<\/p>\n<ol>\n<li>Install the Kibana package:<\/li>\n<\/ol>\n<p># yum install kibana-6.4.2<\/p>\n<ol start=\"2\">\n<li>Install the Wazuh app plugin for Kibana:<\/li>\n<\/ol>\n<ol>\n<li>Increase the default Node.js heap memory limit to prevent out of memory errors when installing the Wazuh app. Set the limit as follows:<\/li>\n<\/ol>\n<p># export NODE_OPTIONS<strong>=<\/strong>&#8220;&#8211;max-old-space-size=3072&#8221;<\/p>\n<ol>\n<li>Install the Wazuh app:<\/li>\n<\/ol>\n<p># sudo -u kibana \/usr\/share\/kibana\/bin\/kibana-plugin install https:\/\/packages.wazuh.com\/wazuhapp\/wazuhapp-3.6.1_6.4.2.zip<\/p>\n<p><strong>Warning<\/strong><\/p>\n<p>The Kibana plugin installation process may take several minutes. Please wait patiently.<\/p>\n<p><strong>Note<\/strong><\/p>\n<p>If you want to download a different Wazuh app plugin for another version of Wazuh or Elastic Stack, check the table available at\u00a0<a href=\"https:\/\/github.com\/wazuh\/wazuh-kibana-app#installation\">GitHub<\/a>\u00a0and use the appropriate installation command.<\/p>\n<ol start=\"3\">\n<li>Kibana will only listen on the loopback interface (localhost) by default. To set up Kibana to listen on all interfaces, edit the file\u00a0\/etc\/kibana\/kibana.yml\u00a0uncommenting the setting\u00a0server.host. Change the value to:<\/li>\n<\/ol>\n<p>server.host: &#8220;0.0.0.0&#8221;<\/p>\n<p><strong>Note<\/strong><\/p>\n<p>It is recommended that an Nginx proxy be set up for Kibana in order to use SSL encryption and to enable authentication. Instructions to set up the proxy can be found at\u00a0<a href=\"https:\/\/documentation.wazuh.com\/current\/installation-guide\/optional-configurations\/kibana_ssl.html#kibana-ssl\">Setting up SSL and authentication for Kibana<\/a>.<\/p>\n<ol start=\"4\">\n<li>Enable and start the Kibana service:<\/li>\n<\/ol>\n<ol>\n<li>For Systemd:<\/li>\n<\/ol>\n<p># systemctl daemon-reload<\/p>\n<p># systemctl enable kibana.service<\/p>\n<p># systemctl start kibana.service<\/p>\n<ol>\n<li>For SysV Init:<\/li>\n<\/ol>\n<p># chkconfig &#8211;add kibana<\/p>\n<p># service kibana start<\/p>\n<ol start=\"5\">\n<li>Disable the Elasticsearch repository:<\/li>\n<\/ol>\n<p>It is recommended that the Elasticsearch repository be disabled in order to prevent an upgrade to a newer Elastic Stack version due to the possibility of undoing changes with the App. To do this, use the following command:<\/p>\n<p># sed -i &#8220;s\/^enabled=1\/enabled=0\/&#8221; \/etc\/yum.repos.d\/elastic.repo<\/p>\n<p><span style=\"text-decoration: underline;\"><strong>Setup password for wazuh-manager<\/strong><\/span><\/p>\n<div class=\"document\" role=\"main\">\n<div>\n<div id=\"securing-the-wazuh-api\" class=\"section\">\n<h1>Securing the Wazuh API<\/h1>\n<p>By default, the communications between the Wazuh Kibana App and the Wazuh API are not encrypted. You should take the following actions to secure the Wazuh API.<\/p>\n<ol class=\"arabic simple\">\n<li>Change default credentials:<\/li>\n<\/ol>\n<blockquote>\n<div>\n<p>By default you can access by typing user \u201cfoo\u201d and password \u201cbar\u201d. We recommend you to generate new credentials. This can be done very easily, with the following steps:<\/p>\n<div class=\"highlight-bash\">\n<div class=\"highlight\">\n<pre>$ <span class=\"nb\">cd<\/span> \/var\/ossec\/api\/configuration\/auth\r\n$ sudo node htpasswd -c user myUserName\r\n<\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/blockquote>\n<ol class=\"arabic simple\" start=\"2\">\n<li>Enable HTTPS:<\/li>\n<\/ol>\n<blockquote>\n<div>In order to enable HTTPS you need to generate or provide a certificate. You can learn how to generate your own certificate or generate it automatically using the script\u00a0<code class=\"docutils literal\"><span class=\"pre\">\/var\/ossec\/api\/scripts\/configure_api.sh<\/span><\/code>.<\/div>\n<\/blockquote>\n<ol class=\"arabic simple\" start=\"3\">\n<li>Bind to localhost:<\/li>\n<\/ol>\n<blockquote>\n<div>In case you do not need to acces to the API externally, you should bind the API to\u00a0<code class=\"docutils literal\"><span class=\"pre\">localhost<\/span><\/code>\u00a0using the option\u00a0<code class=\"docutils literal\"><span class=\"pre\">config.host<\/span><\/code>\u00a0placed in the configuration file\u00a0<code class=\"docutils literal\"><span class=\"pre\">\/var\/ossec\/api\/configuration\/config.js<\/span><\/code>.<\/div>\n<\/blockquote>\n<\/div>\n<\/div>\n<\/div>\n<footer>\n<div class=\"rst-footer-buttons\" role=\"navigation\" aria-label=\"footer navigation\"><a accesskey=\"n\" class=\"btn btn-neutral float-right\" title=\"Elasticsearch tuning\" href=\"https:\/\/documentation.wazuh.com\/2.0\/installation-guide\/optional-configurations\/elastic-tuning.html\" rel=\"next\">Next\u00a0<\/a><a accesskey=\"p\" class=\"btn btn-neutral\" title=\"Setting up SSL and authentication for Kibana\" href=\"https:\/\/documentation.wazuh.com\/2.0\/installation-guide\/optional-configurations\/kibana_ssl.html\" rel=\"prev\">\u00a0Previous<\/a><\/div>\n<\/footer>\n<p>&nbsp;<\/p>\n<p><strong><u>\u00a0<\/u><\/strong><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Adding the Wazuh repository The first step to setting up Wazuh is to add the Wazuh repository to your server. If you want to download the wazuh-manager package directly, or check the compatible versions, click\u00a0here. To set up the repository, run this command: # cat &gt; \/etc\/yum.repos.d\/wazuh.repo &lt;&lt;\\EOF [wazuh_repo] gpgcheck=1 gpgkey=https:\/\/packages.wazuh.com\/key\/GPG-KEY-WAZUH enabled=1 name=Wazuh repository baseurl=https:\/\/packages.wazuh.com\/3.x\/yum\/ protect=1 EOF For CentOS-5 and<a href=\"https:\/\/nicktailor.com\/tech-blog\/how-to-deploy-wazuh\/\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55,56],"tags":[],"class_list":["post-803","post","type-post","status-publish","format-standard","hentry","category-elk","category-wazuh"],"_links":{"self":[{"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/posts\/803","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/comments?post=803"}],"version-history":[{"count":1,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/posts\/803\/revisions"}],"predecessor-version":[{"id":804,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/posts\/803\/revisions\/804"}],"wp:attachment":[{"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/media?parent=803"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/categories?post=803"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nicktailor.com\/tech-blog\/wp-json\/wp\/v2\/tags?post=803"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}