Zabbix-server Service-side installation
Install Zabbix official source and Epel source
RPM-IVH http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
RPM-IVH http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
Installing Zabbix-server
Yum install-y Zabbix zabbix-get zabbix-server zabbix-web-mysql zabbix-web zabbix-agent
Install MySQL Data path service
Yum Install-y mysql-server
To modify the MySQL configuration file:
Vim/etc/my.cnf
[mysqld]datadir=/var/lib/mysqlsocket=/var/lib/mysql/mysql.sockuser=mysql# disabling Symbolic-links is recommended To prevent assorted security Riskssymbolic-links=0character-set-server=utf8 #设置字符集为utf -8innodb_file_per_table=1 #让innodb的每个表文件单独存储 [Mysqld_safe]log-error=/var/log/mysqld.logpid-file=/var/run/mysqld/mysqld.pid
Start the service
Chkconfig mysqld on
Service mysqld Start
To see if the service started successfully
PS aux |grep MySQL
1. Create a Zabbix database
Set the root user password for MySQL
Mysqladmin-uroot Password Adminmysql-uroot-padmincreate database Zabbix character Set utf8;grant all privileges on Zabb ix.* to [e-mail protected] identified by ' Zabbix '; flush privileges;
2, import the Zabbix-server database
Mysql-uzabbix-pzabbix
Use Zabbix
Source/usr/share/doc/zabbix-server-mysql-2.2.8/create/schema.sql;
Show tables;
Configure zabbix_server.conf
Vim/etc/zabbix/zabbix_server.conf
logfile=/var/log/zabbix/zabbix_server.loglogfilesize=0pidfile=/var/run/zabbix/zabbix_server.piddbhost= localhostdbname=zabbixdbuser=zabbixdbpassword=zabbixdbsocket=/var/lib/mysql/mysql.sockstartpollers= 5snmptrapperfile=/var/log/snmptt/snmptt.logcachesize=256malertscriptspath=/usr/lib/zabbix/ Alertscriptsexternalscripts=/usr/lib/zabbix/externalscripts
View the modified parameters
Egrep-v "(^#|^$)"/etc/zabbix/zabbix_server.conf
Mkdir/etc/zabbix/alertscripts/etc/zabbix/externalscripts
Start the Zabbix-server service
Service Zabbix-server Start
Service httpd Start
Add Boot entry
Chkconfig Zabbix-server on
Chkconfig httpd on
Settings for firewall, SELinux, and permissions
1, the firewall settings
Vim/etc/sysconfig/iptables
-A input-m state--state new-m tcp-p TCP--dport 22-j accept-a input-m State--state new-m tcp-p TCP--dport 80-j ACCEPT-A INPUT -m state --state NEW -m tcp -p tcp --dport 10051 -j ACCEPT-A OUTPUT -m state --state NEW -m tcp -p tcp --dp ORT 10050-j accept#-a input-m State--state new-m tcp-p TCP--sport 10050-j ACCEPT
Service Iptables Restart
2. Turn off SELinux
Setenforce 0
Getenforce #获取当前Selinux的运行状态
or directly close selinux:
Vim/etc/selinux/config
Selinux=disabled (This method needs to restart the server to take effect)
3, php.ini configuration file Settings
Vim/etc/httpd/conf.d/zabbix.conf
Php_value date:timezone asia/shanghaiphp_value max_execution_time 300php_value memory_limit 128Mphp_value post_max_ Size 16mphp_value upload_max_filesize 2mphp_value max_input_time 300
Service httpd Restart
Configure the Web interface
Http://192.168.0.136/zabbix
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5B/3A/wKioL1UCq3Pj3MOdAAKTF4hfBs4459.jpg "style=" float: none; "title=" 1.png "alt=" Wkiol1ucq3pj3modaaktf4hfbs4459.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5B/3F/wKiom1UCqlPAfzUgAAMSgXVbCsI978.jpg "style=" float: none; "title=" 2.jpg "alt=" Wkiom1ucqlpafzugaamsgxvbcsi978.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5B/3A/wKioL1UCq3aTXFgMAAKxwRnva5Y098.jpg "style=" float: none; "title=" 3.jpg "alt=" Wkiol1ucq3atxfgmaakxwrnva5y098.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5B/3F/wKiom1UCqlXyzrCBAAKJQGd9jIo587.jpg "style=" float: none; "title=" 4.png "alt=" Wkiom1ucqlxyzrcbaakjqgd9jio587.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5B/3A/wKioL1UCq3nBoacCAAJZXsqcFRc477.jpg "style=" float: none; "title=" 5.jpg "alt=" Wkiol1ucq3nboaccaajzxsqcfrc477.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5B/3F/wKiom1UCqlnSKlEIAAKpCmF7CzA785.jpg "style=" float: none; "title=" 6.jpg "alt=" Wkiom1ucqlnskleiaakpcmf7cza785.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5B/3A/wKioL1UCq3yx2okUAAH9w4IgX7I379.jpg "style=" float: none; "title=" 7.jpg "alt=" Wkiol1ucq3yx2okuaah9w4igx7i379.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5B/3F/wKiom1UCqlzBuksxAAE9qFvDlls647.jpg "style=" float: none; "title=" 9.jpg "alt=" Wkiom1ucqlzbuksxaae9qfvdlls647.jpg "/>
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5B/3A/wKioL1UCq4TTP1nUAAW0muhMVqM198.jpg "style=" float: none; "title=" 10.jpg "alt=" Wkiol1ucq4ttp1nuaaw0muhmvqm198.jpg "/>
Zabbix-agent Client Installation
Install Zabbix official source
RPM-IVH http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/zabbix-release-2.2-1.el6.noarch.rpm
Installing the Zabbix-agent Client
Yum install-y Zabbix zabbix-agent
Shutting down the firewall
Iptables-f
Configure zabbix_agentd.conf
Egrep-v "(^#|^$)"/etc/zabbix/zabbix_agentd.conf
Pidfile=/var/run/zabbix/zabbix_agentd.pidlogfile=/var/log/zabbix/zabbix_agentd.loglogfilesize=0server= 127.0.0.1,192.168.0.136serveractive=192.168.0.136:10051hostname=zabbix Serverinclude=/etc/zabbix/zabbix_ agentd.d/
Chkconfig zabbix-agent on
Service Zabbix-agent Start
Zabbix Installation Deployment