Install zabbix in yum

Source: Internet
Author: User
Tags gpg

Local IP Address: 192.168.170.70

1: First, you must clean up the environment before installing zabbix. First, install the epel source and zabbix source.

# Cd/etc/yum. Repo. d/

# Add the following content under Vim epel. Repo:

[Epel]
Name = extra packages for Enterprise Linux 7-$ basearch
Baseurl = http://mirrors.ucloud.cn/epel/7/?basearch
Failovermethod = Priority
Enabled = 1
Gpgcheck = 1
Gpgkey = http://mirrors.ucloud.cn/epel/RPM-GPG-KEY-EPEL-7

[Epel-debuginfo]
Name = extra packages for Enterprise Linux 7-$ basearch-Debug
Baseurl = http://mirrors.ucloud.cn/epel/7/?basearch/debug
Failovermethod = Priority
Enabled = 0
Gpgkey = http://mirrors.ucloud.cn/epel/RPM-GPG-KEY-EPEL-7
Gpgcheck = 1

[Epel-source]
Name = extra packages for Enterprise Linux 7-$ basearch-Source
Base url = http://mirrors.ucloud.cn/epel/7/SRPMS
Failovermethod = Priority
Enabled = 0
Gpgkey = http://mirrors.ucloud.cn/epel/RPM-GPG-KEY-EPEL-7
Gpgcheck = 1

Finally, WQ is saved and exited;

Or directly download the epel Source: wget-O/etc/yum. Repos. d/epel. Repo http://mirrors.aliyun.com/repo/epel-7.repo

# Add the following content under Vim zabbix. Repo:

[Zabbix]
Name = zabbix official repository-$ basearch
Baseurl = http://repo.zabbix.com/zabbix/3.4/rhel/7/?basearch/
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-GPG/RPM-GPG-KEY-ZABBIX-A14FE591

[Zabbix-non-supported]
Name = zabbix official repository non-supported-$ basearch
Baseurl = http://repo.zabbix.com/non-supported/rhel/7/?basearch/
Enabled = 1
Gpgkey = file: // etc/pki/rpm-GPG/RPM-GPG-KEY-ZABBIX
Gpgcheck = 1

Finally, WQ is saved and exited.

Or download the zabbix source directly: rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm

2: then install the package corresponding to zabbix (if a host plays three ends, it can be installed, but generally, zabbix-server-MySQL and zabbix-web are installed on the zabbix server, zabbix-web-MySQL)

# Yum install-y zabbix-server-mysql zabbix-Get -- the package installed on the server

# Yum install-y zabbix-web-mysql -- package installed on Web-Gui

# Yum install-y zabbix-Agent zabbix-sender -- package installed on the agent

 

Install php5.6:

rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpmrpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm

Install mysql5.7

Wget http://repo.mysql.com//mysql57-community-release-el6-8.noarch.rpm

Yum install MySQL

3: Install zabbix maraidb

Configure the MySQL file first

#/Etc/My. CNF Add under [mysqld]

Skip_name_resolve = on

Innodb_file_per_table = on

Download madiradb-Server

# Yum install-y mariadb-Server

# Systemct start mariadb. serrvice

# Mariadb [(none)]> Create Database zabbix charset 'utf8'; # mariadb [(none)]> grant all on zabbix. * To [email protected] '2017. 168.170.70 'identified by '20140901'; # mariadb [(none)]> flush privileges;

4: zabbix Server database initialization and data import;

# Mysql_secure_installation

# Zcat/usr/share/doc/zabbix-server-mysql-3.4.6/create. SQL .gz | mysql-uzabbix-p123456 zabbix

Log on to MySQL to view the initialized table in zabbix data.

5: Start the zabbix-server process

①: Start the zabbix-server process will read the configuration file:/etc/zabbix/zabbix_server.conf, this configuration file contains four types of commands General parametersadvanced parametersloadable MODULESTLS-RELATED parameters ②: modify the command listenport = 10051: listening port number logtype = file: Log Type logfile =/var/log/zabbix/zabbix_server.log: Log Path logfilesize = 0: threshold for log scrolling. 0 indicates that pidfile is not scrolling. =/var/run/zabbix/zabbix_server.pid: PID storage file dbhost = 192.168.170.70: Specifies the host address of the database (or localhost) dbname = zabbix (zabbix Database Name) dbuser = zabbix (database connection username) dbpassword = 123456 (Database Password) dbsocket =/var/lib/MySQL. sock (mariadb is installed through yum, so the socket file is not in the/tmp directory) ③: start the service systemctl start zabbix-server.service ④: make sure that the trousers package version on the local machine is 0.3.11 or later. 6: Configure zabbix-web (when zabbix-web and zabbix-web-MySQL are installed, httpd package and PHP-mysql package are installed by default.) ①: configure the PHP Time Zone # Vim/etc/httpd/CONF. d/zabbix. conf (use this) php_value date. timezone Asia/Shanghai: indicates that in the mod_php5.c module, set it to Shanghai time ②: Start httpdsystemctl start httpd 7: log on to http: // 192.168.23.67/zabbix/page database type: MySQLDatabase Host: 192.168.170.70database port: 3306 Database Name: zabbixuser: zabbixpassword: 123456

 

8: The Logon Name of zabbix-server is admain and the password is zabbix.

9: After logging in, you can monitor the servers you need to monitor.

Supplement:

I. Solve the Problem of Web Page garbled characters

1. Upload the font to the/usr/share/zabbix/fonts directory.

2. Edit the/usr/share/zabbix/include/defines. Inc. PHP configuration file and modify

Define ('zbx _ graph_font_name ', 'simhei'); --- in 54 rows

Define ('zbx _ font_name ', 'simhei'); --- in row 93

2. Modify the logon name and password of zabbix
Edit the configuration in/etc/zabbix/web/zabbix. conf. php.
Directly change the password and login name

Install zabbix in yum

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.