zabbix安装配置.docx

上传人:b****4 文档编号:11353745 上传时间:2023-05-31 格式:DOCX 页数:15 大小:424.91KB
下载 相关 举报
zabbix安装配置.docx_第1页
第1页 / 共15页
zabbix安装配置.docx_第2页
第2页 / 共15页
zabbix安装配置.docx_第3页
第3页 / 共15页
zabbix安装配置.docx_第4页
第4页 / 共15页
zabbix安装配置.docx_第5页
第5页 / 共15页
zabbix安装配置.docx_第6页
第6页 / 共15页
zabbix安装配置.docx_第7页
第7页 / 共15页
zabbix安装配置.docx_第8页
第8页 / 共15页
zabbix安装配置.docx_第9页
第9页 / 共15页
zabbix安装配置.docx_第10页
第10页 / 共15页
zabbix安装配置.docx_第11页
第11页 / 共15页
zabbix安装配置.docx_第12页
第12页 / 共15页
zabbix安装配置.docx_第13页
第13页 / 共15页
zabbix安装配置.docx_第14页
第14页 / 共15页
zabbix安装配置.docx_第15页
第15页 / 共15页
亲,该文档总共15页,全部预览完了,如果喜欢就下载吧!
下载资源
资源描述

zabbix安装配置.docx

《zabbix安装配置.docx》由会员分享,可在线阅读,更多相关《zabbix安装配置.docx(15页珍藏版)》请在冰点文库上搜索。

zabbix安装配置.docx

zabbix安装配置

Zabbix

一安装配置:

环境搭建:

ØVMware®Workstation12Pro(12.0.0build-2985596)

ØCentOS-7-x86_64-DVD-1511.iso(user:

rootpassword:

toor00)

Øzabbix-3.0.3.tar

安装过程:

Installationfromsources

YoucangettheverylatestversionofZabbixbycompilingitfromthesources.

Astep-by-steptutorialforinstallingZabbixfromthesourcesisprovidedhere.

1InstallingZabbixdaemons

1Downloadthesourcearchive

GototheZabbixdownloadpageanddownloadthesourcearchive.Oncedownloaded,extractthesources,byrunning:

$tar-zxvfzabbix-3.0.0.tar.gz

EnterthecorrectZabbixversioninthecommand.Itmustmatchthenameofthedownloadedarchive.

2Createuseraccount

ForalloftheZabbixdaemonprocesses,anunprivilegeduserisrequired.IfaZabbixdaemonisstartedfromanunprivilegeduseraccount,itwillrunasthatuser.

However,ifadaemonisstartedfroma'root'account,itwillswitchtoa'zabbix'useraccount,whichmustbepresent.Tocreatesuchauseraccount(initsowngroup,“zabbix”)onLinuxsystems,run:

groupaddzabbix

useradd-gzabbixzabbix

AseparateuseraccountisnotrequiredforZabbixfrontendinstallation.

IfZabbixserverandagentarerunonthesamemachineitisrecommendedtouseadifferentuserforrunningtheserverthanforrunningtheagent.Otherwise,ifbotharerunasthesameuser,theagentcanaccesstheserverconfigurationfileandanyAdminleveluserinZabbixcanquiteeasilyretrieve,forexample,thedatabasepassword.

RunningZabbixasroot,bin,oranyotheraccountwithspecialrightsisasecurityrisk.

3CreateZabbixdatabase

ForZabbixserverandproxydaemons,aswellasZabbixfrontend,adatabaseisrequired.ItisnotneededtorunZabbixagent.

SQLscriptsareprovidedforcreatingdatabaseschemaandinsertingthedataset.ZabbixproxydatabaseneedsonlytheschemawhileZabbixserverdatabaserequiresalsothedatasetontopoftheschema.

HavingcreatedaZabbixdatabase,proceedtothefollowingstepsofcompilingZabbix.

4Configurethesources

WhenconfiguringthesourcesforaZabbixserverorproxy,youmustspecifythedatabasetypetobeused.Onlyonedatabasetypecanbecompiledwithaserverorproxyprocessatatime.

Toseeallofthesupportedconfigurationoptions,insidetheextractedZabbixsourcedirectoryrun:

./configure--help

ToconfigurethesourcesforaZabbixserverandagent,youmayrunsomethinglike:

