创建用户和密码useradd zabbixpassword zabbix
安装zabbixtar -zxvf zabbix-3.0.3.tar.gz
进入目录cd /usr/src
编译安装./configure --prefix=/usr/local/zabbix --enable-agent
make install
将zabbix目录权限赋予ubuntu用户chown -R zabbix.zabbix /usr/local/zabbix
编辑配置文件vi /usr/local/zabbix/etc/zabbix_agentd.configure
LogFile=/tmp/zabbix_agentd.logServer= 要添加客户端的ip地址ServerActive= 要添加客户端的ip地址Hostname= 你要添加客户端的主机名可以用hostname来看一下
启动zabbix agentsu - zabbix -c /usr/local/zabbix/sbin/zabbix_agentd
检查一下是否启动ps -ef | grep zabbixnestat -an | grep 10050
添加开机启动
pwd 1076 cp /usr/src/zabbix-3.0.3/misc/init.d/fedora/core/zabbix_agentd /etc/init.d/ 1077 cd /etc/init.d 1078 ls 1079 chmod a+x ./zabbix_agentd 1080 service zabbix_agentd status 1081 service zabbix_agentd stop 1082 service zabbix_agentd start 1084 ln /usr/local/zabbix/sbin/zabbix_agentd /usr/local/sbin/zabbix_agentd 这一部比较重要 1085 service zabbix_agentd start 1086 chkconfig zabbix_agentd on 1087 history
查看是否添加成功cat /etc/rc.local
转载于:https://www.cnblogs.com/LilL/p/6244778.html
