zabbix

1.配置 zabbix源  地址http://repo.zabbix.com/ (里面有各种依赖包)

 

 2.找到你要的版本 这里找的是虚拟机里面的sentos7

 

 

 

 

 

 

 

 

 

 

 

 

 

1 [root@localhost ~]# rpm -ivh http://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm
2 获取http://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm
3 警告:/var/tmp/rpm-tmp.xeN1L3: 头V4 RSA/SHA512 Signature, 密钥 ID a14fe591: NOKEY
4 准备中...                          ################################# [100%]
5 正在升级/安装...
6    1:zabbix-release-4.4-1.el7         ################################# [100%]

3 .安装 zabbix  

[root@localhost ~]# yum -y install zabbix zabbix-web-mysql zabbix-server-mysql zabbix-agent httpd

4.安装MySQL  

启动mysql

[root@ localhost doc]# systemctl start mariadb

  

创建数据库 给权限 

MariaDB [(none)]> create database zabbix;
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)

  

5.初始zabbix的数据库

[root@ localhost doc]# cd /usr/share/doc/zabbix-server-mysql-4.4.4
[root@ localhost zabbix-server-mysql-4.4.4]# zcat create.sql.gz |mysql zabbix -uzabbix -pzabbix  

 

6. 更改配置文件 DB 跟数据库的连接

[root@ localhost zabbix-server-mysql-4.4.4]# sed -i 's/# DBPassword=/DBPassword=zabbix/g' /etc/zabbix/zabbix_server.conf  
[root@ localhost zabbix-server-mysql-4.4.4]# sed -i 's/# DBHost=/DBHost=zabbix/g' /etc/zabbix/zabbix_server.conf  

7.更改时区

[root@ localhost conf.d]# sed -i 's/# php_value date.timezone Europe\/Riga/php_value date.timezond/zabbix.conf

  

8.启动 zabbix 和httpd

[root@ localhost conf.d]# systemctl  start httpd
[root@ localhost conf.d]# systemctl start zabbix-server

  

  

posted @ 2020-01-08 10:20  Databasess  阅读(172)  评论(0编辑  收藏  举报