./configure--enable-server--enable-agent--with-mysql--enable-ipv6--with-net-snmp--with-libcurl--with-libxml2

ac_default_prefix=/usr/local

ac_default_prefix=/usr/local/bin

--with-libcurlconfigurationoptionwithcURL7.20.0orhigherisrequiredforSMTPauthentication,supportedsinceZabbix3.0.0.

--with-libcurland--with-libxml2configurationoptionsarerequiredforvirtualmachinemonitoring,supportedsinceZabbix2.2.0.

ToconfigurethesourcesforaZabbixserver(withPostgreSQLetc.),youmayrun:

./configure--enable-server--with-postgresql--with-net-snmp

ToconfigurethesourcesforaZabbixproxy(withSQLiteetc.),youmayrun:

./configure--prefix=/usr--enable-proxy--with-net-snmp--with-sqlite3--with-ssh2

ToconfigurethesourcesforaZabbixagent,youmayrun:

./configure--enable-agent

Youmayusethe--enable-staticflagtostaticallylinklibraries.Ifyouplantodistributecompiledbinariesamongdifferentservers,youmustusethisflagtomakethesebinariesworkwithoutrequiredlibraries.Notethat--enable-staticdoesnotworkunderSolaris.

Using--enable-staticoptionisnotrecommendedwhenbuildingserver.

Inordertobuildtheserverstaticallyyoumusthaveastaticversionofeveryexternallibraryneeded.Thereisnostrictcheckforthatinconfigurescript.

Command-lineutilitieszabbix_getandzabbix_senderarecompiledif--enable-agentoptionisused.

Use--with-ibm-db2flagtospecifylocationoftheCLIAPI.

Use--with-oracleflagtospecifylocationoftheOCIAPI.

ForencryptionsupportseeCompilingZabbixwithencryptionsupport

5Makeandinstalleverything

IfinstallingfromSVN,itisrequiredtorunfirst:

$makedbschema

makeinstall

Thisstepshouldberunasauserwithsufficientpermissions(commonly'root',orbyusingsudo).

Runningmakeinstallwillbydefaultinstallthedaemonbinaries(zabbix_server,zabbix_agentd,zabbix_proxy)in/usr/local/sbinandtheclientbinaries(zabbix_get,zabbix_sender)in/usr/local/bin.

Tospecifyadifferentlocationthan/usr/local,usea--prefixkeyinthepreviousstepofconfiguringsources,forexample--prefix=/home/zabbix.Inthiscasedaemonbinarieswillbeinstalledunder/sbin,whileutilitiesunder/bin.Manpageswillbeinstalledunder/share.

6Reviewandeditconfigurationfiles

edittheZabbixagentconfigurationfile/usr/local/etc/zabbix_agentd.conf

Youneedtoconfigurethisfileforeveryhostwithzabbix_agentdinstalled.

YoumustspecifytheZabbixserverIPaddressinthefile.Connectionsfromotherhostswillbedenied.

edittheZabbixserverconfigurationfile/usr/local/etc/zabbix_server.conf

Youmustspecifythedatabasename,userandpassword(ifusingany).

 

WithSQLitethefullpathtodatabasefilemustbespecified;DBuserandpasswordarenotrequired.

Therestoftheparameterswillsuityouwith

theirdefaultsifyouhaveasmallinstallation(uptotenmonitoredhosts).YoushouldchangethedefaultparametersifyouwanttomaximizetheperformanceofZabbixserver(orproxy)though.Seetheperformancetuningsectionformoredetails.

ifyouhaveinstalledaZabbixproxy,edittheproxyconfigurationfile/usr/local/etc/zabbix_proxy.conf

YoumustspecifytheserverIPaddressandproxyhostname(mustbeknowntotheserver),aswellasthedatabasename,userandpassword(ifusingany).

WithSQLitethefullpathtodatabasefilemustbespecified;DBuserandpasswordarenotrequired.

7Startupthedaemons

Runzabbix_serverontheserverside.

shell>zabbix_server

Makesurethatyoursystemallowsallocationof36MB(orabitmore)ofsharedmemory,otherwisetheservermaynotstartandyouwillsee“Cannotallocatesharedmemoryfor.”intheserverlogfile.ThismayhappenonFreeBSD,Solaris8.

