linux 7 zabbix,CentOS 7.x安装搭建Zabbix3.0环境

文章目录

[隐藏]

1、安装数据库mariadb

2、下载(Choose your platform for Zabbix server)

3、Install and configure Zabbix server

4、Configure Zabbix frontend

1、安装数据库mariadb

[root@node1 ~]# yum install -y mariadb mariadb-server [root@node1 ~]# systemctl start mariadb [root@node1 ~]# systemctl enable mariadb

[root@node1 ~]# vi /etc/my.cnf [root@node1 ~]# cat /etc/my.cnf [mysqld] character-set-server=utf8 datadir=/var/lib/mysql socket=/var/lib/mysql/mysql.sock # Disabling symbolic-links is recommended to prevent assorted security risks symbolic-links=0 # Settings user and group are ignored when systemd is used. # If you need to run mysqld under a different user or group, # customize your systemd unit file for mariadb according to the # instructions in http://fedoraproject.org/wiki/Systemd [mysqld_safe] log-error=/var/log/mariadb/mariadb.log pid-file=/var/run/mariadb/mariadb.pid # # include all files from the config directory # !includedir /etc/my.cnf.d [client] default-character-set=utf8 [mysql] default-character-set=utf8 [root@node1 ~]#

2、下载(Choose your platform for Zabbix server)

https://www.zabbix.com/

a9c777c495929a90f9e8f8b2cd33a8e7.png

257cad68ea82b7cf588efa1adac88c9c.png

2d589438f7817101fb6070baac0c692c.png

3、Install and configure Zabbix server

(1)Install Repository with MySQL database

[root@node1 ~]# rpm -i http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release-3.0-1.el7.noarch.rpm warning: /var/tmp/rpm-tmp.IcrMTU: Header V4 DSA/SHA1 Signature, key ID 79ea5ed4: NOKEY

(2)Install Zabbix server, frontend, agent

[root@node1 ~]# yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent ... Installed: zabbix-agent.x86_64 0:3.0.16-1.el7 zabbix-server-mysql.x86_64 0:3.0.16-1.el7 zabbix-web-mysql.noarch 0:3.0.16-1.el7 Dependency Installed: OpenIPMI-libs.x86_64 0:2.0.19-15.el7 OpenIPMI-modalias.x86_64 0:2.0.19-15.el7 apr.x86_64 0:1.4.8-3.el7_4.1 apr-util.x86_64 0:1.5.2-6.el7 dejavu-fonts-common.noarch 0:2.33-6.el7 dejavu-sans-fonts.noarch 0:2.33-6.el7 fping.x86_64 0:3.10-4.el7 httpd.x86_64 0:2.4.6-67.el7.centos.6 httpd-tools.x86_64 0:2.4.6-67.el7.centos.6 iksemel.x86_64 0:1.4-6.el7 libXpm.x86_64 0:3.5.12-1.el7 libtool-ltdl.x86_64 0:2.4.2-22.el7_3 libxslt.x86_64 0:1.1.28-5.el7 libzip.x86_64 0:0.10.1-8.el7 mailcap.noarch 0:2.1.41-2.el7 mariadb-libs.x86_64 1:5.5.56-2.el7 net-snmp-libs.x86_64 1:5.7.2-28.el7_4.1 php.x86_64 0:5.4.16-43.el7_4.1 php-bcmath.x86_64 0:5.4.16-43.el7_4.1 php-cli.x86_64 0:5.4.16-43.el7_4.1 php-common.x86_64 0:5.4.16-43.el7_4.1 php-gd.x86_64 0:5.4.16-43.el7_4.1 php-ldap.x86_64 0:5.4.16-43.el7_4.1 php-mbstring.x86_64 0:5.4.16-43.el7_4.1 php-mysql.x86_64 0:5.4.16-43.el7_4.1 php-pdo.x86_64 0:5.4.16-43.el7_4.1 php-xml.x86_64 0:5.4.16-43.el7_4.1 t1lib.x86_64 0:5.1.2-14.el7 unixODBC.x86_64 0:2.3.1-11.el7 zabbix-web.noarch 0:3.0.16-1.el7 Complete! [root@node1 ~]#

(3)Create initial database

[root@node1 ~]# mysql -uroot -p Enter password: Welcome to the MariaDB monitor. Commands end with ; or g. Your MariaDB connection id is 2 Server version: 5.5.56-MariaDB MariaDB Server Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement. MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> flush privileges; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> quit Bye [root@node1 ~]#

Import initial schema and data. You will be prompted to enter your newly created password.

[root@node1 ~]# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix Enter password: [root@node1 ~]# mysql -uzabbix -pzabbix Welcome to the MariaDB monitor. Commands end with ; or g. Your MariaDB connection id is 6 Server version: 5.5.56-MariaDB MariaDB Server Copyright (c) 2000, 2017, Oracle, MariaDB Corporation Ab and others. Type 'help;' or 'h' for help. Type 'c' to clear the current input statement. MariaDB [(none)]> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | zabbix | +--------------------+ 2 rows in set (0.01 sec) MariaDB [(none)]> use zabbix; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed MariaDB [zabbix]>

(4)Configure the database for Zabbix server

[root@node1 ~]# vi /etc/zabbix/zabbix_server.conf

DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=zabbix

(5)Configure PHP for Zabbix frontend

[root@node1 ~]# vi /etc/php.ini

max_execution_time = 600 max_input_time = 600 memory_limit = 256M post_max_size = 32M upload_max_filesize = 16M date.timezone = Asia/Shanghai

(6)Start Zabbix server and agent processes

[root@node1 ~]# systemctl restart zabbix-server zabbix-agent httpd [root@node1 ~]# systemctl enable zabbix-server zabbix-agent httpd Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-server.service to /usr/lib/systemd/system/zabbix-server.service. Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-agent.service to /usr/lib/systemd/system/zabbix-agent.service. Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service. [root@node1 ~]#

4、Configure Zabbix frontend

bc9684540c26ed628ef17b73a942a527.png

https://www.zabbix.com/documentation/3.0/manual/installation/install#installing_frontend

http://node1/zabbix/

beae98e5af80dd46781db8c0f818a88d.png

3c0c1749692465391b81c8437e7fad94.png

678c2cc78fe454fdc00f86540726322a.png

03594fccbe192a4acddd27d273434110.png

1f6d933a72247eafd0a35fb58e677c36.png

5d8a6194112b5146375df540aec674f5.png

97864b1c9fcd1d60eeb2bbae35fd8151.png

ee29c0b4ea9cc952247446d64226de06.png

原文出处:csdn -> https://blog.csdn.net/chengyuqiang/article/details/80210944

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值