ituser - 小小IT人遨游大大IT界

Centos7安装zabbix-server3.2-apache版

2018-07-29 16:04:31 121次浏览


基础包: yum install gcc pcre mysql-community-devel libxml2-devel unixODBC-devel net-snmp-devel libcurl-devel libssh2-devel OpenIPMI-devel

安装zabbix的yum源: rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm

安装zabbix-server数据库、zabbix-web服务端: yum install zabbix-server-mysql zabbix-web-mysql 安装mariadb数据库客户端和服务端: yum install mariadb mariadb-server 启动mariadb数据库: systemctl start mariadb 设置mariadb数据库开机自启动: systemctl enable mariadb 登录mariadb数据库 mysql 创建zabbix数据库并设置字符集为utf-8: create database zabbix character set utf8 collate utf8_bin; 创建zabbix用户、设置允许zabbix用户本地登录并为zabbix设置密码为123456: grant all privileges on zabbix.* to zabbix@localhost identified by ‘123456’; 立即刷新权限表: flush privileges; 退出mariadb数据库:quit; 导入zabbix数据进zabbix数据库中: zcat /usr/share/doc/zabbix-server-mysql-3.2.*/create.sql.gz | mysql -uzabbix -p123456 zabbix 启动zabbix服务端: systemctl start zabbix-server 设置zabbix服务端开机自启动: systemctl enable zabbix-server 修改zabbix网页端环境配置文件: vi /etc/httpd/conf.d/zabbix.conf

参数如下: php_value max_execution_time 300 php_value memory_limit 128M php_value post_max_size 16M php_value upload_max_filesize 2M php_value max_input_time 300 php_value always_populate_raw_post_data -1 php_value date.timezone Asia/Shanghai 此项为非必须,如果开启了SElinux就需要执行此操作: setsebool -P httpd_can_connect_zabbix on 启动httpd: systemctl start httpd 设置httpd开机自启动: systemctl enable httpd 修改中文字体 /usr/share/zabbix/fonts 加入msyh.ttf /usr/share/zabbix/include/defines.inc.php 45 define(‘ZBX_GRAPH_FONT_NAME’, ‘msyh’); // font file name

安装zabbix-agent yum install zabbix-agent systemctl start zabbix-agent systemctl enable zabbix-agent 谢谢关注

说明

所有内容来及个人经验和互联网摘取,如有雷同纯属巧合,如有冒犯,欢迎留言,分享即快乐,感谢互联网中每一位懂得分享的ituser!QQ群:127331971(备注:ituser.cn)