zabbix2.0.3 安装与配置

本文涉及的产品
云数据库 RDS MySQL Serverless,0.5-2RCU 50GB
云数据库 RDS MySQL Serverless,价值2615元额度,1个月
简介:

1.zabbix安装环境准备

zabbix安装需要LAMP环境支持

采用yum源安装LAMP快速构建。

yum -y install httpd php php-devel php-gd php-bcmath php-mbstring mysql mysql-devel mysql-server php-xml php-mysql gd net-snmp net-snmp-devel net-snmp-utils curl-devel

安装后,启动mysql

 [root@zabbix111 ~]# /etc/init.d/mysqld start

Initializing MySQL database:  Installing MySQL system tables...

OK

Filling help tables...

OK

 

To start mysqld at boot time you have to copy

support-files/mysql.server to the right place for your system

 

PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !

To do so, start the server, then issue the following commands:

/usr/bin/mysqladmin -u root password 'new-password'

/usr/bin/mysqladmin -u root -h zabbix111 password 'new-password'

 

Alternatively you can run:

/usr/bin/mysql_secure_installation

 

which will also give you the option of removing the test

databases and anonymous user created by default.  This is

strongly recommended for production servers.

 

See the manual for more instructions.

 

You can start the MySQL daemon with:

cd /usr ; /usr/bin/mysqld_safe &

 

You can test the MySQL daemon with mysql-test-run.pl

cd mysql-test ; perl mysql-test-run.pl

 

Please report any problems with the /usr/bin/mysqlbug script!

 

The latest information about MySQL is available on the web at

http://www.mysql.com

Support MySQL by buying support/licenses at http://shop.mysql.com

                                                           [  OK  ]

Starting mysqld:                                           [  OK  ]

 

设置mysql密码

[root@zabbix111 ~]# /usr/bin/mysqladmin -u root password '123456'

创建zabbix数据库

[root@zabbix111 ~]# mysql -uroot -p123456

Welcome to the MySQL monitor.  Commands end with ; or \g.

Your MySQL connection id is 3

Server version: 5.0.95 Source distribution

 

Copyright (c) 2000, 2011, Oracle and/or its affiliates. All rights reserved.

 

Oracle is a registered trademark of Oracle Corporation and/or its

affiliates. Other names may be trademarks of their respective

owners.

 

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

 

mysql> create database zabbix;

Query OK, 1 row affected (0.06 sec)

 

创建zabbix用户与组

[root@zabbix111 ~]# groupadd zabbix

[root@zabbix111 ~]# useradd -g zabbix -m zabbix

解压zabbix

[root@zabbix111 ~]# tar zxvf zabbix-2.0.3.tar.gz

导入数据库到mysql

[root@zabbix111 ~]# cd zabbix-2.0.3/database/mysql/

[root@zabbix111 mysql]# mysql -uroot -p123456 zabbix <./schema.sql

[root@zabbix111 mysql]# mysql -uroot -p123456 zabbix <./images.sql

[root@zabbix111 mysql]# mysql -uroot -p123456 zabbix <./data.sql

2.编译安装zabbix

[root@zabbix111 mysql]# cd ../../

[root@zabbix111 zabbix-2.0.3]# ./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl

[root@zabbix111 zabbix-2.0.3]# make install

3.修改配置文件

[root@zabbix111 zabbix-2.0.3]# vi /etc/services

在最后增加

zabbix-agent    10050/tcp

zabbix-agent    10050/udp

zabbix-trapper  10051/tcp

zabbix-trapper  10051/udp

4.修改配置文件

服务端修改

[root@zabbix111 misc]# vi /usr/local/zabbix/etc/zabbix_server.conf

DBPassword=123456

本机客户端修改

[root@zabbix111 misc]# vi /usr/local/zabbix/etc/zabbix_agentd.conf

hostname=zabbix111   #主机名

 

[root@zabbix111 zabbix-2.0.3]# cd frontends/

[root@zabbix111 frontends]# cp -r php /var/www/html/zabbix

 

修改php配置文件

[root@zabbix111 frontends]# vi /etc/php.ini

date.timezone = Asia/Shanghai

max_execution_time = 300

max_input_time = 300

post_max_size = 32M

mbstring.func_overload = 2

修改完成后重启apache

[root@zabbix111 frontends]# service httpd restart

[root@zabbix111 frontends]# /etc/init.d/iptables stop #防火墙关闭

[root@zabbix111 frontends]# chkconfig iptables off

开机启动

[root@zabbix111 frontends]# chkconfig mysqld on

[root@zabbix111 frontends]# chkconfig httpd on

打开浏览器

wKiom1PZ3NqATfhOAAZka6IMT8k965.jpg

Next

wKioL1PZ3gTAILB3AANJq9Y9Tks719.jpg

Next

wKiom1PZ3Pyjt-N6AAJLgwHbFoo741.jpg

Next

wKioL1PZ3irRpOs_AAIEdpVvY3U528.jpg

Next

wKiom1PZ3SfiTqxCAAKCaoh0uRo758.jpg

Download下来放在/var/www/html/zabbix/conf目录下后面点击Retry后,在点击Finish

[root@zabbix111 frontends]# cd /var/www/html/zabbix/conf

 

用户名: admin  密码:zabbix 默认的

wKiom1PZ3UfgJwGOAAArgfSejdI137.jpg

说明zabbix服务没有启动

启动zabbix服务端

[root@zabbix111 conf]# /usr/local/zabbix/sbin/zabbix_server

 

启动zabbix客户端

[root@zabbix111 conf]# /usr/local/zabbix/sbin/zabbix_agentd

 

 


本文转自 jxzhfei  51CTO博客,原文链接:http://blog.51cto.com/jxzhfei/1533238


相关实践学习
基于CentOS快速搭建LAMP环境
本教程介绍如何搭建LAMP环境,其中LAMP分别代表Linux、Apache、MySQL和PHP。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
监控 安全 前端开发
zabbix5.0安装及配置
zabbix5.0安装及配置
zabbix5.0安装及配置
|
监控 前端开发 关系型数据库
ZABBIX4.4 安装及配置
ZABBIX4.4 安装及配置
ZABBIX4.4 安装及配置
|
监控 前端开发 关系型数据库
配置zabbix
zabbix是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案。
223 0
配置zabbix
|
监控
Zabbix snmptrap 配置
服务器通过snmptrap主动上报告警,在zabbix配置snmptrap监控也是很简单的。 1.登录被监控的设备的bmc管理系统配置snmptrap地址指向我们的zabbix服务器或代理服务器。
2062 0
|
监控 关系型数据库 MySQL
zabbix4.0安装配置及使用
zabbix4.0安装配置及使用
5853 0
|
编解码 监控 关系型数据库
|
监控 关系型数据库 MySQL
|
Web App开发 监控 关系型数据库
|
SQL 监控 关系型数据库