Source Installation zabbix3.0.0

Source: Internet
Author: User
Tags fpm imap ini odbc pear php mysql snmp iptables

CentOS6.7
zabbix3.0.0


1, the basic package installation, using Yum installation
Yum-y install wget vim tree gcc gcc-c++ autoconf httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl MoD _auth_mysql php-gd php-xml php-mbstring php-ldap php-pear php-xmlrpc php-bcmath mysql-connector-odbc mysql-devel Libdbi-dbd-mysql Net-snmp Net-snmp-devel Curl-devel


2, start httpd, MySQL and set to boot automatically
# service httpd Start
# service Mysqld Start
# Chkconfig httpd on
# Chkconfig Mysqld on


3, release the 80,10050,10051 port in the Iptables
# iptables-i input-p tcp-m multiport--destination-port 80,10050:10051-j ACCEPT
View Firewall 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 80,10050:10051
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
Save Iptables Rules
# Service Iptables Save
iptables:saving firewall rules to/etc/sysconfig/iptables:[OK]


4. Configure PHP Parameters
The Zabbix operation requires specific PHP parameter support and is modified as follows
# sed-i "s@;d ate.timezone = @date. TimeZone = asia/shanghai@g"/etc/php.ini
# sed-i "S@max_execution_time = 30@max_execution_time = 300@g"/etc/php.ini
# sed-i "s@post_max_size = 8m@post_max_size = 32m@g"/etc/php.ini
# sed-i "S@max_input_time = 60@max_input_time = 300@g"/etc/php.ini
# sed-i "S@memory_limit = 128m@memory_limit = 128m@g"/etc/php.ini
# sed-i "s@;mbstring.func_overload = 0@ambstring.func_overload = 2@g"/etc/php.ini


5, modify the httpd FQDN error, restart the httpd service
# echo "ServerName localhost:80" >>/etc/httpd/conf/httpd.conf
#/etc/init.d/httpd Restart
stopping httpd: [OK]
Starting httpd: [OK]


6. Download zabbix-3.0.0.tar.gz
Download Address http://www.zabbix.com/download.php


7. Add Zabbix Users and Groups
# GROUPADD-G 201 Zabbix
# useradd-g zabbix-u 201-s/sbin/nologin Zabbix


8, install Zabbix-server end
# Tar XF zabbix-3.0.0.tar.gz
# CD zabbix-3.0.0
#./configure--prefix=/usr/local/zabbix--enable-server--enable-proxy--enable-agent--with-mysql=/usr/bin/mysql_ Config--with-net-snmp--with-libcurl
# Make && make install


9. Create Zabbix database and related tables
# mysql-e "CREATE database Zabbix default CharSet UTF8;"
# MYSQL-E "Grant all on zabbix.* to zabbix@localhost identified by ' Zabbix ';"
# Mysql-uzabbix-pzabbix Zabbix<./database/mysql/schema.sql
# Mysql-uzabbix-pzabbix Zabbix<./database/mysql/images.sql
# Mysql-uzabbix-pzabbix Zabbix<./database/mysql/data.sql


10. Configure soft Connect and boot file information
# Mkdir/var/log/zabbix
# chown Zabbix.zabbix/var/log/zabbix
# ln-s/usr/local/zabbix/etc//etc/zabbix
# ln-s/usr/local/zabbix/bin/*/usr/bin/
# ln-s/usr/local/zabbix/sbin/*/usr/sbin/
# cp/usr/local/src/zabbix-3.0.0/misc/init.d/fedora/core/zabbix_*/ETC/INIT.D
# chmod 755/etc/init.d/zabbix_*


