Zabbix3.4-RHEL 7.4 X64 YUM联网安装

Posted on 2018-05-29 16:23  飘飘的摇摇  阅读(207)  评论(0编辑  收藏  举报

OS准备

关闭selinux

vi /etc/selinux/config

setenforce 0

开启防火墙80端口访问

firewall-cmd --permanent --add-rich-rule 'rule family=ipv4 port port=80 protocol=tcp accept'

firewall-cmd --reload

联网安装REPO源

rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm

yum安装前端准备

安装apache,php,java,mysql

yum clean all

yum list

yum grouplist

yum groupinstall "Web Server" "PHP Support" "MySQL Database server" "MySQL Database client" "Java Platform"

安装扩展包

yum install gcc mysql-devel php-mbstring php-bcmath php-mysql OpenIPMI OpenIPMI-devel libcurl libcurl-devel libxml2 libxml2-devel net-snmp net-snmp-devel

yum install fping

安装zabbix组件

yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent

数据库安装配置

yum install mariadb-server mariadb -y

配置创建数据库

配置数据库密码

mysqladmin -uroot password <newpassword>

# mysql -uroot -p

password

mysql> create database zabbix character set utf8 collate utf8_bin;

mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';

mysql> quit;

数据库导入

# zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix

配置Zabbix server的数据库

vi /etc/zabbix/zabbix_server.conf

DBPassword=password

配置ZABBIX前端

vi /etc/httpd/conf.d/zabbix.conf,

# ZABBIX

<VirtualHost *:80>

   ServerName zbserver

   ServerAdmin root@localhost

   DocumentRoot /usr/share/zabbix

Alias /zabbix /usr/share/zabbix

<Directory "/usr/share/zabbix">

Options FollowSymLinks

AllowOverride None

Require all granted

<IfModule mod_php5.c>

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 Aisa/Shanghai

</IfModule>

</Directory>

<Directory "/usr/share/zabbix/conf">

Require all denied

</Directory>

<Directory "/usr/share/zabbix/app">

Require all denied

</Directory>

<Directory "/usr/share/zabbix/include">

Require all denied

</Directory>

<Directory "/usr/share/zabbix/local">

Require all denied

</Directory>

   ErrorLog /var/log/httpd/zabbix/error.log

   # Possible values include: debug, info, notice, warn, error, crit,

   # alert, emerg.

   LogLevel warn

   CustomLog /var/log/httpd/zabbix/access.log combined

   ServerSignature On

</VirtualHost>

准备日志文件夹

mkdir /var/log/httpd/zabbix/

touch /var/log/httpd/zabbix/error.log

touch /var/log/httpd/zabbix/access.log

启动进程

systemctl enable mariadb zabbix-server zabbix-agent httpd

systemctl restart mariadb zabbix-server zabbix-agent httpd

配置前端

配置过程参考Installing frontend

问题处理

图片显示乱码https://www.cnblogs.com/kevingrace/p/5957283.html

端口监控https://www.linuxidc.com/Linux/2013-10/90799.htm

Copyright © 2024 飘飘的摇摇
Powered by .NET 8.0 on Kubernetes