centos 7 安装zabbix-4.0
第一步:安装nginx
############安装Nginx###########
yum localinstall http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum install -y nginx
systemctl start nginx.service
systemctl enable nginx
关闭自带firewalld 防火墙服务
systemctl stop firewalld
禁止开机启动firewalld 服务
systemctl mask firewalld
setenforce 0
第二步:安装php
#########安装PHP###############
检查当前安装的PHP包
yum list installed | grep php
如果有安装的PHP包,先删除他们
yum remove php.x86_64 php-cli.x86_64 php-common.x86_64 php-gd.x86_64 php-ldap.x86_64 php-mbstring.x86_64 php-mcrypt.x86_64 php-mysql.x86_64 php-pdo.x86_64
安装PHP rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/epel-release.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum 安装PHP
yum install php70w.x86_64 php70w-cli.x86_64 php70w-common.x86_64 php70w-gd.x86_64 php70w-ldap.x86_64 php70w-mbstring.x86_64 php70w-mcrypt.x86_64 php70w-mysql.x86_64 php70w-pdo.x86_64
安装PHP FPM
yum install php70w-fpm
systemctl start php-fpm
php -v
systemctl enable php-fpm
第三步安装:zabbix
###########添加EPEL源########
rpm -ivh http://mirrors.ustc.edu.cn/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm
########安装zabbix###########
wget http://repo.zabbix.com/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm
rpm -ivh zabbix-release-3.5-1.el7.noarch.rpm
yum search zabbix ###查看zabbix 安装包####
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-get
第四步:安装mysql
#######安装mysql数据库#########
wget http://repo.mysql.com/yum/mysql-5.7-community/el/7/x86_64/mysql57-community-release-el7-7.noarch.rpm
rpm -vhi mysql57-community-release-el7-7.noarch.rpm
yum install -y mysql-community-server
systemctl start mysqld
systemctl enable mysqld
vi /etc/my.cnf ###在最后一行添加 validate_password = off ######
systemctl restart mysqld
grep 'temporary password' /var/log/mysqld.log #####查看mysql默认生成的密码######
mysql_secure_installation #初始化数据库信息
######创建zabbix用户#########
mysql -uroot -p
root
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'zabbix';
mysql> flush privileges;
exit
######创建zabbix 数据库########
zcat /usr/share/doc/zabbix-server-mysql-4.0.0/create.sql.gz | mysql zabbix -uzabbix -pzabbix
#########修改zabbix配置文件#######
vi /etc/zabbix/zabbix_server.conf
########查看zabbix配置文件########
[root@localhost ~]# grep ^DB /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
########################
#######修改配置文件php.ini 文件########
sed -i "s/max_execution_time = 30/max_execution_time = 300/" /etc/php.ini
sed -i 's/max_input_time = 60/max_input_time = 300/' /etc/php.ini
sed -i 's/post_max_size = 8M/post_max_size = 16M/' /etc/php.ini
sed -i 's/post_max_size = 8M/post_max_size = 16M/' /etc/php.ini
sed -i 's_;date.timezone =_date.timezone =Asia/Shanghai_' /etc/php.ini
systemctl restart php-fpm
第五步:整合nginx与php
server {
#listen 8080;
listen 80;
server_name zabbix.nuoya.ph;
root /usr/share/zabbix;
index index.html index.htm index.php;
include /etc/nginx/default.d/*.conf;
#rewrite ^(.*) https://$server_name$1 permanent;
# return 301 https://zabbix.aoyoujiasu88.com$request_uri;
location / {try_files $uri $uri/ /index.php?$query_string;
}
#监控PHP状态
location ~ ^/(status|ping)$
{
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $fastcgi_script_name;
}
#监控nginx 状态
location /ngx_status
{
stub_status on;
access_log off;
}
location ~ \.php$ {
include fastcgi.conf;
#try_files $uri /index.php =404;
#fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
#fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
error_page 404 /404.html;
location = /40x.html {
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
}
}
# Settings for a TLS enabled server.
#
# server {
# listen 443;
#server_name zabbix.aoyoujiasu88.com ;
# root /usr/share/zabbix;
# ssl on;
# ssl_certificate /etc/nginx/conf.d/certificate.crt;
# ssl_certificate_key /etc/nginx/conf.d/private.key;
# ssl_session_cache shared:SSL:1m;
# ssl_session_timeout 10m;
# ssl_ciphers HIGH:!aNULL:!MD5;
# ssl_prefer_server_ciphers on;
# # Load configuration files for the default server block.
# include /etc/nginx/default.d/*.conf;
# error_page 404 /404.html;
# location = /40x.html {
# }
# error_page 500 502 503 504 /50x.html;
# location = /50x.html {
# }
# }
启动nginx
systemctl start nginx
systemctl enable nginx
启动zabbix
systemctl start zabbix-server
systemctl enable zabbix-server
http://本机IP/zabbix
####用户名:Admin 密码:登入时候设置的密码######
zabbix中文显示优化
安装方法如下:
wget https://github.com/echohn/zabbix-zh_CN/archive/master.zip
unzip master.zip
rm /usr/share/zabbix/locale/zh_CN/LC_MESSAGES/frontend.mo
cp zabbix-zh_CN-master/frontend.mo /usr/share/zabbix/locale/zh_CN/LC_MESSAGES/frontend.mo
systemctl restart nginx
systemctl restart zabbix-server
把Windows系统中找到C:\Windows\Fonts中的楷体(常规)复制到windows桌面上
cd /usr/share/zabbix/fonts/
导入simkai.ttf(常规字体)
chmod 777 simkai.ttf
cp graphfont.ttf graphfont.ttf.bak
mv simkai.ttf graphfont.ttf
mv:是否覆盖"graphfont.ttf"? y
######centos 7 zabbix agnet 安装####
wget http://repo.zabbix.com/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm
rpm -ivh zabbix-release-3.5-1.el7.noarch.rpm
yum -y install zabbix-agent
iptables -I INPUT -p tcp --dport 10050 -j ACCEPT
service iptables save
###配置/etc/zabbix/zabbix_agentd.conf 文件里面的Server 地址###
#Server= zabbix sever IP ###
##启动 zabbix agent ####
systemctl start zabbix-agent
systemctl enable zabbix-agent
#####centos 6 zabbix agnet 安装####
wget http://repo.zabbix.com/zabbix/3.5/rhel/6/x86_64/zabbix-agent-4.0.0-1.1alpha2.el6.x86_64.rpm
rpm -ivh zabbix-agent-4.0.0-1.1alpha2.el6.x86_64.rpm
###配置/etc/zabbix/zabbix_agentd.conf 文件里面的Server 地址###
#Server= zabbix sever IP ###
##启动 zabbix agent ####
service zabbix-agent start
centos 7 安装zabbix-4.0的更多相关文章
- 解决CentOS 7安装zabbix 3.0 无法启动zabbix-server的问题[segfault at 18 ip 00007f78842b4bd0 sp 00007fff1995a818 error 4 in libpthread-2.17.so[7f78842ab000+16000]]
解决CentOS 7安装zabbix 3.0 无法启动zabbix-server的问题 [root@localhost sbin]# service zabbix-server start Redir ...
- centos 6 安装zabbix 3.0
1.安装PHP Zabbix 3.0对PHP的要求最低为5.4,而CentOS6默认为5.3.3,完全不满足要求,故需要利用第三方源,将PHP升级到5.4以上,注意,不支持PHP7 rpm -ivh ...
- CentOS 7 安装 Zabbix 3.0
CentOS7搭建Zabbix 一.安装数据库: 1. 安装数据库:sudo yum grouinstall mariadb –y 2. 启动数据库:sudo systemctl start ...
- CentOS 7 源码安装 Zabbix 6.0
Zabbix 主要有以下几个组件组成: Zabbix Server:Zabbix 服务端,是 Zabbix 的核心组件.它负责接收监控数据并触发告警,还负责将监控数据持久化到数据库中. Zabbix ...
- centos下安装python3.7.0以上版本时报错ModuleNotFoundError: No module named '_ctypes'
centos下安装python3.7.0以上版本时报错ModuleNotFoundError: No module named '_ctypes'的解决办法 3.7版本需要一个新的包libffi-de ...
- CentOS 7安装Hadoop 3.0.0
最近在学习大数据,需要安装Hadoop,自己弄了好久,最后终于弄好了.网上也有很多文章关于安装Hadoop的,但总会遇到一些问题,所以把在CentOS 7安装Hadoop 3.0.0的整个过程记录下来 ...
- Centos7下安装zabbix 3.0.19
参考网站: https://www.cnblogs.com/xiewenming/p/7732144.html https://www.cnblogs.com/clsn/p/7885990.html ...
- CentOS 7.2安装zabbix 3.0 LTS
1.zabbix简介 zabbix(音同 zæbix)是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案. zabbix能监视各种网络参数,保证服务器系统的安全运营:并提供 ...
- (转)基于CentOS 7安装Zabbix 3.4和Zabbix4.0
原文:https://blog.csdn.net/leshami/article/details/78708049 CentOS 7环境下Zabbix4.0的安装和配置实例-----------htt ...
- centos 6.9安装zabbix 3.0
Linux下常用的系统监控软件有Nagios.Cacti.Zabbix.Monit等,这些开源的软件,可以帮助我们更好的管理机器,在第一时间内发现,并警告系统维护人员. 今天开始研究下Zabbix,使 ...
随机推荐
- webpack 单独打包指定JS文件
背景 最近接到一个需求,因为不确定打出的前端包所访问的后端IP,需要对项目中IP配置文件单独拿出来,方便运维部署的时候对IP做修改.因此,需要用webpack单独打包指定文件. CommonsChun ...
- Linux小项目/rhel-基于同步官网yum仓库数据搭建本地yum服务器
本文的实验环境:aws上的Redhat 7.x , 同样也适用于Centos 7.x 简单说主要分为三步: (1) 向官网同步yum数据,可以根据具体情况,创建脚本及配置周期例行任务 (2) 搭建w ...
- ElasticSearch7.3破解
破解ES7.3.0到白金版(学习交流使用) 正常安装ELK7.3版本到服务器上 正常部署ELK7到服务器上,先不要启动.然后开始进行破解操作 进行破解操作 需要破解的文件:modules/x-pack ...
- ACM已刷题
ZOJ: 1001.1002.1003.1004.1005.1006.1037.1045.1048.1049.1067.1087.1091.1016. swjtuoj: 2433 注:没链接的应该是最 ...
- 【Kata Daily 190912】Alphabetical Addition(字母相加)
题目: Your task is to add up letters to one letter. The function will be given a variable amount of ar ...
- 从直播商城系统的KOL效应分析,直播带货井喷的必然性
网红营销.直播带货作为近年来的热点发展迅猛,同时也捧红了一个概念:KOL.随着直播商城系统的不断完善发展,让KOL成为近年来营销最热门的香饽饽.随着原创直播平台低门槛化.模板化内容创作和大数据智能分发 ...
- 4、Django之视图层
一 视图函数 视图函数,简称视图,属于Django的视图层,默认定义在views.py文件中,是用来处理web请求信息以及返回响应信息的函数,所以研究视图函数只需熟练掌握两个对象即可:请求对象(Htt ...
- link和@import引入css 区别,不建议使用@import
众多周知,有两种方法可以在页面中导入样式文件. <link href="a.css" rel="stylesheet"> <style> ...
- Jenkins - 部署在Tomcat容器里的Jenkins,提示“反向代理设置有误”
提示"反向代理设置有误"的背景 将jenkins.war放在tomcat容器中运行 访问Jenkins-系统管理,会提示"反向代理设置有误" 如何解决 在tom ...
- K最邻近分类
最邻近分类是分类方法中比较简单的一种,下面对其进行介绍 1.模型结构说明 最邻近分类模型属于"基于记忆"的非参数局部模型,这种模型并不是立即利用训练数据建立模型,数据 ...