软件世界网 购物 网址 三丰软件 | 小说 美女秀 图库大全 游戏 笑话 | 下载 开发知识库 新闻 开发 图片素材
多播视频美女直播
↓电视,电影,美女直播,迅雷资源↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
移动开发 架构设计 编程语言 Web前端 互联网
开发杂谈 系统运维 研发管理 数据库 云计算 Android开发资料
  软件世界网 -> 云计算 -> CentOS7上安装Zabbix(快速安装监控工具Zabbix) -> 正文阅读
云计算 最新文章
CentOS7上安装Zabbix(快速安装监控工具Zab
十分钟搭建NeuralStyle服务
solr入门之拼写纠错深入研究及代码Demo
3个netty5的例子,简单介绍netty的用法
RedhatOpenshift云平台注册使用
Akka框架——第一节:并发编程简介
Hadoop实战:Linux报tmp磁盘存储不足
linux安装thrift
感觉快更快规划计划高考韩国
solr相似匹配

[云计算]CentOS7上安装Zabbix(快速安装监控工具Zabbix)

  2016-04-03 20:46:31

前提要求(optional)


安装Zabbix监控工具前,先安装必要的运行工具包
yum install gcc gcc-c++ make openssl-devel curl wget net-snmp net-snmp-utils net-snmp-libs net-snmp-devel gnutls gnutls-devel libxml2 libxml2-devel

安装httpd

yum install httpd -y
#启动apache
systemctl start httpd

浏览你的安装主机http://{httpd_ip}/

Install MariaDB

yum install -y mariadb-server mariadb 

启动MariaDB,即MySQL服务。
systemctl start mariadb

设在MySQL的root属性:
 mysql_secure_installation
NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDED FOR ALL MariaDB
      SERVERS IN PRODUCTION USE!  PLEASE READ EACH STEP CAREFULLY!
In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none): 
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
Set root password? [Y/n] y ## Enter Y and press Enter
New password:   ## Enter new password
Re-enter new password:  ## Enter password again
Password updated successfully!
Reloading privilege tables..
 ... Success!
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] y  ## Enter Y and press Enter
 ... Success!
Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] y  ## Enter Y and press Enter
 ... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] y  ## Enter Y and press Enter
 - Dropping test database...
 ... Success!
 - Removing privileges on test database...
 ... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] y  ## Enter Y and press Enter
 ... Success!
Cleaning up...
All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!

安装PHP


安装php命令:
#最简单方法,如果想了解php构建过程,推荐手工打包安装
yum install -y php php-mysql php-gd php-pear 

测试是否安装成功:
    vi /var/www/html/testphp.php

<?php 
phpinfo(); 
?>

浏览php测试文件
http://{httpd_ip}/testphp.php

设置php配置属性:
post_max_size = 16M
max_execution_time = 300
max_input_time = 300
date.timezone = Asia/Shanghai
always_populate_raw_post_data = -1
具体的时区,可以参考 日期时区

安装Zabbix

#Configure the ZabbixZone package repository 
rpm --import http://repo.zabbix.com/RPM-GPG-KEY-ZABBIX
rpm -Uv  http://repo.zabbix.com/zabbix/2.4/rhel/7/x86_64/zabbix-release-2.4-1.el7.noarch.rpm 

#Install the necessary server packages 
yum install mysql-server zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java-gateway

设置zabbix
vi /etc/httpd/conf.d/zabbix.conf
#设置zabbix的时区
php_value date.timezone  **Asia/Shanghai**

systemctl restart httpd

创建MySQL的Zabbix数据已经导入数据库结构与数据
mysql -u root -p
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 10
Server version: 5.5.41-MariaDB MariaDB Server
Copyright (c) 2000, 2014, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> create database zabbix character set utf8;
Query OK, 1 row affected (0.05 sec)
MariaDB [(none)]> grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'password';
Query OK, 0 rows affected (0.21 sec)
MariaDB [(none)]> flush privileges;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> exit
Bye

导入数据
#download zabbix source code
wget http://sourceforge.net/projects/zabbix/files/ZABBIX\ Latest\ \Stable/2.4.5/zabbix-2.4.5.tar.gz

# 
tar xvf zabbix-2.4.5.tar.gz
cd zabbix-2.4.5
#导入数据
mysql -u zabbix -p zabbix < database/mysql/schema.sql
mysql -u zabbix -p zabbix < database/mysql/images.sql
mysql -u zabbix -p zabbix < database/mysql/data.sql

启动Zabbix
#If you use SELinux, run the following command to allow #Apache to communicate with Zabbix.
setsebool -P httpd_can_connect_zabbix=1

systemctl start zabbix-server
systemctl start zabbix-agent
systemctl restart httpd
systemctl restart mariadb

添加zabbix用户为Apache的www-data的系统用户组
# set the user
usermod -aG apache zabbix


cd /opt/zabbix-2.4.5
#setup the zabbix frontend php files
cp -rf frontends/php/* /var/www/html/
# restart apache
systemctl restart httpd.service

在浏览器上,设置Zabbix。






下载对应的文件或者修改对应目录下的模板文件。

登陆zabbix

NOTES: 设置系统默认启动:
systemctl enable httpd
systemctl enable mariadb
systemctl enable zabbix-server
systemctl enable zabbix-agent

上一篇文章           查看所有文章
2016-04-03 20:46:27  
360图书馆 论文大全 母婴/育儿 软件开发资料 网页快照 文字转语音 购物精选 软件 美食菜谱 新闻中心 电影下载 小游戏 Chinese Culture
生肖星座解梦 三沣玩客 拍拍 视频 开发 Android开发 站长 古典小说 网文精选 搜图网 天下美图 中国文化英文 多播视频 装修知识库
2017-1-17 3:16:16
多播视频美女直播
↓电视,电影,美女直播,迅雷资源↓
TxT小说阅读器
↓语音阅读,小说下载,古典文学↓
一键清除垃圾
↓轻轻一点,清除系统垃圾↓
图片批量下载器
↓批量下载图片,美女图库↓
  网站联系: qq:121756557 email:121756557@qq.com  软件世界网 --