Description: Installs the Zabbix client in the WINDOWS_X64 system environment.
First, manual installation method
1. Procedure
The installer still uses the same package zabbix-2.2.5.tar.gz
Official Download Homepage:
http://www.zabbix.com/download.php
Here we download the same version as the server:
Http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.5/zabbix-2.2.5.tar.gz
After decompression, the zabbix-2.2.5\bin\win64\ will be
{Zabbix_agentd.exe,zabbix_get.exe,zabbix_sender.exe} Three programs are copied to the C:\zabbix\ directory.
2. Configuration
Place abbix-2.2.5\conf\zabbix_agentd.win.conf in C:\zabbix\ and rename to zabbix_agentd.conf
To modify the configuration file zabbix_agentd.conf:
Server=10.188.1.103hostname=ywzhou-pclistenip=10.188.1.172logfile=c:\zabbix\zabbix_ Agentd.logenableremotecommands=1unsafeuserparameters=1userparameter=tcpportlisten,c:\zabbix\ Discovertcpport.batuserparameter=servicestate,c:\zabbix\discoverservice.bat
Description: Server settings service-side ip,hostname and Listenip set the client name and IP; The bottom two are custom auto-listening ports and service scripts, as described later in this section
3. Installation
C:\zabbix>zabbix_agentd.exe--install-c "c:\zabbix\zabbix_agentd.conf" Zabbix_agentd.exe [6387]: Service [Zabbix Agent] Installed Successfullyzabbix_agentd.exe [6387]: Event source [Zabbix Agent] Installed successfullyc:\zabbix> Zabbix_agentd.exe--start-c "C:\zabbix\zabbix_agentd.cozabbix_agentd.exe [7260]: Service [Zabbix Agent] Started Successfully
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/53/8E/wKioL1Rq-JWABj-EAABzzSqdkKo082.jpg "title=" image. png "alt=" Wkiol1rq-jwabj-eaabzzsqdkko082.jpg "/>
Description: You need to run CMD as an administrator, otherwise the following error will be reported:
Zabbix_agentd.exe [2912]: Error:cannot Connect to Service Manager
4. Check
Check that the Zabbix Server service is started:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/53/90/wKiom1Rq-GWigIuyAAFIeUqdsFM908.jpg "title=" Qq20141118154028.png "alt=" Wkiom1rq-gwigiuyaafieuqdsfm908.jpg "/>
To view the running status:
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/53/90/wKiom1Rq-C6C0Y7LAAA81zegAeY340.jpg "title=" Qq20141118154059.png "alt=" Wkiom1rq-c6c0y7laaa81zegaey340.jpg "/>
Firewall to add inbound rules:
Windows Firewall with Advanced Security-inbound rules-new inbound rule-Port--tcp specific local port 10050--next--next--name zabbix--complete
650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/53/90/wKiom1Rq-TTzkC0pAAKOMS_rpSw151.jpg "title=" Qq20141118154531.png "alt=" Wkiom1rq-ttzkc0paakoms_rpsw151.jpg "/>
Second, automatic installation method
1. Write the automatic installation script
new C:\zabbix\zabbix_agent_install_for_windows.bat, right click on File selection edit:
@echo offfor /f "tokens=2 delims=:" %%b in (' ipconfig^|find /i ' IP "^|find /i " IPv4 "^|find /i " 10.188.1. " do set fsip=%%bset fsip=%fsip: =%echo modiy configecho listenip=%fsip % >> c:\zabbix\zabbix_agentd.confecho hostname=%computername% >> c:\ Zabbix\zabbix_agentd.confecho copy start filemkdir c:\zabbix\binif exist %windir %\syswow64 (set system_bit=64) else set system_bit=32if %system_bit% equ 64 copy /y C:\zabbix\win64 C:\zabbix\binif %system_bit% EQU 32 Copy /y c:\zabbix\win32 c:\zabbix\binecho install zabbix servicenet stop "Zabbix agent" sc delete "Zabbix agent" c:\zabbix\bin\zabbix_agentd.exe -i - C c:\zabbix\zabbix_agentd.confecho start zabbix servicenet start "Zabbix agent" echo set zabbix service autosc config "Zabbix agent" start= autoecho open firewall for zabbixnetsh advfirewall firewall add rule name= "Zabbix" dir=in program= "c:\zabbix\bin\ Zabbix_agentd.exe " action=allowpause
Script Explanation:
First, the network card ip will be searched to find 10.188.1. The IP and computer names are inserted into the configuration file;
Then create the folder C:\zabbix\bin, through the conditional judgment statement automatically according to the number of system bits to copy the corresponding program into the bin;
Then stop the Zabbix Agent service and remove the service, this is to prevent the service has been installed, convenient for reloading;
Then zabbix_agentd.exe-i to install, net start, and set to start automatically;
Finally, the firewall rule is added, pause pauses so that the administrator can observe the installation process.
2. Create a configuration file
Create a new configuration file c:\zabbix\zabbix_agentd.conf, as follows:
logfile=c:\zabbix\zabbix_agentd.logserver=10.188.1.103enableremotecommands=1unsafeuserparameters= 1userparameter=tcpportlisten,c:\zabbix\discovertcpport.batuserparameter=servicestate,c:\zabbix\ Discoverservice.bat
Note: Only server-side IP is specified here, and the client's hostname and LISTENIP will be added automatically through the installation script.
3. Zabbix folder Directory
Description: Download the package zabbix-2.2.5.tar.gz decompression, the Zabbix-2.2.5\bin in Win32 and Win64 two folders copied to c:\zabbix\;
The entire Zabbix directory file as follows, backup a copy, need to client installation, copy Zabbix folder past, double-click the installation script can:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/53/8E/wKioL1Rq_H2wPh5RAAKMCsqdmQQ287.jpg "style=" float: none; "title=" Image 14.png "alt=" Wkiol1rq_h2wph5raakmcsqdmqq287.jpg "/>
4. Perform installation configuration
Double-click the Zabbix_agent_install_for_windows.bat file to perform an automatic installation:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/53/90/wKiom1Rq_AfASYtyAAJi70vWnnU789.jpg "style=" float: none; "title=" Image 15.png "alt=" Wkiom1rq_afasytyaaji70vwnnu789.jpg "/>
5. Inspection results
If executed more than once, the configuration information is repeatedly inserted in the configuration file, and additional deletions are made:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/53/8E/wKioL1Rq_H3DAdcCAAGjftlg4cc690.jpg "style=" float: none; "title=" Image 16.png "alt=" Wkiol1rq_h3dadccaagjftlg4cc690.jpg "/>
View Services:
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/53/90/wKiom1Rq_AiA8g5vAAF35keC9fY489.jpg "style=" float: none; "title=" Image 17.png "alt=" Wkiom1rq_aia8g5vaaf35kec9fy489.jpg "/>
View firewall rules, auto-generated, not the same as the manual installation method.
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/53/8E/wKioL1Rq_H2itYfpAADkEcwz2r4641.jpg "style=" float: none; "title=" Image 18.png "alt=" Wkiol1rq_h2ityfpaadkecwz2r4641.jpg "/>
Conclusion: Automatic installation is very convenient and quick, need to have a certain understanding of the cmd command, the whole process should be noted that the IP address according to your network environment to modify.
This article is from the "Moon Ching Xing Fei" blog, please be sure to keep this source http://ywzhou.blog.51cto.com/2785388/1579165
Zabbix Installation (iv): Zabbix Agent for Windows