CentOS 6.5 最小化安装zabbix

前端之家收集整理的这篇文章主要介绍了CentOS 6.5 最小化安装zabbix前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

CentOS 6.5最小化安装zabbix

安装EPEL

1
#rpm�Civhhttps://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm

服务端安装LAMP环境

1
#yum-yinstallgccgcc-c++autoconfhttpdPHPMysqLMysqL-serverPHP-MysqLhttpd-manualmod_sslmod_perlmod_auth_MysqLPHP-gdPHP-xmlPHP-mbstringPHP-ldapPHP-pearPHP-xmlrpcPHP-bcmathMysqL-connector-odbcMysqL-devellibdbi-dbd-MysqLnet-snmp-develcurl-develunixODBC-develOpenIPMI-develjava-devel

修改PHP配置文件

#vim/etc/PHP/ini

修改如下行:

947 date.timezone = Asia/Shanghai

440 max_execution_time = 300

449 max_input_time = 300

729 post_max_size = 32M

457 memory_limit = 128M

1588 mbstring.func_overload = 2

启动MysqLapache添加至开机自启动

1
2
3
4
#serviceMysqLdstart
#chkconfigMysqLdon
#servicehttpdstart
#chkconfighttpdon

安装zabbix

创建zabbix用户及组

2
#groupaddzabbix-g201
#useradd-gzabbix-u201-mzabbix

解压安装zabbix

2
#tarxfzabbix-2.0.8.tar.gz
#./configure--prefix=/usr/local--sysconfdir=/etc/zabbix--enable-server--enable-proxy--enable-agent--with-net-snmp--with-libcurl--with-openipmi--with-unixodbc--enable-java--with-MysqL=/usr/bin/MysqL_config

#make&&makeinstall

添加zabbix到系统服务文件

#vim/etc/services

文件尾部添加以下行

#zabbix

zabbix-agent 10050/tcp #Zabbix Agent

zabbix-agent 10050/udp #Zabbix Agent

zabbix-trapper 10051/tcp #Zabbix Trapper

zabbix-trapper 10051/udp #Zabbix Trapper

数据库

#MysqLadminpasswordzabbix
#MysqL-uroot-pzabbix

MysqL> create database zabbix characterset utf8;

MysqL> grant all on zabbix.* tozabbix@localhost identified by 'zabbix';

MysqL> flush privileges;

MysqL> quit

导入zabbix的表结构及数据

#cdzabbix-2.0.8/database/MysqL/
#MysqL-uzabbix-pzabbixzabbix<schema.sql
#MysqL-uzabbix-pzabbixzabbix<images.sql
#MysqL-uzabbix-pzabbixzabbix<data.sql

日志存放目录,并复制脚本

#mkdir/var/log/zabbix
#chownzabbix.zabbix/var/log/zabbix
#cpzabbix-2.0.8/misc/init.d/fedora/core/zabbix_*/etc/init.d/
#chmod755/etc/init.d/zabbix_*

配置zabbix服务端的配置文件

#vim/etc/zabbix/zabbix_server.conf

87 DBName=zabbix

102 DBUser=zabbix

113 DBPassword=zabbix

复制zabbix安装文件添加可执行的权限

#cp-rPHP/var/www/html/zabbix
#chown-Rapache.root/var/www/html/zabbix

启动zabbix_server添加开机自启动

#chkconfig--addzabbix_server
#chkconfig--addzabbix_agentd

#servicezabbix_serverstart

#chkconfigzabbix_serveron
原文链接:https://www.f2er.com/centos/378682.html

猜你在找的CentOS相关文章