首页 > 代码库 > Zabbix 安装部署
Zabbix 安装部署
Zabbix
安装服务器端:
yum install zabbix-server-mysql-3.0.2-1.el7.x86_64.rpm zabbix-get-3.0.2-1.el7.x86_64.rpm
安装Web GUI
yum install httpd php php-mysql php-mbstring php-gd php-bcmath php-ldap php-xml yum install zabbix-web-3.0.2-1.el7.noarch.rpm zabbix-web-mysql-3.0.2-1.el7.noarch.rpm
准备zabbix 数据库
[root@zabbix ~]# yum -y install mariadb-server mysql [root@zabbix ~]# systemctl enable mariadb.service [root@zabbix ~]# systemctl start mariadb.service MariaDB [(none)]> CREATE DATABASE zabbix CHARSET ‘utf8‘; Query OK, 1 row affected (0.00 sec) MariaDB [(none)]> GRANT ALL ON zabbix.* TO ‘zabbix_user‘@‘%‘ IDENTIFIED BY ‘zabbix_pass‘; Query OK, 0 rows affected (0.00 sec) MariaDB [(none)]> FLUSH PRIVILEGES; Query OK, 0 rows affected (0.00 sec)
服务端数据库初始化:
查看数据库文件安装目录 [root@zabbix ~]# rpm -ql zabbix-server-mysql /etc/logrotate.d/zabbix-server /etc/zabbix/zabbix_server.conf /usr/lib/systemd/system/zabbix-server.service /usr/lib/tmpfiles.d/zabbix-server.conf /usr/lib/zabbix/alertscripts /usr/lib/zabbix/externalscripts /usr/sbin/zabbix_server_mysql /usr/share/doc/zabbix-server-mysql-3.0.2 /usr/share/doc/zabbix-server-mysql-3.0.2/AUTHORS /usr/share/doc/zabbix-server-mysql-3.0.2/COPYING /usr/share/doc/zabbix-server-mysql-3.0.2/ChangeLog /usr/share/doc/zabbix-server-mysql-3.0.2/NEWS /usr/share/doc/zabbix-server-mysql-3.0.2/README /usr/share/doc/zabbix-server-mysql-3.0.2/create.sql.gz /usr/share/man/man8/zabbix_server.8.gz /var/log/zabbix /var/run/zabbix [root@zabbix ~]# cp /usr/share/doc/zabbix-server-mysql-3.0.2/create.sql.gz . [root@zabbix ~]# gzip -d create.sql.gz [root@zabbix ~]# mysql -uzabbix_user -h192.168.99.82 -p zabbix < create.sql
zabbix服务端配置:
[root@zabbix ~]# grep -v "^#" /etc/zabbix/zabbix_server.conf | grep -v "^$" LogFile=/var/log/zabbix/zabbix_server.log LogFileSize=0 PidFile=/var/run/zabbix/zabbix_server.pid DBHost=192.168.99.82 DBName=zabbix DBUser=xxxx DBPassword=xxxxx SNMPTrapperFile=/var/log/snmptrap/snmptrap.log Timeout=4 AlertScriptsPath=/usr/lib/zabbix/alertscripts ExternalScripts=/usr/lib/zabbix/externalscripts LogSlowQueries=3000
配置zabbix-web:
php时区设定:
[root@zabbix ~]# grep date.timezone /etc/php.ini ; http://php.net/date.timezone date.timezone = Asia/Shanghai [root@zabbix ~]# grep date.timezone /etc/httpd/conf.d/ autoindex.conf php.conf README userdir.conf welcome.conf zabbix.conf [root@zabbix ~]# grep date.timezone /etc/httpd/conf.d/zabbix.conf php_value date.timezone Asia/Shanghai
启动zabbix-server
[root@zabbix ~]# systemctl start zabbix-server.service [root@zabbix ~]# systemctl enable zabbix-server.service Created symlink from /etc/systemd/system/multi-user.target.wants/zabbix-server.service to /usr/lib/systemd/system/zabbix-server.service.
开启httpd服务
[root@zabbix ~]# systemctl start httpd.service [root@zabbix ~]# systemctl enable httpd.service Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
访问:
http://zabbix.runner.vip/zabbix/
安装zabbix 并配置mysql的相关信息
安装完成后,默认的登录用户名密码
admin:zabbix
本文出自 “迷荼” 博客,谢绝转载!
Zabbix 安装部署
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。