Zabbix2.4.7安装

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Zabbix2.4.7安装相关的知识,希望对你有一定的参考价值。

所用系统Centos6.6

事先配置好本地镜像的yum源

准备zabbix依赖的rpm包(http://repo.zabbix.com/non-supported/rhel/6/x86_64/)

fping-2.4b2-16.el6.x86_64.rpm

iksemel-1.4-2.el6.x86_64.rpm

php-bcmath-5.3.3-38.el6.x86_64.rpm

php-mbstring-5.3.3-38.el6.x86_64.rpm

准备zabbix包(http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/)

            (zabbix-2.4.7-1.el6.x86_64.rpm

zabbix-server-2.4.7-1.el6.x86_64.rpm

zabbix-server-mysql-2.4.7-1.el6.x86_64.rpm

zabbix-web-2.4.7-1.el6.noarch.rpm

zabbix-web-mysql-2.4.7-1.el6.noarch.rpm)

安装lrzsz(安装后能用CRT,Xshell等工具将rpm包传到服务器中)

1、安装lamp

# yum install httpd mysql-server php -y

2、解决zabbix安装的依赖关系

1)zabbix官方提供的依赖包

# rpm -ivh iksemel-1.4-2.el6.x86_64.rpm 

# rpm -ivh fping-2.4b2-16.el6.x86_64.rpm

2)系统的依赖包

# yum install OpenIPMI-libs lm_sensors-libs net-snmp net-snmp-utils net-snmp-libs -y

# yum install unixODBC dejavu-fonts-common  dejavu-sans-fonts libXpm -y

# yum install php-gd php-mysql php-pdo php-xml -y

3)系统额外rpm包安装

# rpm -ivh php-bcmath-5.3.3-38.el6.x86_64.rpm

# rpm -ivh php-mbstring-5.3.3-38.el6.x86_64.rpm

3、安装zabbix-server

1)安装zabbix主包

# rpm -ivh zabbix-2.4.7-1.el6.x86_64.rpm

2)安装zabbix-server和zabbix-server-mysql(同时安装)

# rpm -ivh zabbix-server-mysql-2.4.7-1.el6.x86_64.rpm zabbix-server-2.4.7-1.el6.x86_64.rpm

3)安装zabbix-web和zabbix-web-mysql(同时安装)

# rpm -ivh zabbix-web-mysql-2.4.7-1.el6.noarch.rpm zabbix-web-2.4.7-1.el6.noarch.rpm

4)安装zabbix-get

# rpm -ivh zabbix-get-2.4.7-1.el6.x86_64.rpm

4、关闭selinux、iptables

# setenforce 0

# service iptables stop

# service ip6tables stop

# sed -i "s/SELINUX=enforcing/SELINUX=disable/g" /etc/selinux/config

5、设置特定主机名

# hostname zabbix.server

# echo "192.168.10.201 zabbix.server">> /etc/hosts

6、开启mysqld服务,并加入到开机启动列表中

# service mysqld start

# chkconfig mysqld on

6、操作数据库

1)进入数据库

# mysql

3)创建数据库

create database zabbix character set utf8;

4)新建用户和密码

insert into mysql.user(Host,User,Password)

values(‘localhost‘,‘zabbix‘,password(‘zabbix‘));

flush privileges;

5)允许账户能从本机访问数据库zabbix

grant all on zabbix.* to ‘zabbix‘@‘127.0.0.1‘ identified by ‘zabbix‘ with grant option;

grant all on zabbix.* to ‘zabbix‘@‘localhost‘ identified by ‘zabbix‘ with grant option;

flush privileges;

quit

6)导入数据库

# mysql -uzabbix -pzabbix

use zabbix;

source /usr/share/doc/zabbix-server-mysql-2.4.7/create/schema.sql;

source /usr/share/doc/zabbix-server-mysql-2.4.7/create/data.sql;

source /usr/share/doc/zabbix-server-mysql-2.4.7/create/images.sql;

quit

7、修改php配置文件(修改timezone),修改zabbix-server配置文件(修改DBpassword)

# sed -i "s#;date.timezone =#date.timezone=Asia\/Shanghai#g" /etc/php.ini

# sed -i "s/#\ DBPassword=/DBPassword=zabbix/g" /etc/zabbix/zabbix_server.conf

8、开启httpd,mysqld,zabbix-server服务,并加入控制列表,设置开机启动

1)开启服务

# service httpd start

# service zabbix-server start

2)加入开机启动列表中

# chkconfig httpd on

# chkconfig zabbix-server on


本文出自 “Linux个人总结” 博客,请务必保留此出处http://xuelinux.blog.51cto.com/9927651/1745012

以上是关于Zabbix2.4.7安装的主要内容,如果未能解决你的问题,请参考以下文章

zabbix2.4.7升级3.2.3

Zabbix Server Trapper远程代码执行漏洞(CVE-2017-2824)

Zabbix Server Active Proxy Trappe RCE 漏洞详解(CVE-2017-2824)

在Tomcat的安装目录下conf目录下的server.xml文件中增加一个xml代码片段,该代码片段中每个属性的含义与用途

PHP代码-psysh调试代码片段工具

MYSQL 5.7.9 开启慢查询日志