Refer to the zabbix-2.2.1 to create a server-side custom rpm method [memo] documentation, compile zabbix server-side
In addition, you can use the direct compilation method to install zabbix software.
Compilation prompt:
Zabbix-2.2.1 download location
Http://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.1/zabbix-2.2.1.tar.gz
Optional compilation parameters after decompression
. /Configure \ -- enable-server \ -- enable-proxy \ -- with-mysql =/install/mysql_config \ -- with-net-snmp \ -- with in your linux directory -libcurl \ -- with-libxml2 =/install xml2 directory under your computer // xml2-config \ -- with-iconv =/your computer install libiconv directory under/libiconv-1.14
Compilation Method
makemake install
Zabbix requires support for APACHE/NGINX PHP-5.3 mysql [lamp architecture configuration omitted]
Mysql configuration method
Authorized users (zabbix/mypasswd) to manage zabbix Databases
mysql> create database zabbix character set utf8;Query OK, 1 row affected (0.00 sec)mysql> grant all privileges on zabbix.* to 'zabbix'@'localhost' identified by 'mypasswd';Query OK, 0 rows affected (0.00 sec)mysql> grant all privileges on zabbix.* to 'zabbix'@'127.0.0.1' identified by 'mypasswd';Query OK, 0 rows affected (0.00 sec)mysql> grant all privileges on zabbix.* to 'zabbix'@'10.0.3.95' identified by 'mypasswd';Query OK, 0 rows affected (0.00 sec)mysql> flush privileges;Query OK, 0 rows affected (0.00 sec)
Import the following three files from $ ZABBIX_SOURCE/database/mysql to the database [in the following order]
mysql -u zabbix -pmypasswd zabbix < $ZABBIX_SOURCE/database/mysql/schema.sqlmysql -u zabbix -pmypasswd zabbix < $ZABBIX_SOURCE/database/mysql/images.sqlmysql -u zabbix -pmypasswd zabbix < $ZABBIX_SOURCE/database/mysql/data.sql
Php requirements must meet the following requirements:
max_execution_time 300memory_limit 128Mpost_max_size 16Mupload_max_filesize 2Mmax_input_time 300date.timezone = Asia/Chongqing
Web configuration method
The php files under the $ ZABBIX_SOURCE/frontends/PHP Directory under the zabbix source package are used to store the php files that support Web Page Management under the lamp architecture. For configuration, apahce and nginx directory configurations need to be configured for monitoring. For example: in the/www/zabbix directory, copy $ ZABBIX_SOURCE/frontends/php Data to/www/zabbix and start the web service.
Zabbix server startup
// Usr/locl/etc/zabbix_server.conf
NodeID = 0 [if it is used as an independent zabbix monitor, note that the value must be 0] LogFile =/var/log/zabbix/logs =/var/run/zabbix/logs = 1 DBHost = 10.0.3.96DBName = zabbixDBUser = zabbixDBPassword = mypasswdLogFile =/var/ logs/zabbix/zabbix_server.logDebugLevel = 4 [required for troubleshooting]
Zabbix server startup Method
cd /usr/local/zabbix/sbin./zabbix_server -c /usr/local/etc/zabbix/zabbix_server.conf
The zabbix server port is 10051.
Zabbix client Compilation Method
. /Configure \ -- enable-agent \ -- with-net-snmp \ -- with-libcurl \ -- with-libxml2 =/Under the directory where xml2 is installed on your computer/bin/xml2-config \ --- iconv =/your computer installation libiconv directory/libiconv-1.14
Compile and install
makemake install
Client configuration file
/Usr/local/etc/zabbix_agentd.conf
Hostname = station149.cloud.com Host Name of the current client Server = 127.0.0.1, 10.0.3.95, 192.168.86.171 defines the zabbix_server ip address logFile =/var/log/zabbix_agentd.logDebugLevel = 4 Include =/usr/local/etc/zabbix_params and other python clients whose own detection scripts are stored in Timeout = 30 enableRemoteCommands = 1 LogRemoteCommands = 1
Client startup Method
sudo -u terry /usr/local/sbin/zabbix_agentd -c /usr/local/etc/zabbix_agentd.conf
Zabbix_agentd default start port 10050
Detection Method
Run the following command on the server: [192.168.48.140 is the Client ip address]
cd /usr/local/bin./zabbix_get -s 192.168.48.140 -p 10050 -k "system.cpu.load[all,avg1]"0.030000./zabbix_get -s 192.168.48.140 -p 10050 -k "vm.memory.size[total]"8255102976
If everything is normal, you can enter the graphical interface for installation.
Http: // yourweb_url/zabbix
Make sure all the words on the right are OK.
Make sure the database test is successful.
Enter the ZABBIX server host name and port, locahost, or
Confirm the configuration again
ZABBIX will automatically generate the config. php configuration file. If it cannot be generated, a download link will be generated and you need to manually upload it to the web server/zabbix directory.
Log on to the admin/zabbix console as the administrator by default.
If the logon is successful, all zabbix installation processes are completed.