1、LAMP 环境搭建

初次安装可以先关闭selinux 和 firewall

[root@localhost ~]# setenforce
[root@localhost ~]# systemctl stop firewalld.service

1.1 mariadb数据库安装,启动、加入启动项

 [root@localhost ~]# yum install mariadb-*
[root@localhost ~]# systemctl start mariadb.service
[root@localhost ~]# systemctl status mariadb.service
● mariadb.service - MariaDB database server
Loaded: loaded (/usr/lib/systemd/system/mariadb.service; disabled;
vendor preset: disabled)
Active: active (running) since 日 2019-02-24 11:10:49 CST; 16s
ago
[root@localhost ~]# systemctl enable mariadb.service

更改mysql root初始密码:

mysql> set password for root@localhost = password('123');

 mysql> flush privileges; #立即生效

1.2 apache安装安装、启动、加入启动项

[root@localhost ~]# yum install httpd.x86_64
root@localhost ~]# systemctl start httpd.service
[root@localhost ~]# systemctl status httpd.service
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: active (running) since 日 -- :: CST; 5s ago [root@localhost ~]# systemctl enable httpd.service

1.3 php 安装

[root@localhost ~]# yum install php.x86_64 

2、zabbix程序包安装部署

2.1 下载并安装zabbix  rpm包仓库

[root@localhost ~]# wget http://repo.zabbix.com/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm
[root@localhost ~]# rpm -ivh zabbix-release-3.5-.el7.noarch.rpm

2.2 安装zabbix 相关程序包 

yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent #如果zabbix源慢,可以改变阿里源

2.4 安装初始化数据库

创建zabbix数据库,并对zabbix授予权限

MariaDB [(none)]> create database zabbix character set utf8;  #这里数据库一定要指定字符集,要不在前端历史操作是乱码,因为历史操作是保存在数据库里的。
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> grant all on zabbix.* to zabbix@localhost identified by '111';

导入数据库

create.sql /usr/share/doc/zabbix-server-mysql-4.0.0

# mysql -u zabbix -p  zabbix < create.sql #导入create.sql 

启动Zabbix Server进程

2.5 在zabbix_server.conf中编辑数据库配置

# vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix

2.6 启动Zabbix Server进程,并加入启动项

# systemctl start zabbix-server# systemctl start zabbix-server.service
# systemctl status zabbix-server.service
● zabbix-server.service - Zabbix Server
Loaded: loaded (/usr/lib/systemd/system/zabbix-server.service; disabled; vendor preset: disabled)
Active: active (running) since 日 2019-02-24 15:59:37 CST; 6s ago# systemctl enable zabbix-server.service 

2.7 编辑Zabbix前端的PHP配置

Zabbix前端的Apache配置文件位于 /etc/httpd/conf.d/zabbix.conf 。一些PHP设置已经完成了配置。

php_value max_execution_time
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time
php_value always_populate_raw_post_data -
php_value date.timezone Asia/Shanghai #需要重启Apache Web服务器
# systemctl restart httpd.service

Zabbix前端可以在浏览器中通过 http://localhost/zabbix 访问

zabbix登录默认用户:名 密码: admin  zabbix

zabbix安装完生成/etc/zabbix/web/zabbix.conf.php,可做数据库拆分配置用

2.8 abbix_agentd.conf 配置

Server=127.0.0.1  #允许接受某主机发来的数据

ServerActive=127.0.0.1

启动zabbix_agentd

2.8 注意

每次改动配置文件都要重启一遍避免出现 类似 “zabbix server is running no”页面报错