11. Modify the Zabbix_server and Zabbix_agentd boot files in the/ETC/INIT.D directory
# sed-i "S@basedir=/usr/local@basedir=/usr/local/zabbix@g"/etc/init.d/zabbix_server
# sed-i "S@basedir=/usr/local@basedir=/usr/local/zabbix@g"/etc/init.d/zabbix_agentd
Modify/etc/zabbix/zabbix_server.conf
# sed-i "S@dbuser=root@dbuser=zabbix@g"/etc/zabbix/zabbix_server.conf
# sed-i "s@ #DBPassword = @DBPassword =zabbix@g"/etc/zabbix/zabbix_server.conf
# sed-i "s@# dbpassword= @DBPassword =zabbix@g"/etc/zabbix/zabbix_server.conf
Modify/etc/zabbix/zabbix_agentd.conf, where the IP address is written zabbix_server IP address, that is 192.168.32.147
# sed-i "S@server=127.0.0.1@server=127.0.0.1,192.168.32.147@g"/etc/zabbix/zabbix_agentd.conf
# sed-i "s@serveractive=127.0.0.1@serveractive= $IP: 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


12. Copy the files from the Zabbix site to the/var/www/html directory
# cp-r/usr/local/src/zabbix-3.0.0/frontends/php//var/www/html/zabbix/
# Chown-r apache.apache/var/www/html/zabbix/
# Chkconfig Zabbix_server on
# Chkconfig Zabbix_agentd on
# service Zabbix_server Start
Starting zabbix_server: [OK]
# service Zabbix_agentd Start
Starting ZABBIX_AGENTD: [OK]

13. Configure Zabbix via web site

Subsequent configuration via http://192.168.32.147/zabbix/setup.php Web page after the above steps are configured

After opening the interface, the eggs are not

zabbix3.0.0 requires PHP version above 5.4

Yum Remove php php-bcmath php-cli php-common php-devel php-fpm php-gd php-imap php-ldap php-mbstring php-mcrypt php- MySQL php-odbc php-pdo php-pear php-pecl-igbinary php-xml php-xmlrpc

RPM-UVH http://mirror.webtatic.com/yum/el6/latest.rpm

Yum install php55w php55w-bcmath php55w-cli php55w-common php55w-devel php55w-fpm php55w-gd php55w-imap php55w-ldap Php55w-mbstring php55w-mcrypt php55w-mysql php55w-odbc php55w-pdo php55w-pear php55w-pecl-igbinary php55w-xml php5 5w-xmlrpc Php55w-opcache php55w-intl Php55w-pecl-memcache

Installation Interface:


PHP Configuration Check interface, the result is OK to indicate normal, if it is a fail state, please modify the relevant PHP configuration parameters, and restart the httpd service


Here the database information, in the above is configured, please see above


Fill in the Zabbix server address, I fill in here is the IP address of the machine 192.168.32.147


Final configuration Results Preview


Installation Complete



14, installation complete eight. Access the Zabbix Web management interface

Once installed, you can access the Web management interface directly via http://192.168.32.147/zabbix/index.php#
Default User name: admin, Password: Zabbix



15. Adjust Zabbix language


There is no Chinese option

Find a file address by #find/-name locales.inc.php

Change False to True


Chinese options are available.



16, Zabbix language set into Chinese, there are garbled to solve the following

1. Select a Chinese font, such as "Italic", from the fonts, Control Panel, Windows
2. Upload fonts to the/var/www/html/zabbix/fonts directory
3. Modify the Chinese font settings for Zabbix page management
# vim/var/www/html/zabbix/include/defines.inc.php
#修改如下 2 rows
Define (' Zbx_font_name ', ' Simkai ');
Define (' Zbx_graph_font_name ', ' Simkai ');

17. Change the time zone

#cp/usr/share/zoneinfo/asia/shanghai/etc/localtime

18, after the normal installation of Zabbix, after login Zabbix monitoring error Zabbix Server is not running:the information displayed

Whether SELinux is off. Be sure to turn this off, and turning on SELinux can cause a series of problems, even Zabbix's discovery function is not working properly
To close the SELinux method:
Modify the Selinux= "" in the/etc/selinux/config file to Disabled, and then restart



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.