centos安装 zabbix

1.zabbix  yum源

1
rpm -ivh http: //mirrors .aliyun.com /zabbix/zabbix/3 .0 /rhel/7/x86_64/zabbix-release-3 .0-1.el7.noarch.rpm

修改源

cd  /etc/yum.repos.d/zabbix.repo

1
2
3
4
5
6
7
8
9
10
11
12
13
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=http: //mirrors .aliyun.com /zabbix/zabbix/3 .0 /rhel/7/ $basearch/
enabled=1
gpgcheck=1
gpgkey= file : ///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
 
[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch 
baseurl=http: //mirrors .aliyun.com /zabbix/non-supported/rhel/7/ $basearch/
enabled=1
gpgkey= file : ///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=1

2.安装数据库 zabbix-server

1
.[root@zabbix-server yum.repos.d] # yum install zabbix-server-mysql zabbix-web-mysql -y

3.启动mariadb

1
2
3
4
yum -y  install   mariadb-server  mariadb
[root@zabbix-server ~] # systemctl enable  mariadb 
Created  symlink  from  /etc/systemd/system/multi-user .target.wants /mariadb .service to  /usr/lib/systemd/system/mariadb .service.
[root@zabbix-server ~] # systemctl start   mariadb

4.初始化操作  root  123456

1
[root@zabbix-server ~] # mysql_secure_installation

5.授权zabbix

1
MariaDB [(none)]> grant all  on zabbix.*  to zabbix@ 'localhost'    identified  by   '123456' ;

6.初始化数据库

1
zcat  /usr/share/doc/zabbix-server-mysql-3 .0.* /create .sql.gz | mysql -uzabbix -p123456  zabbix

7.修改httpd的文件

1
2
3
4
5
6
vim   /etc/httpd/conf/httpd .conf 
ServerName 127.0.0.1:80
vim   /etc/httpd/conf .d /zabbix .conf 
  php_value  date .timezone Asia /Shanghai
systemctl  restart  htttpd 
systemctl   enable   htttpd

8.修改zabbix_server 的配置数据库的文件  数据库不在一台机器上修改下

1
2
3
4
[root@zabbix-server yum.repos.d] # vim  /etc/zabbix/zabbix_server.conf 
DBName=zabbix
DBUser=zabbix
DBPassword=123456

9访问  192.168.56.18/zabbix

wKiom1i7fe7jw15BAAB67zdeOFM420.png-wh_50

本文转自不要超过24个字符博客51CTO博客,原文链接http://blog.51cto.com/cstsncv/1925995如需转载请自行联系原作者


cstsncv

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值