(finishing) Zabbix One click in place script

Source: Internet
Author: User

A long time ago deployed Zabbix monitoring server, but with very little, today accidentally help the small partners in the group to solve the problem, and then went over the deployment process. In detail, there are a lot of places to pay attention to.


Before you can formally install the Zabbbix, you need to load the dependent software first.

#---------------install nginx 1.9.15-----------------------## install pcreif [ $ (rpm -qa|grep pcre.*.x86_64|wc -l)  -lt 1 ]; thenyum -y install  pcre*fi# install ssl supportif [ $ (RPM -QA|GREP OPENSSL.*.X86_64|WC  -L)  -lt 1 ]; thenyum -y install openssl*fi# install nginxcd  ~wget http://nginx.org/download/nginx-1.9.15.tar.gztar xf nginx-1.9.15.tar.gzcd  Nginx-1.9.15./configure --prefix=/usr/local/nginx-1.9.15 --with-http_ssl_module --with-http_ stub_status_module --with-pcremake && make install# list startup, restart command # start#/usr/ Local/nginx-1.9.15/sbin/nginx# stop#/usr/local/nginx-1.9.15/sbin/nginx -s stop# change  config#/usr/local/nginx-1.9.15/sbin/nginx -s reload#------------------------------------------ -------------#

The installation of PHP requires too much support to open, and is basically not fully remembered. Good memory than rotten pen, the following configuration file must be modified, or Zabbix installation process detection does not pass. The version I installed has 2 default values, so there is no need to change them.

#---------------install php 5.6.5-----------------------#yum  install gcc make  gd-devel libjpeg-devel libpng-devel libxml2 libxml2-devel bzip2-devel  libcurl-devel -ycd ~wget http://cn2.php.net/distributions/php-5.6.5.tar.gztar xf  php-5.6.5.tar.gzcd php-5.6.5./configure --prefix=/usr/local/php-5.6.5 --with-config-file-path=/ usr/local/php-5.6.5/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-bcmathmake && make install#edit configure filecp  Php.ini-production /usr/local/php-5.6.5/etc/php.inicp /usr/local/php-5.6.5/etc/php-fpm.conf.default  /usr/local/php-5.6.5/etc/php-fpm.confsed -i  ' S/max_execution_time = 30/max_execution _time = 300/'  /usr/local/php-5.6.5/etc/php.ini#sed -i  ' s/memory_limit =  128m/memory_limit = 128m/'  /usr/local/php-5.6.5/etc/php.ini#sed -i  ' s/upload_max_ filesize = 2m/upload_max_filesize = 2m/'  /usr/local/php-5.6.5/etc/php.inised -i   ' s/post_max_size = 8m/post_max_size = 16m/'  /usr/local/php-5.6.5/etc/php.inised  -i  ' S/max_input_time = 60/max_input_time = 300/'  /usr/local/php-5.6.5/etc/ php.inised -i  ' s/;d ate.timezone =/date.timezone = prc/'  /usr/local/php-5.6.5/etc /php.ini#start php-fpm/usr/local/php-5.6.5/sbin/php-fpm#-----------------------------------------------# 

Formally install Zabbix

#---------------install zabbix 2.2.2------------------#cd  ~wget http:// jaist.dl.sourceforge.net/project/zabbix/zabbix%20latest%20stable/2.2.2/zabbix-2.2.2.tar.gztar  zabbix-2.2.2.tar.gzcd zabbix-2.2.2 ./configure --prefix=/usr/local/zabbix-2.2/ -- enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurl -- with-libxl2make && make install#-----------------------------------------------# # Zabbix default does not run with root user #create user zabbixgroupadd zabbixuseradd -g zabbix zabbix# create default database zabbixuser=rootpassword=123456mysql -u$user -p$password  -e  "create database zabbix default charset utf8;" #if  proxy, just schema.sqlmysql -u$USER -p$PASSWORD zabbix <  database/mysql/schema.sqlmysql -u$user -p$password zabbix < database/mysql/images.sqlmysql -u$user -p$password zabbix < database/mysql/data.sql#config  Zabbix && startupcd /usr/bin/ln -s /usr/local/zabbix-2.2/sbin/zabbix_server  zabbix_servercp /usr/local/zabbix-2.2/etc/zabbix_server.conf /etc/zabbix_server.conf#  change zabbix_server.conf about db_config_informationssed -i  ' s/# DBHost= LOCALHOST/DBHOST=127.0.0.1/'  /etc/zabbix_server.confsed -i  ' s/# dbpassword=/dbpassword= ' "$ PASSWORD "'/'  /etc/zabbix_server.conf#sed -i  ' s/# dbsocket=/tmp/mysql.sock/dbsocket=/tmp/ mysql.sock/'  /etc/zabbix_server.conf#startsu zabbixzabbix_server -c /etc/zabbix_ Server.conf#stop#zabbix_server -c /etc/zabbix_server.conf stop


At this point, the installation started to complete, the browser opened Http://localhost/zabbix can be configured, according to the prompt configuration completed after the success.

System environment: CentOS 6.7 (final)

Basically this script, directly copy the past, modify the database password and (enable | remove) A few comments section can be used. The script has been uploaded to the Download Center, welcome to download. Where there is a mistake, I will not hesitate to correct it!

This article is from a "sense of direction" blog, be sure to keep this source http://itech.blog.51cto.com/192113/1770536

(finishing) Zabbix One click in place script

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.