RedHat6(CentOS6)下Zabbix2安装

Zabbix的Server端安装

1.下载zabbix-2.4.5.tar.gz,我的是放到/home/zabbix目录下

2.解压zabbix-2.4.5.tar.gz,输入命令tar -xzvf zabbix-2.4.5.tar.gz

3.创建zabbix用户组、用户
groupadd zabbix
useradd -g zabbix zabbix

4.进入解压目录zabbix-2.4.5,我是安装到/home/zabbix/zabbix245 输入命令,
./configure --prefix=/home/zabbix/zabbix245/ --enable-server \
--enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2 --enable-java

make

make install

5.安装Mysql(我是直接用另一台服务器现有的Mysql),导入SQL脚本,/home/zabbix/zabbix-2.4.5/database/mysql

6.安装PHP(PHP+Nginx或者PHP+Apache,我是用PHP+Nginx),并配置php.ini
max_execution_time = 300
memory_limit = 128M
post_max_size = 16M
upload_max_filesize = 2M
max_input_time = 300
date.timezone = Asia/Shanghai

7.配置文件/home/zabbix/zabbix245/etc/zabbix_server.conf,
DBHost=10.16.70.58
DBName=zabbix
DBUser=root
DBPassword=123456
DBPort=3306

8.把/home/zabbix/zabbix-2.4.5/frontends/php目录,拷贝到PHP的web目录,我的是/home/nginx/nginx1999/html,并设置权限chown -R zabbix.zabbix /home/nginx/nginx1999/html/zabbix/

9.启动,/home/zabbix/zabbix245/sbin/zabbix_server(停止zabbix_server stop)

10.浏览器访问前端,初始化安装。账号admin,密码zabbix


Zabbix的Agent端安装

1.输入命令./configure --prefix=/home/zabbix/zabbixagent245/ --enable-agent
make
make install

2.配置文件/home/zabbix/zabbixagent245/zabbix_agentd.conf,指向Server端
Server=10.16.70.59
ServerActive=10.16.70.59

3.启动,输入命令/home/zabbix/zabbixagent245/sbin/zabbix_agentd(停止zabbix_agentd stop)

你可能感兴趣的:(zabbix)