Zabbix-2.0.2最新版本安装测…
2015-05-30 11:30
169 查看
好文要顶!!!!!!!!!!!!原文地址:Zabbix-2.0.2最新版本安装测试作者:改变自己zabbix
2.0.2版本与1.8.3版本安装过程略有不同,下面为实施步骤:
服务端:192.168.1.13
客户端:192.168.1.19
1、安装LAMP环境及依赖包
[root@localhost ~]# yum
install mysql-server mysql-devel libcurl-devel net-snmp-devel php
php-gd php-xml php-mysql php-mbstring php-bcmath httpd
2、添加用户
[root@localhost ~]# groupadd
zabbix
[root@localhost ~]# useradd
zabbix -g zabbix
3、创建数据库,添加用户授权
[root@localhost ~]#
/etc/init.d/mysqld start
[root@localhost ~]# mysql -e
"create database zabbix character set utf8;"
[root@localhost ~]# mysql -e
"grant all privileges on zabbix.* to zabbix@localhost identified by
'111111';"
4、编译安装zabbix
[root@localhost ~]# cd
/usr/local/src/
[root@localhost src]# tar
zxf zabbix-2.0.2.tar.gz
[root@localhost src]# cd
zabbix-2.0.2
[root@localhost
zabbix-2.0.2]# ./configure --prefix=/usr/local/zabbix
--enable-server --enable-agent --with-mysql --with-net-snmp
--with-libcurl
[root@localhost
zabbix-2.0.2]# make install
5、导入数据库
[root@localhost
zabbix-2.0.2]# mysql -uzabbix -p'111111' zabbix <
database/mysql/schema.sql
[root@localhost
zabbix-2.0.2]# mysql -uzabbix -p'111111' zabbix <
database/mysql/images.sql
[root@localhost
zabbix-2.0.2]# mysql -uzabbix -p'111111' zabbix <
database/mysql/data.sql
6、拷贝、修改配置文件
[root@localhost
zabbix-2.0.2]# sed -i 's/^DBUser=.*$/DBUser=zabbix/g'
/usr/local/zabbix/etc/zabbix_server.conf
[root@localhost
zabbix-2.0.2]# sed -i 's/^.*DBPassword=.*$/DBPassword=111111/g'
/usr/local/zabbix/etc/zabbix_server.conf
[root@localhost
zabbix-2.0.2]# cp -r frontends/php /var/www/html/zabbix
[root@localhost
zabbix-2.0.2]# cp misc/init.d/fedora/core/zabbix_server
/etc/init.d/
[root@localhost
zabbix-2.0.2]# cp misc/init.d/fedora/core/zabbix_agentd
/etc/init.d/
[root@localhost
zabbix-2.0.2]#sed -i
's/BASEDIR=/usr/local/BASEDIR=/usr/local/zabbix/g'
/etc/init.d/zabbix_server
[root@localhost
zabbix-2.0.2]#sed -i
's/BASEDIR=/usr/local/BASEDIR=/usr/local/zabbix/g'
/etc/init.d/zabbix_agentd
7、添加服务端口
[root@localhost ~]# cat
>>/etc/services
<<EOF
>
zabbix-agent 10050/tcp Zabbix Agent
>
zabbix-agent 10050/udp Zabbix Agent
>
zabbix-trapper 10051/tcp Zabbix Trapper
>
zabbix-trapper 10051/udp Zabbix Trapper
>
EOF
8、修改php.ini
[root@localhost ~]#sed -i
's/^(.*)date.timezone =.*$/date.timezone = Asia/Shanghai/g'
/etc/php.ini
[root@localhost ~]#sed -i
's/^(.*)post_max_size =.*$/post_max_size = 16M/g'
/etc/php.ini
[root@localhost ~]#sed -i
's/^(.*)max_execution_time =.*$/max_execution_time = 300/g'
/etc/php.ini
[root@localhost ~]#sed -i
's/^(.*)max_input_time =.*$/max_input_time = 300/g'
/etc/php.ini
9、启动服务
[root@localhost ~]#
/etc/init.d/zabbix_server start
[root@localhost ~]#
/etc/init.d/zabbix_agentd start
[root@localhost ~]#
/etc/init.d/httpd start
10、WEB配置服务
http://192.168.128.11/zabbix
(1)首页
以下截图是在安装2.0.1版本的截图,2.0.2版本完全一致。
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(2)检查php环境
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(3)
数据库配置
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(4)主机IP,端口
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(5)预览配置
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(6)
配置Fail,点击Save configuration file将zabbix.conf.php保存到本地,再上传至服务器/var/www/html/zabbix/conf目录,然后Retry
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(7)刷新后配置正确,点击Finsh完成
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(8)登陆页面,默认用户名:admin
密码:zabbix
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(9)登陆首页
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(10)更换语言
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
更换中文后图像出现乱码解决方法:上传windows中文字体到服务器替换原字体。
[root@localhost ~]#cd /var/www/html/zabbix/fonts
[root@localhost ~]#mv DejaVuSans.ttf DejaVuSans.ttf_bak
#备份原字体
[root@localhost ~]#mv msyh.ttf DejaVuSans.ttf #雅黑字体
11、客户端安装,这次新版本采用源码安装
[root@localhost ~]# groupadd
zabbix
[root@localhost ~]# useradd
zabbix -g zabbix
[root@localhost ~]# cd
/usr/local/src/
[root@localhost src]# tar
zxf zabbix-2.0.2.tar.gz
[root@localhost src]# cd
zabbix-2.0.2
[root@localhost
zabbix-2.0.2]# ./configure --prefix=/usr/local/zabbix
--enable-agent
[root@localhost
zabbix-2.0.2]# make install
[root@localhost
zabbix-2.0.2]# cp misc/init.d/fedora/core/zabbix_agentd
/etc/init.d/
[root@localhost
zabbix-2.0.2]#sed -i
's/BASEDIR=/usr/local/BASEDIR=/usr/local/zabbix/g'
/etc/init.d/zabbix_agentd
[root@localhost
zabbix-2.0.2]# vi
/usr/local/zabbix/etc/zabbix_agentd.conf
Server=192.168.1.13
Hostname=Zabbix-client
[root@localhost
zabbix-2.0.2]# /etc/init.d/zabbix_agentd start
[root@localhost
zabbix-2.0.2]# tail -f /tmp/zabbix_agentd.log
2.0.2版本与1.8.3版本安装过程略有不同,下面为实施步骤:
服务端:192.168.1.13
客户端:192.168.1.19
1、安装LAMP环境及依赖包
[root@localhost ~]# yum
install mysql-server mysql-devel libcurl-devel net-snmp-devel php
php-gd php-xml php-mysql php-mbstring php-bcmath httpd
2、添加用户
[root@localhost ~]# groupadd
zabbix
[root@localhost ~]# useradd
zabbix -g zabbix
3、创建数据库,添加用户授权
[root@localhost ~]#
/etc/init.d/mysqld start
[root@localhost ~]# mysql -e
"create database zabbix character set utf8;"
[root@localhost ~]# mysql -e
"grant all privileges on zabbix.* to zabbix@localhost identified by
'111111';"
4、编译安装zabbix
[root@localhost ~]# cd
/usr/local/src/
[root@localhost src]# tar
zxf zabbix-2.0.2.tar.gz
[root@localhost src]# cd
zabbix-2.0.2
[root@localhost
zabbix-2.0.2]# ./configure --prefix=/usr/local/zabbix
--enable-server --enable-agent --with-mysql --with-net-snmp
--with-libcurl
[root@localhost
zabbix-2.0.2]# make install
5、导入数据库
[root@localhost
zabbix-2.0.2]# mysql -uzabbix -p'111111' zabbix <
database/mysql/schema.sql
[root@localhost
zabbix-2.0.2]# mysql -uzabbix -p'111111' zabbix <
database/mysql/images.sql
[root@localhost
zabbix-2.0.2]# mysql -uzabbix -p'111111' zabbix <
database/mysql/data.sql
6、拷贝、修改配置文件
[root@localhost
zabbix-2.0.2]# sed -i 's/^DBUser=.*$/DBUser=zabbix/g'
/usr/local/zabbix/etc/zabbix_server.conf
[root@localhost
zabbix-2.0.2]# sed -i 's/^.*DBPassword=.*$/DBPassword=111111/g'
/usr/local/zabbix/etc/zabbix_server.conf
[root@localhost
zabbix-2.0.2]# cp -r frontends/php /var/www/html/zabbix
[root@localhost
zabbix-2.0.2]# cp misc/init.d/fedora/core/zabbix_server
/etc/init.d/
[root@localhost
zabbix-2.0.2]# cp misc/init.d/fedora/core/zabbix_agentd
/etc/init.d/
[root@localhost
zabbix-2.0.2]#sed -i
's/BASEDIR=/usr/local/BASEDIR=/usr/local/zabbix/g'
/etc/init.d/zabbix_server
[root@localhost
zabbix-2.0.2]#sed -i
's/BASEDIR=/usr/local/BASEDIR=/usr/local/zabbix/g'
/etc/init.d/zabbix_agentd
7、添加服务端口
[root@localhost ~]# cat
>>/etc/services
<<EOF
>
zabbix-agent 10050/tcp Zabbix Agent
>
zabbix-agent 10050/udp Zabbix Agent
>
zabbix-trapper 10051/tcp Zabbix Trapper
>
zabbix-trapper 10051/udp Zabbix Trapper
>
EOF
8、修改php.ini
[root@localhost ~]#sed -i
's/^(.*)date.timezone =.*$/date.timezone = Asia/Shanghai/g'
/etc/php.ini
[root@localhost ~]#sed -i
's/^(.*)post_max_size =.*$/post_max_size = 16M/g'
/etc/php.ini
[root@localhost ~]#sed -i
's/^(.*)max_execution_time =.*$/max_execution_time = 300/g'
/etc/php.ini
[root@localhost ~]#sed -i
's/^(.*)max_input_time =.*$/max_input_time = 300/g'
/etc/php.ini
9、启动服务
[root@localhost ~]#
/etc/init.d/zabbix_server start
[root@localhost ~]#
/etc/init.d/zabbix_agentd start
[root@localhost ~]#
/etc/init.d/httpd start
10、WEB配置服务
http://192.168.128.11/zabbix
(1)首页
以下截图是在安装2.0.1版本的截图,2.0.2版本完全一致。
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(2)检查php环境
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(3)
数据库配置
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(4)主机IP,端口
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(5)预览配置
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(6)
配置Fail,点击Save configuration file将zabbix.conf.php保存到本地,再上传至服务器/var/www/html/zabbix/conf目录,然后Retry
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(7)刷新后配置正确,点击Finsh完成
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(8)登陆页面,默认用户名:admin
密码:zabbix
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(9)登陆首页
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
(10)更换语言
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
![](http://simg.sinajs.cn/blog7style/images/common/sg_trans.gif)
更换中文后图像出现乱码解决方法:上传windows中文字体到服务器替换原字体。
[root@localhost ~]#cd /var/www/html/zabbix/fonts
[root@localhost ~]#mv DejaVuSans.ttf DejaVuSans.ttf_bak
#备份原字体
[root@localhost ~]#mv msyh.ttf DejaVuSans.ttf #雅黑字体
11、客户端安装,这次新版本采用源码安装
[root@localhost ~]# groupadd
zabbix
[root@localhost ~]# useradd
zabbix -g zabbix
[root@localhost ~]# cd
/usr/local/src/
[root@localhost src]# tar
zxf zabbix-2.0.2.tar.gz
[root@localhost src]# cd
zabbix-2.0.2
[root@localhost
zabbix-2.0.2]# ./configure --prefix=/usr/local/zabbix
--enable-agent
[root@localhost
zabbix-2.0.2]# make install
[root@localhost
zabbix-2.0.2]# cp misc/init.d/fedora/core/zabbix_agentd
/etc/init.d/
[root@localhost
zabbix-2.0.2]#sed -i
's/BASEDIR=/usr/local/BASEDIR=/usr/local/zabbix/g'
/etc/init.d/zabbix_agentd
[root@localhost
zabbix-2.0.2]# vi
/usr/local/zabbix/etc/zabbix_agentd.conf
Server=192.168.1.13
Hostname=Zabbix-client
[root@localhost
zabbix-2.0.2]# /etc/init.d/zabbix_agentd start
[root@localhost
zabbix-2.0.2]# tail -f /tmp/zabbix_agentd.log
相关文章推荐
- 修改完善的写log文件的QTP脚…
- 梦想还是要有的,万一实现了呢(校招季)
- Android学习笔记--欢迎界面的实现
- HDOJ过河问题
- python中字典(Dictionary)用法实例详解
- libjingle源码分析之二:Thread和SocketServer
- 战略规划如何做好PESTEL分析
- 页面刷新
- HDOJ今年暑假不AC
- Android 开发服务类 02_NewsListServlet
- linux安装nginx
- CentOS 7做流程图软件
- js判断是否在微信浏览器中打开
- 爱迪生的第一项专利
- 第十三周阅读程序二
- 利用try-catch判断变量是已声明未声明还是未赋值
- 几种常用递归查询
- JAVA wait(), notify(),sleep使用
- selenium ide 自动化测试
- 利用typedef定义函数指针