Label: Download Zabbix installation package (Zabbix installation package contains ZABBIX_AGENTD client installation package, we only select ZABBIX_AGENTD Client installation)
Zbbix Official website: http://www.zabbix.com/download
Client actions
Tips: Linux Software compilation installation requires two installation packages gcc gcc-c++ make can be installed online using the network yum-y install GCC gcc-c++ make.
1. Add user groups
[Email protected] ~]# groupadd Zabbix #创建zaggix用户组
[[email protected] ~]# useradd zabbix-g zabbix-s/sbin/nologin #创建zabbix用户, and restrict the Zabbix user login system,/sbin/nolo Gin disabled users cannot log on to the system
2, unzip the installation package, compile and install
[Email protected] ~]# Mkdir/usr/local/src/zabbix #创建存放zabbix安装的目录
[Email protected] ~]# cd/usr/local/src/zabbix/
[[email protected] zabbix]# ls
Zabbix-3.2.3.tar.gz
[Email protected] zabbix]# tar-zxvf zabbix-3.2.3.tar.gz #解压zabbix安装包
[[email protected] zabbix]# ls
zabbix-3.2.3 zabbix-3.2.3.tar.gz
[Email protected] zabbix]# CD zabbix-3.2.3
[Email protected] zabbix-3.2.3]# /configure--prefix=/usr/local/zabbix_agentd--enable-agent #编译zabbix安装包, the configuration parameter installs only the ZABBIX_AGENTD client
[[email protected] zabbix-3.2.3]# make install #安装zabbix
3. Modify the zabbix_agent.conf configuration file
[Email protected] etc]# cd/usr/local/zabbix_agentd/etc/ #进入zabbix_agentd安装路径
[Email protected] etc]# vim zabbix_agentd.conf #修改zabbix_agentd. conf configuration file
Enableremotecommands=1 #允许zabbix服务器远程zabbix_agentd执行命令
Logremotecommands=1 #开启远程执行命令日志
server=10.8.9.155 #填写zabbix服务器IP地址
serveractive=10.8.9.155 #填写zabbix服务器IP地址
hostname=cloucentos6.0 #填写zabbix_agentd客户端计算机名
: Wq #退出并保存
4. Add ZABBIX_AGENTD client boot from
[Email protected] ~]# cd/usr/local/src/zabbix/zabbix-3.2.3 #进入zabbix安装包文件夹
[Email protected] zabbix-3.2.3]# CP misc/init.d/fedora/core/zabbix_agentd /etc/init.d/zabbix_agentd #复制zabbix_agentd客户端启动文件到系统启动目录
[Email protected] zabbix-3.2.3]# chmod 755/etc/init.d/zabbix_agentd #赋予zabbix_agentd文件执行权限
[Email protected] zabbix-3.2.3]# chkconfig zabbix_agentd on #zabbix_agentd添加开机自启动
[Email protected] zabbix-3.2.3]# vim/etc/init.d/zabbix_agentd #修改zabbix_agentd启动文件
basedir=/usr/local/zabbix_agentd/ , &NB Sp , &NB Sp #填写zabbix_agentd安装路径
: Wq #退出并保存
5. Start ZABBIX_AGENTD Client
[[email protected] zabbix-3.2.3]# /etc/init.d/zabbix_agentd start
Service-side operations
1. Create a ZABBIX_AGENTD client host.
2, fill in the ZABBIX_AGENTD client host information.
3. Add the Zabbix_agentd client host template.
4. Check whether the ZABBIX_AGENTD client host is connected to the Zabbix server.
5. Add the ZABBIX_AGENTD client host to the topology map.
Special Operations
1, Zabbix is a normal user, so, no rights to execute the Linux system shutdown, reboot, Poweroff and other commands, there are two ways to solve:
method One : Set the Linux command so that Zabbix ordinary users can also perform the root owner equivalent of the privileges (Shutdown command is very special, ordinary users can not execute, need to use Method 2)
[Email protected] ~]# which reboot #查看reboot命令路径
/sbin/reboot
[Email protected] ~]# ls-l/sbin/reboot #查看reboot所有者
-rwxr-xr-x. 1 root root 16808 November 2010/sbin/reboot
[Email protected] ~]# chmod 4755/sbin/reboot #把reboot命令让其它用户执行文件时, with the same permissions as the owner.
[Email protected] ~]# ls-l/sbin/reboot
-rwsr-xr-x. 1 root root 16808 November 2010/sbin/reboot
method Two: pull the Zabbix user into the root user group.
[Email protected] ~]# groups Zabbix #查看zabbix用户所属用户组
Zabbix:zabbix
[[email protected] ~]# usermod-a-G root Zabbix #把zabbix用户拉进root用户组,-A does not have to leave the original user group
[Email protected] ~]# groups Zabbix #查看zabbix用户所属用户组
Zabbix:zabbix Root
ZABBIX_AGENTD Client Installation and configuration (Linux operating system)