2.3.1 Centos 7安装
最后更新于
最后更新于
centos7系统的代理端IP地址为:192.168.1.101。接下来静态IP的设置的方法就不一一述说,参照wazuh管理端的centos7和Ubuntu18.04操作系统将相应的IP地址进行修改,重启网络服务。
添加wazuh yum安装仓库
# rpm --import https://packages.wazuh.com/key/GPG-KEY-WAZUH
# cat > /etc/yum.repos.d/wazuh.repo << EOF
[wazuh]
gpgcheck=1
gpgkey=https://packages.wazuh.com/key/GPG-KEY-WAZUH
enabled=1
name=EL-$releasever - Wazuh
baseurl=https://packages.wazuh.com/4.x/yum/
protect=1
EOF
使用yum命令安装wazuh代理端。
或者使用如下直链进行下载到本地安装。
https://packages.wazuh.com/4.x/yum/wazuh-agent-4.1.5-1.x86_64.rpm
rpm包安装
[root@wazuh-centos-agent opt]# rpm -ivh wazuh-agent-4.1.5-1.x86_64.rpm
Preparing... ################################# [100%]
Updating / installing...
1:wazuh-agent-4.1.5-1 ################################# [100%]
设置服务自启动和服务启动
[root@wazuh-centos-agent opt]# systemctl enable wazuh-agent
Created symlink from /etc/systemd/system/multi-user.target.wants/wazuh-agent.service to /usr/lib/systemd/system/wazuh-agent.service.
[root@wazuh-centos-agent opt]# systemctl start wazuh-agent
Job for wazuh-agent.service failed because the control process exited with error code. See "systemctl status wazuh-agent.service" and "journalctl -xe" for details.
发现了代理端启动错误,查看错误信息( Invalid server address found: 'MANAGER_IP'),解决这个错误只需**设置管理端IP地址,**后面章节再说明,现在暂时放下错误。
[root@wazuh-centos-agent opt]# systemctl status wazuh-agent
● wazuh-agent.service - Wazuh agent
Loaded: loaded (/usr/lib/systemd/system/wazuh-agent.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Fri 2021-06-25 10:35:19 EDT; 19s ago
Process: 3065 ExecStart=/usr/bin/env ${DIRECTORY}/bin/ossec-control start (code=exited, status=1/FAILURE)
Jun 25 10:35:19 wazuh-centos-agent systemd[1]: Starting Wazuh agent...
Jun 25 10:35:19 wazuh-centos-agent env[3065]: 2021/06/25 10:35:19 ossec-agentd: ERROR: (4112): Invalid server address found: 'MANAGER_IP'
Jun 25 10:35:19 wazuh-centos-agent env[3065]: 2021/06/25 10:35:19 ossec-agentd: CRITICAL: (1215): No client configured. Exiting.
Jun 25 10:35:19 wazuh-centos-agent env[3065]: ossec-agentd: Configuration error. Exiting
Jun 25 10:35:19 wazuh-centos-agent systemd[1]: wazuh-agent.service: control process exited, code=exited status=1
Jun 25 10:35:19 wazuh-centos-agent systemd[1]: Failed to start Wazuh agent.
Jun 25 10:35:19 wazuh-centos-agent systemd[1]: Unit wazuh-agent.service entered failed state.
Jun 25 10:35:19 wazuh-centos-agent systemd[1]: wazuh-agent.service failed.