zabbix mounting (5)

In understanding " zabbix hardware, software requirements after," in your heart should have alternative machines. Today begin the installation zabbix . zabbix need LNMP or LAMP environment. The built environment is not within the scope of this chapter. LNMP environment configuration Linux installation: HTTP: //www.osyunwei.com/archives/1024.html NGINX installation : HTTP: //www.ttlsa.com/nginx/nginx-install-on-linux/ PHP installation + NGINX configuration : (be sure to look before installing 1.1 PHP installation parameters) http://www.ttlsa.com/nginx/nginx-php-5_5/ MYSQL installation : HTTP: //www.ttlsa.com/mysql/install-mysql5_6/ 1. PHP configuration parameters zabbix parameters have special requirements for PHP, PHP module. 1.1 PHP installation parameters Specific installation methods php above link, but special attention to the following modules plus bcmath --enable-bcmath mbstring --enable-mbstring sockets --enable-sockets gd --with-gd libxml --with-libxml-dir = / usr / local xmlwriter ditto ditto ctype xmlreader default default support gettext support session supported by default following is my PHP configuration parameters
./configure  --prefix=/usr/local/php-5.5.7 \
--with-config-file-path=/usr/local/php-5.5.7/etc --with-bz2 --with-curl \
--enable-ftp --enable-sockets --disable-ipv6 --with-gd \
--with-jpeg-dir=/usr/local --with-png-dir=/usr/local \
--with-freetype-dir=/usr/local --enable-gd-native-ttf \
--with-iconv-dir=/usr/local --enable-mbstring --enable-calendar \
--with-gettext --with-libxml-dir=/usr/local --with-zlib \
--with-pdo-mysql=mysqlnd --with-mysqli=mysqlnd --with-mysql=mysqlnd \
--enable-dom --enable-xml --enable-fpm --with-libdir=lib64 --enable-bcmath
1.2 PHP configuration parameter Open php.ini configuration file, modify the following parameters to the following values, or not zabbix installation.
 max_execution_time = 300
 memory_limit = 128M
 post_max_size = 16M
 upload_max_filesize = 2M
 max_input_time = 300
 date.timezone PRC