Seethe"Seealso"sectionatthebottomofthispagetofindouthowtoconfiguresharedmemory.

Runzabbix_agentdonallthemonitoredmachines.

shell>zabbix_agentd

Makesurethatyoursystemallowsallocationof2MBofsharedmemory,otherwisetheagentmaynotstartandyouwillsee“Cannotallocatesharedmemoryforcollector.”intheagentlogfile.ThismayhappenonSolaris8.

IfyouhaveinstalledZabbixproxy,runzabbix_proxy.

shell>zabbix_proxy

2InstallingZabbixwebinterface

CopyingPHPfiles

ZabbixfrontendiswritteninPHP,sotorunitaPHPsupportedwebserverisneeded.InstallationisdonebysimplycopyingthePHPfilesfromfrontends/phptothewebserverHTMLdocumentsdirectory.

CommonlocationsofHTMLdocumentsdirectoriesforApachewebserversinclude:

/usr/local/apache2/htdocs(defaultdirectorywheninstallingApachefromsource)

/srv/www/htdocs(OpenSUSE,SLES)

/var/www/html(Fedora,RHEL,CentOS)

/var/www(Debian,Ubuntu)

ItissuggestedtouseasubdirectoryinsteadoftheHTMLroot.TocreateasubdirectoryandcopyZabbixfrontendfilesintoit,executethefollowingcommands,replacingtheactualdirectory:

mkdir/zabbix

cdfrontends/php

cp-a./zabbix

IfinstallingfromSVNandplanningtouseanyotherlanguagethanEnglish,youmustgeneratetranslationfiles.Todoso,run:

locale/make_mo.sh

msgfmtutilityfromgettextpackageisrequired.

Additionally,touseanyotherlanguagethanEnglish,itslocaleshouldbeinstalledonthewebserver.Seethe"Seealso"sectioninthe“Userprofile”pagetofindouthowtoinstallitifrequired.

Installingfrontend

Step1

Inyourbrowser,openZabbixURL:

Youshouldseethefirstscreenofthefrontendinstallationwizard.

Step2

Makesurethatallsoftwareprerequisitesaremet.

通过修改/etc/php.ini

  post_max_size=16M

  max_execution_time=300

  max_input_time=300

  date.timezone=PRC

post_max_size=32M

时区问题:

修改php.ini文件,查找;date.timezone=,把前面的分号去掉在“=”后面加上时区。

 

比如:

Asia/Chongqing(重庆),Asia/Shanghai(上海),Asia/Urumqi(乌鲁木齐),Asia/Macao(澳门),Asia/Hong_Kong(香港),Asia/Taipei(台北),PRC 

例 

;date.timezone= 

改成:

 

date.timezone=Asia/Shanghai 

Pre-requisite

Minimumvalue

Description

PHPversion

5.4.0

PHPmemory_limitoption

128MB

Inphp.ini:

memory_limit=128M

PHPpost_max_sizeoption

16MB

Inphp.ini:

post_max_size=16M

PHPupload_max_filesizeoption

2MB

Inphp.ini:

upload_max_filesize=2M

PHPmax_execution_timeoption

300seconds(values0and-1areallowed)

Inphp.ini:

max_execution_time=300

PHPmax_input_timeoption

300seconds(values0and-1areallowed)

Inphp.ini:

max_input_time=300

PHPsession.auto_startoption

mustbedisabled

Inphp.ini:

session.auto_start=0

Databasesupport

Oneof:

IBMDB2,MySQL,Oracle,PostgreSQL,SQLite

Oneofthefollowingmodulesmustbeinstalled:

ibm_db2,mysql,oci8,pgsql,sqlite3

bcmath

php-bcmath

mbstring

php-mbstring

PHPmbstring.func_overloadoption

mustbedisabled

Inphp.ini:

mbstring.func_overload=0

PHPalways_populate_raw_post_dataoption

mustbedisabled

RequiredonlyforPHPversions5.6.0ornewer.

Inphp.ini:

always_populate_raw_post_data=-1

sockets

php-net-socket.Requiredforuserscriptsupport.

gd

2.0orhigher

php-gd.PHPGDextensionmustsupportPNGimages(--with-png-dir),JPEG(--with-jpeg-dir)imagesandFreeType2(--with-freetype-dir).

libxml

2.6.1

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 自然科学 > 物理

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2