码迷,mamicode.com
首页 > 其他好文 > 详细

zabbix Server 端安装

时间:2014-10-09 17:10:29      阅读:244      评论:0      收藏:0      [点我收藏+]

标签:server   linux   用户   

Zabbix server 安装配置文档

环境准备

Zabbix Server需要运行在CentOSRedHat LinuxDebainLinux系统上,这里以CentOS6作为部署环境,Root用户安装必须的包,建议配置好yum,通过yum安装下列包,解决包的依赖关系。

1)      LAMP(Linux+ Apache + Mysql + PHP)环境

yum installmysql-server httpd php

2)        安装依赖包

yum installmysql-devel net-snmp-devel OpenIPMI-devel openssl-develfping-devel libcurl-develperl-DBI php-gd php-mysql php-bcmath php-mbstring php-xml gcc

3)  可以到官网下载最新安装包

http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.3/zabbix-2.2.3.tar.gz

或者采用yum安装

http://repo.zabbix.com/zabbix/2.2/rhel/6/x86_64/红帽yum

安装步骤

1)创建zabbix用户和组

groupadd zabbix

useradd zabbix-g zabbix

2)创建数据库,添加授权账号

create databasezabbix character set utf8;

grant allprivileges on zabbix.* to zabbix@localhost identified by ‘zabbix‘;

3) 编译安装zabbix

tar xzf zabbix-2.2.3.tar.gz

cd zabbix-2.2.3

./configure  --prefix=/usr/local/zabbix  --enable-server  --enable-agent \

--with-mysql  --with-net-snmp  --with-libcurl

make  install

4)导入数据库

mysql -uzabbix-pzabbix -hlocalhost zabbix < database/mysql/schema.sql

mysql -uzabbix-pzabbix -hlocalhost zabbix < database/mysql/images.sql

mysql -uzabbix -pzabbix-hlocalhost zabbix < database/mysql/data.sql

5)修改配置文件

cpmisc/init.d/fedora/core/zabbix_server   /etc/init.d/

cpmisc/init.d/fedora/core/zabbix_agentd  /etc/init.d/

cp -Rfrontends/php /var/www/html/zabbix

sed -i‘s/^DBUser=.*$/DBUser=zabbix/g‘ /usr/local/zabbix/etc/zabbix_server.conf

sed -i‘s/^.*DBPassword=.*$/DBPassword=zabbix/g‘/usr/local/zabbix/etc/zabbix_server.conf

sed -i‘s/BASEDIR=\/usr\/local/BASEDIR=\/usr\/local\/zabbix/g‘/etc/init.d/zabbix_server

sed -i‘s/BASEDIR=\/usr\/local/BASEDIR=\/usr\/local\/zabbix/g‘/etc/init.d/zabbix_agentd

6)添加服务端口

cat>>/etc/services <<EOF

zabbix-agent10050/tcp Zabbix Agent

zabbix-agent10050/udp Zabbix Agent

zabbix-trapper10051/tcp Zabbix Trapper

zabbix-trapper10051/udp Zabbix Trapper

EOF

7)启动服务并开机启动

/etc/init.d/zabbix_serverstart

/etc/init.d/zabbix_agentdstart

echo"/etc/init.d/zabbix_server start" >> /etc/rc.local

echo"/etc/init.d/zabbix_agentd start" >> /etc/rc.local

8)修改php.ini

Vi /etc/php.ini

    memory_limit = 256M

    date.timezone = Asia/Shanghai

    post_max_size = 32M

    max_execution_time = 600

    upload_max_filesize = 16M

    max_input_time = 600

9web页面安装配置,打开浏览器输入http://zabbixserver ip地址/zabbix

确认每个Required都是ok的才会显示Next按钮,如果有Fail的需要完善系统要求

bubuko.com,布布扣

bubuko.com,布布扣

bubuko.com,布布扣

bubuko.com,布布扣

bubuko.com,布布扣

bubuko.com,布布扣

bubuko.com,布布扣

bubuko.com,布布扣

更换中文字体,登陆后在页面的右上边点击“Prefile

bubuko.com,布布扣

Language选项中选择“Chinesezh_CN)”,然后Save

bubuko.com,布布扣

 

 

 

 

 

 

 


本文出自 “常用文档” 博客,请务必保留此出处http://yujianglei.blog.51cto.com/7215578/1561575

zabbix Server 端安装

标签:server   linux   用户   

原文地址:http://yujianglei.blog.51cto.com/7215578/1561575

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!