Install Zabbix client under Linux __linux

Source: Internet
Author: User
Tags iptables

Installing the Infrastructure environment

# yum Install wget vim tree gcc gcc-c++-y

Install Client

# GROUPADD-G 201 Zabbix

#useradd-G zabbix-u 201-s/sbin/nologin Zabbix

#tar ZXF zabbix-2.4.7.tar.gz

#cd zabbix-2.4.7

#./configure--prefix=/usr/local/zabbix--enable-agent

Compiling the installation client

#make && make Install

Create a Zabbix log directory

#mkdir/var/log/zabbix

#chown Zabbix.zabbix/var/log/zabbix

Copy zabbix_agentd boot file to/etc/init.d directory

#cp misc/init.d/fedora/core/zabbix_agentd/etc/init.d/

#chmod 755/etc/init.d/zabbix_agentd

Release 10050 and 10051 ports in Iptables

#iptables-I input-p tcp-m multiport--dports 10050:10051-j ACCEPT

#service iptables Save

iptables:saving firewall rules to/etc/sysconfig/iptables:[OK]

View Iptables Results

#iptables-L-N

Chain INPUT (Policy ACCEPT)
Target Prot opt source destination
ACCEPT TCP--0.0.0.0/0 0.0.0.0/0 multiport dports 10,050:10,051
ACCEPT All--0.0.0.0/0 0.0.0.0/0 State related,established
ACCEPT ICMP--0.0.0.0/0 0.0.0.0/0
ACCEPT All--0.0.0.0/0 0.0.0.0/0
ACCEPT TCP--0.0.0.0/0 0.0.0.0/0 state NEW TCP dpt:22
REJECT All--0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain FORWARD (Policy ACCEPT)
Target Prot opt source destination
REJECT All--0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
Chain OUTPUT (Policy ACCEPT)
Target Prot opt source destination

modifying startup files and configuring soft connections

#sed-i "S@basedir=/usr/local@basedir=/usr/local/zabbix@g"/etc/init.d/zabbix_agentd

#ln-S/usr/local/zabbix/etc//etc/zabbix

#ln-S/usr/local/zabbix/bin/*/usr/bin

#ln-S/usr/local/zabbix/sbin/*/usr/sbin/

/etc/zabbix/zabbix_agentd.conf, the IP address here is written with the IP address of the zabbix_server end.

#sed-i "S@server=127.0.0.1@server=192.168.32.128@g"/etc/zabbix/zabbix_agentd.conf

#sed-i "S@serveractive=127.0.0.1@serveractive=192.168.32.128:10051@g"/etc/zabbix/zabbix_agentd.conf

#sed-i "S@tmp/zabbix_agentd.log@var/log/zabbix/zabbix_agentd.log@g"/etc/zabbix/zabbix_agentd.conf

#sed-i "s@^# unsafeuserparameters=0@unsafeuserparameters=1\n@g"/etc/zabbix/zabbix_agentd.conf

Set Zabbix_agentd to boot automatically and start Zabbix_agentd service

#chkconfig Zabbix_agentd on

#service Zabbix_agentd Start

Starting ZABBIX_AGENTD: [OK]

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.