zabbix安装官方文档中文版Word格式.docx
- 文档编号:4084902
- 上传时间:2023-05-02
- 格式:DOCX
- 页数:20
- 大小:425.22KB
zabbix安装官方文档中文版Word格式.docx
《zabbix安装官方文档中文版Word格式.docx》由会员分享,可在线阅读,更多相关《zabbix安装官方文档中文版Word格式.docx(20页珍藏版)》请在冰点文库上搜索。
∙SQLiteHeadersandLibraries.
∙SQLite头文件和库。
Usuallyprovidedaspartofmysql-dev,postgresql-dev,sqlite3-devpackages.
通常能够提供mysql-dev,postgresql-dev,sqlite3-dev包的一部分。
NET-SNMP(orUCD-SNMP)libraryandheaderfiles.RequiredforSNMPsupport.Optional.
Iksemellibraryandheaderfiles.RequiredtoenableJabbermessaging.Optional.
Libcurllibraryandheaderfiles.RequiredforWEBmonitoringmodule.Optional.
CCompiler.GNUCcompileristhebestchoiceforopenplatforms.Other(HP,IBM)Ccompilersmaybeusedaswell.
GNUMake.GNUMakeisrequiredtoprocessZabbixMakefiles.
4.2StructureofZabbixdistribution
Zabbix分布结构的
∙src
ThedirectorycontainssourcesforallZabbixprocessesexceptfrontends.
∙src/zabbix_server
ThedirectorycontainsMakefileandsourcesforzabbix_server.
∙src/zabbix_agent
ThedirectorycontainsMakefileandsourcesforzabbix_agentandzabbix_agentd.
∙src/zabbix_get
ThedirectorycontainsMakefileandsourcesforzabbix_get.
∙src/zabbix_sender
ThedirectorycontainsMakefileandsourcesforzabbix_sender.
∙include
ThedirectorycontainsZabbixincludefiles.
∙misc
omisc/init.d
Thedirectorycontainsstart-upscriptsfordifferentplatforms.
∙frontends
ofrontends/php
ThedirectorycontainsfilesofPHPfrontend.
∙create
ThedirectorycontainsSQLscriptforinitialdatabasecreation.
∙create/schema
Databasecreationschemas.
∙create/data
Dataforinitialdatabasecreation.
∙upgrades
ThedirectorycontainsupgradeproceduresfordifferentversionsofZabbix.
4.3ZabbixServer
Serverside
Step1
CreatetheZabbixsuperuseraccount
Thisistheusertheserverwillrunas.Forproductionuseyoushouldcreateadedicatedunprivilegedaccount('
zabbix'
iscommonlyused).RunningZabbixas'
root'
'
bin'
oranyotheraccountwithspecialrightsisasecurityrisk.Donotdoit!
Zabbixserverprocess(zabbix_server)isprotectedfrombeingrununderrootaccount.
IfZabbixserverandagentarerunonthesamemachineitisrecommendedtouseadifferentuserforrunningtheserverthanforrunningtheagent.Otherwise,ifbotharerunasthesameuser,theagentcanaccesstheserverconfigurationfileandanyAdminleveluserinZabbixcanquiteeasilyretrieve,forexample,thedatabasepassword.
Step2
ExtractZabbixsources
shell>
tar-zxfzabbix-1.8.tar.gz
Step3
CreatetheZabbixdatabase
ZabbixcomeswithSQLscriptsusedtocreatetherequireddatabaseschemaandalsotoinsertadefaultconfiguration.ThereareseparatescriptsforIBMDB2,MySQL,Oracle,PostgreSQLandSQLite.
ForMySQL:
mysql-u<
username>
-p<
password>
mysql>
createdatabasezabbixcharactersetutf8;
quit;
cdcreate/schema
catmysql.sql|mysql-u<
zabbix
cd../data
catdata.sql|mysql-u<
catimages_mysql.sql|mysql-u<
Step4
Configureandcompilethesourcecodeforyoursystem
Thesourcesmustbecompiledforboththeserver(monitoringmachine)aswellastheclients(monitoredmachines).Toconfigurethesourcefortheserver,youmustspecifywhichdatabasewillbeused.
./configure--enable-server--with-mysql--with-net-snmp--with-jabber--with-libcurl#forMySQL+Jabber+WEBmonitoring
However,ifyouwanttocompileclientbinariesalongwithserverbinaries,run:
./configure--enable-server--enable-agent--with-mysql--with-net-snmp--with-jabber--with-libcurl
Useflag--enable-statictostaticallylinklibraries.Ifyouplantodistributecompiledbinariesamongdifferentservers,youmustusethisflagtomakethesebinariesworkwithoutrequiredlibraries.Notethat--enable-staticdoesnotworkunderSolaris.
Step5
Makeandinstalleverything
makeinstall
Bydefault,makeinstallwillinstallallthefilesin/usr/local/sbin,/usr/local/libetc.Makesurethatyouhaveenoughpermissions.
Youcanspecifyaninstallationprefixotherthan/usr/localusing--prefix,forexample--prefix=/home/zabbix.Inthiscasedaemonbinarieswillbeinstalledunder<
prefix>
/sbin,whileutilitiesunder<
/bin.Manpageswillbeinstalledunder<
/share.
Step6
Configure/etc/services
Thestepisoptional.However,itisrecommended.Ontheclient(monitored)machines,addthefollowinglinesto/etc/services:
zabbix-agent10050/tcpZabbixAgent
zabbix-agent10050/udpZabbixAgent
zabbix-trapper10051/tcpZabbixTrapper
zabbix-trapper10051/udpZabbixTrapper
NotethattheportnumbersareofficialZabbixportsregisteredinIANA.
Step7
Configure/etc/inetd.conf
Ifyouplantousezabbix_agentinsteadoftherecommendedzabbix_agentd,thefollowinglinemustbeadded:
zabbix_agentstreamtcpnowait.3600zabbix/opt/zabbix/bin/zabbix_agent
Restartinetd
killall-HUPinetd
Modifydefaultsettingsinconfigurationfiles
Step8
Createalocationtoholdconfigurationfiles:
mkdir/etc/zabbix
Step9
Configure/etc/zabbix/zabbix_agentd.conf
Youneedtoconfigurethisfileforeveryhostwithzabbix_agentdinstalled.ThefileshouldcontaintheIPaddressoftheZabbixserver.Connectionsfromotherhostswillbedenied.Youmaytakemisc/conf/zabbix_agentd.confasexample.
Step10
Configure/etc/zabbix/zabbix_server.conf
Forsmallinstallations(uptotenmonitoredhosts),defaultparametersaresufficient.However,youshouldchangedefaultparameterstomaximizeperformanceofZabbix.Seesection[Performancetuning]formoredetails.Youmaytakemisc/conf/zabbix_server.confasexample.
Step11
Runserverprocesses
Runzabbix_serveronserverside.
cdsbin
./zabbix_server
Step12
Runagents
Runzabbix_agentdwherenecessary.
./zabbix_agentd
4.4ZabbixProxy
ZabbixProxyisaspecialprocess.ItisnotrequiredtorunZabbix.
ThisistheusertheProxywillrunas.Forproductionuseyoushouldcreateadedicatedunprivilegedaccount('
iscommonlyused).RunningZabbixProxyas'
'
ZabbixProxyprocess(zabbix_proxy)isprotectedfrombeingrununderrootaccount.
CreatetheZabbixdatabase.Optional.
ZabbixProxyprocesswillcreatedatabaseautomaticallyonthefirstrunifitdoesnotexist.Itwilluseexistingdatabaseotherwise.Databaseauto-creationissupportedforSQLiteonly.
ZabbixcomeswithSQLscriptsusedtocreatetherequireddatabaseschema.ThereareseparatescriptsforIBMDB2,MySQL,Oracle,PostgreSQLandSQLite.
ForIBMDB2:
db2"
createdatabasezabbixusingcodesetutf-8territoryuspagesize32768"
db2batch-dzabbix-fibm_db2.sql
ForOracle(weassumethatuser'
withpassword'
password'
existsandhaspermissionstocreatedatabaseobjects):
cdcreate/schema
catoracle.sql|sqlpluszabbix/password>
out.log
Checkfileout.logforanyerrormessages.ZabbixrequiresUTF8databasecharacterset.IfdatabaseisnotUTF8itcanbeconvertedbyrunning:
ALTERDATABASENATIONALCHARACTERSETUTF8;
ForPostgreSQL:
psql-U<
psql>
createdatabasezabbix;
\q
catpostgresql.sql|psql-U<
ForSQLite:
catsqlite.sql|sqlite3/var/lib/sqlite/zabbix.db
Thedatabasewillbeautomaticallycreatedifitdoesnotexist.
ThesourcesmustbecompiledtoenablecompilationofZabbixProxyprocess.ToconfigurethesourcefortheProxy,youmustspecifywhichdatabasewillbeused.
./configure--enable-proxy--with-ibm-db2--with-net-snmp#forIBMDB2+SNMPmonitoring
or
./configure--enable-proxy--with-mysql--with-net-snmp#forMySQL+SNMPmonitoring
./configure--enable-proxy--with-oracle--with-net-snmp#forOracle+SNMPmonitoring
./configure--enable-proxy--with-pgsql--with-net-snmp#forPostgreSQL+SNMPmonitoring
./configure--enable-proxy--with-sqlite3--with-net-snmp#forSQLite3+SNMPmonitoring
Useflag--with-ibm-db2tospecifylocationoftheCLIAPI.
Useflag--with-oracletospecifylocationoftheOCIAPI.
Useflag--enable-statictostaticallylinklibraries.Ifyouplantodistributecompiledbinariesamongdifferenthosts,youmustusethisflagtomakethesebinariesworkwithoutrequiredlibraries.--enable-staticdoesnotworkunderSolaris.Flag--with-ucd-snmpcanbeusedinsteadof--with-net-snmp.IfnoSNMPsupportrequired,both--with-net-snmpand--with-ucd-snmpmaybeskipped.
However,ifyouwanttocompileclientbinariesalongwithproxybinaries,run:
./configure--enable-proxy--enable-agent--with-mysql--with-net-snmp
Parameter--enable-staticmaybeusedtoforcestaticlinkage.
Makeandinstallevery
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- zabbix 安装 官方 文档 中文版
![提示](https://static.bingdoc.com/images/bang_tan.gif)