2 zabbix server installation 2.1 download and install zabbix All versions Download: http: //www.zabbix.com/download.php
# cd /usr/local/src
# wget "http://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.2/zabbix-2.2.2.tar.gz?r=http%3A%2F%2Fwww.zabbix.com%2Fdownload.php&ts=1395066528&use_mirror=jaist"
# tar -xzvf zabbix-2.2.2.tar.gz
# cd zabbix-2.2.2
# ./configure --prefix=/usr/local/zabbix-2.2.2/ --enable-server \
--enable-agent --with-mysql --with-net-snmp --with-libcurl --with-libxml2
# make
# make install
In general zabbix server act as two roles: server, angent, so the above configuration parameters are also added --enable-agent. Note: Please install the MySQL, snmp, curl development library. 2.2 Create a user for security reasons zabbix only ordinary users to run, if you call ttlsa current user, then you run him, he would run with ttlsa identity. But if you run zabbix in the root environment, then zabbix will actively use zabbix user to run. But if your system does not have the name zabbix users, you need to create a user, as follows: # groupadd zabbix # useradd -g zabbix zabbix 2.3 initialize the database zabbix server and proxy requires a database, angent not. In particular, it notes that proxy only need to import a sql file, and to import a total of 3 server sql file. When I was introduced to build a proxy of 3 sql, lead to error. However, they found only need to import a proxy table structure can be. I'd imagine that you installed the MySQL, the user name is root, password is ttlsapwd
# mysql -uroot -pttlsapwd
mysql> create database zabbix default charset utf8;
mysql> quit;
# mysql -uroot -pttlsapwd zabbix < database/mysql/schema.sql
If you just initialize proxy database, so enough. If the initialization server, then followed by introduction of the following two sql
# mysql -uroot -pttlsapwd zabbix < database/mysql/images.sql
# mysql -uroot -ppttlsapwd zabbix < database/mysql/data.sql
Other database (db2 \ sqlite \ oracle) database initialization method Reference: HTTPS: //www.zabbix.com/documentation/2.2/manual/appendix/install/db_scripts 2.4 Configuration zabbix configuration zabbix_server profile, zabbix source directory
# mkdir /etc/zabbix
# cp config/zabbix_server.conf /etc/zabbix/
# vim /etc/zabbix/zabbix_server.conf
DBName=zabbix
DBUser=root
DBPassword=ttlsapwd
DBPort=3306
2.5 start zabbix server
# /usr/local/zabbix-2.2.2/sbin/zabbix_server
The default port 10051 3. Client Installation Configuration 3.1 download and install the client all versions Download: http: //www.zabbix.com/download.php, you can download precompiled binaries, source code or can be installed.
# cd /usr/local/src
# wget "http://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.2/zabbix-2.2.2.tar.gz?r=http%3A%2F%2Fwww.zabbix.com%2Fdownload.php&ts=1395066528&use_mirror=jaist"
# tar -xzvf zabbix-2.2.2.tar.gz
# cd zabbix-2.2.2
# ./configure --prefix=/usr/local/zabbix-2.2.2/ --enable-agent
# make
# make install
3.2 zabbix client configuration Configuration zabbix_server configuration file, the source directory under zabbix
# mkdir /etc/zabbix
# cp config/zabbix_agentd.conf /etc/zabbix/
# vim /etc/zabbix/zabbix_agentd.conf
Server=127.0.0.1
ServerActive=127.0.0.1
Hostname=Zabbix server
Server and ServerActive which are designated IP address zabbixserver, the difference is that the former is passive latter is active. This means that Server is configured to allow the ip 127.0.0.1 to get my data. The meaning serverActive of 127.0.0.1 is that the client voluntarily submit data to him. do you understand? Why did it take the initiative and passive? Follow-up before we discuss this issue! 3.3 zabbix client starts
# /usr/local/zabbix-2.2.2/sbin/zabbix_agentd
The default port 10050 4. zabbix site configuration management 4.1 front-end file copy
# mkdir /data/logs/nginx
# mkdir /data/site/monitor.ttlsa.com/zabbix
# cp -rp frontends/php/* /data/site/monitor.ttlsa.com/zabbix
4.2 virtual host configuration modify your configuration file path accordingly
# vim /usr/local/nginx-1.5.8/conf/vhost/monitor.ttlsa.com.conf
server {
        listen       80;
        server_name monitor.ttlsa.com;
        access_log  /data/logs/nginx/monitor.ttlsa.com.access.log  main;

        index index.html index.php index.html;
        root /data/site/monitor.ttlsa.com;

        location /
        {
                try_files $uri $uri/ /index.php?$args;
        }

        location ~ ^(.+.php)(.*)$ {
                fastcgi_split_path_info ^(.+.php)(.*)$;
                include fastcgi.conf;
                fastcgi_pass  127.0.0.1:9000;
                fastcgi_index index.php;
                fastcgi_param  PATH_INFO          $fastcgi_path_info;
        }
}
4.3 Online Configuration zabbix browser opens http://monitor.ttlsa.com/zabbix. The following is zabbix 2.2 installation interface, a total of six steps including the welcome screen. 4.3.1 welcome screen [Caption ID = "attachment_5213" align = left = "alignnone" width = "565"] zabbix installation ZABBIX installation [/ Caption] 4.3.2 PHP requirements check [Caption ID = "attachment_5214" align = left = "alignnone" width = "557"] zabbix php environmental inspections ZABBIX environmental inspection PHP [/ Caption] 4.3.3 configure the MySQL [Caption ID = "attachment_5215" align = left = "alignnone" width = "553"] zabbix MySQL Configuration ZABBIX MySQL configuration [/ Caption] 4.3.4 ZABBIX server details [caption id = "attachment_5216" align = left = "alignnone" width = "550"] zabbix-detail ZABBIX-detail [/ Caption] 4.3.5 ZABBIX installation information list   [caption id = " zabbix pre-installation information 4.3.6 installation is complete if it fails, the general situation is zabbix not have write permissions for php [Caption the above mentioned id = "attachment_5218" align = left = "alignnone" width = "554"] zabbix installation is complete zabbix installation [/ caption] zabbix landing, the default user name: Admin, password: zabbix [Caption the above mentioned id = "attachment_5219" align = left = "alignnone" width = "554"] zabbix landing zabbix login [/ caption] The following are zabbix Home [caption id = "attachment_5220" align = "alignnone" width = "540" ] zabbix Home zabbix Home [/ Caption] 5. The end zabbix installation is relatively simple, but also more time consuming. In contrast, future long way to go. Please keep an eye operation and maintenance of our survival time zabbix tutorial series.

Reproduced in: https: //my.oschina.net/766/blog/210895

Guess you like

Origin blog.csdn.net/weixin_34060299/article/details/91547562