Centos 7.0 zabbix 部署的更多相关文章

  1. CentOS 6.5安装部署Zabbix监控系统

    CentOS 6.5安装部署Zabbix监控系统 先说一点废话,我没有用centos7做实验,讲真,centos 7我也不常用,喜欢新版本的同学其实可以尝试下,注意一点的就是centos 6.5只支持 ...

  2. zabbix v3.0安装部署

    这篇文章没有写明init的部分要注意 zabbix v3.0安装部署 摘要: 本文的安装过程摘自http://www.ttlsa.com/以及http://b.lifec-inc.com ,和站长凉白 ...

  3. COMCMS 微进阶篇,从0开始部署到Centos 7.4

    言:上一篇,我们介绍了,如何本地调试和部署到windows服务器. 本篇,将带大家,从0到1,开始部署到Centos系统上... 经过测试,可以完美支持Centos.这也是.net core 跨平台的 ...

  4. Centos 7.0 下安装 Zabbix server 3.0服务器的安装及 监控主机的加入(1)

    一.本系列分为6部分 1.Centos 7.0 下安装 Zabbix server 3.0服务器的安装及 监控主机的加入 2.Centos 6.5 下安装 Zabbix server 3.0服务器的安 ...

  5. 解决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 ...

  6. zabbix 6.0 docker-compose 部署

    zabbix 6.0 docker-compose 部署 zabbix6.0 已是新LTS版本.根据zabbix-docker上的trunk版本来搭建zabbix6.0. 根据踩坑,记录docker- ...

  7. asp.net core 简单部署之FTP配置(CentOS 7.0安装配置Vsftp服务器)

    配置过程原文地址:http://www.osyunwei.com/archives/9006.html 坑和结果 正确的跟着这个内容走,是靠谱的. 我自己给自己踩了个坑,请参照文章的朋友注意第七条:七 ...

  8. zabbix3.0安装部署文档

    zabbix v3.0安装部署 摘要: 本文的安装过程摘自http://www.ttlsa.com/以及http://b.lifec-inc.com ,和站长凉白开的<ZABBIX从入门到精通v ...

  9. zabbix部署与配置

    zabbix部署与配置 1.zabbix的web界面是基于php开发,所以创建lnmp环境来支持web界面的访问 yum install nginx php php-devel php-mysql p ...

随机推荐

  1. 181102 Windows下安装kivy(用python写APP)

    了解到Instgram,知乎等APP是用python写的.我也决定学习用python写APP.这里我们需要安装kivy. 环境:win7,python3.6 安装方式:DOS命令窗口 注意事项:目前不 ...

  2. LeetCode 26 Remove Duplicates from Sorted Array [Array/std::distance/std::unique] <c++>

    LeetCode 26 Remove Duplicates from Sorted Array [Array/std::distance/std::unique] <c++> 给出排序好的 ...

  3. 你不知道的JS之作用域和闭包(四)(声明)提升

    原文:你不知道的js系列 先有鸡还是先有蛋? 如下代码: a = 2; var a; console.log( a ); 很多开发者可能会认为结果会输出 undefined,因为 var a 在 a ...

  4. electron 打包后node_modules 体积过于庞大

    问题产生原因:过多无用的模块被打包放入到程序中 解决: 删除 package-lock.json ,是由于这个文件导致打包时候放入过多文件,删除即可.

  5. CASE WHEN 高阶用法?

    两个表做关联时,以左表为准,若左表某列不为空,则与右表对应列进行关联匹配,为空则不做匹配. 以上做法,有一种说不出来的感觉,不管怎样,问题是解决了. 如有更好的解决思路,请留言告知,不甚感激!

  6. 自学Python的经验之谈,学好Python的捷径

    其实python非常适合初学者入门.相比较其他不少主流编程语言,有更好的可读性,因此上手相对容易.自带的各种模块加上丰富的第三方模块,免去了很多“重复造轮子”的工作,可以更快地写出东西.配置开发环境也 ...

  7. [Swift]LeetCode72. 编辑距离 | Edit Distance

    Given two words word1 and word2, find the minimum number of operations required to convert word1 to  ...

  8. [Swift]LeetCode291. 单词模式 II $ Word Pattern II

    Given a pattern and a string str, find if strfollows the same pattern. Here follow means a full matc ...

  9. [Swift]LeetCode746. 使用最小花费爬楼梯 | Min Cost Climbing Stairs

    On a staircase, the i-th step has some non-negative cost cost[i] assigned (0 indexed). Once you pay ...

  10. 【dotNet Core】Swagger下简单的给WebApi分组

    Startup.cs下ConfigureServices代码 这里主要在DocInclusionPredicate控制输出那些api. Startup.cs下Configure代码 给Controll ...