在CentOS 7上使用Yum源安装 Zabbix 3.2
1. 环境准备
[root@szzabbix ~]# setenforce 0 [root@szzabbix ~]# sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config [root@szzabbix ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 [root@szzabbix ~]# yum install epel-release.noarch wget vim gcc gcc-c++ lsof chrony tree nmap unzip rsync -y [root@szzabbix ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
2. LAMP安装
[root@szzabbix ~]# yum install httpd mariadb mariadb-server mariadb-client php php-mysql [root@szzabbix ~]# systemctl start mariadb
3. Zabbix安装
[root@szzabbix ~]# rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm [root@szzabbix ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX [root@szzabbix ~]# yum install zabbix-server-mysql zabbix-web-mysql zabbix-get zabbix-agent
4. 创建数据库
[root@szzabbix ~]#mysqladmin -u root password ABCabc!@#123 [root@szzabbix ~]# mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE zabbix DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; MariaDB [(none)]> GRANT ALL ON zabbix.* TO 'zabbix'@'%' IDENTIFIED BY 'zabbix'; MariaDB [(none)]> GRANT ALL ON zabbix.* TO 'zabbix'@'localhost' IDENTIFIED BY 'zabbix'; MariaDB [(none)]> flush privileges; MariaDB [(none)]> quit
5. 导入数据
[root@szzabbix ~]# cd /usr/share/doc/zabbix-server-mysql-3.2.0/ [root@szzabbix zabbix-server-mysql-3.2.0]# zcat create.sql.gz | mysql -uroot -p zabbix [root@szzabbix zabbix-server-mysql-3.2.0]# cd ~
6. 修改配置
[root@szzabbix ~]# vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
[root@szzabbix ~]# vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Chongqing
7. 启动
[root@szzabbix ~]# systemctl start httpd [root@szzabbix ~]# systemctl start zabbix-server [root@szzabbix ~]# systemctl start zabbix-agent
8. 通过 http://ip地址/zabbix配置
访问默认用户名/密码:Admin/zabbix,注意用户名也区分大小写
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。