在CentOS 7上使用Yum源安装 Zabbix 3.2
1. 环境准备
1
2
3
4
5
|
[root@szzabbix~]
#setenforce0
#sed-i"s/SELINUX=enforcing/SELINUX=disabled/g"/etc/selinux/config
#rpm--import/etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
#yuminstallepel-release.noarchwgetvimgccgcc-c++lsofchronytreenmapunziprsync-y
#rpm--import/etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
|
2. LAMP安装
1 2 |
#systemctlstartmariadb
|
3. Zabbix安装
3 |
#rpm-ivhhttp://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
#rpm--import/etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
|
4. 创建数据库
2 |
# MysqLadmin-urootpasswordABCabc!@#123
|
5 |
MariaDB[(none)]>
CREATE
DATABASE
zabbix
DEFAULT
CHARACTER
SET
utf8
COLLATE
utf8_bin;
GRANT
ALL
ON
zabbix.*
TO
'zabbix'
@
'%'
IDENTIFIED
BY
;
'localhost'
;
MariaDB[(none)]>flush
privileges
;
MariaDB[(none)]>quit
|
5. 导入数据
3 |
#cd/usr/share/doc/zabbix-server-MysqL-3.2.0/
#cd~
|
6. 修改配置
1 |
#vim/etc/zabbix/zabbix_server.conf
|
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
#vim/etc/httpd/conf.d/zabbix.conf |
PHP_value date.timezone Asia/Chongqing
7. 启动
#systemctlstarthttpd
#systemctlstartzabbix-server
#systemctlstartzabbix-agent
|
8. 通过 http://ip地址/zabbix配置
访问默认用户名/密码:Admin/zabbix,注意用户名也区分大小写
本文出自 “SQL Server Deep Dive” 博客,请务必保留此出处http://www.jb51.cc/article/p-acnvqvab-pb.html
补充:
以上服务都没有设置开机自启,需要设置为开机启动项的有:
3
|
[root@szzabbix~]
# systemctl enable zabbix-server.service
|