Compile and install zabbix 3.0 and separate deployment configurations

Source: Internet
Author: User
Tags ibm db2 import database iweb

Compile and install zabbix 3.0 and separate deployment configurations
Experimental System: CentOS 6.6 _ x86_64 prerequisites: Prepare the compiling environment in advance. Both firewall and selinux disable the experiment. Note: There are 4 hosts in this experiment. IP address and role allocation are shown in topology: http://pan.baidu.com/s/1bnnYiMr experiment topology used in the test of mariadb software: 1. Preparation 1. modify the hostname and hosts files to the following table: Description: mysql is the zabbix data storage host, server is the zabbix main service host, web is the zabbix front-end display host, and agent is the monitored host. Generally, these four roles can be set up on the same host and deployed separately in this experiment. 2. Synchronization time: ntpdate 192.168.70.21 // address write your own time server 2. Install mysql Server 1. Install mysql on mysql.jason.com Host:

tar xf mariadb-10.0.20-linux-x86_64.tar.gz  -C /usr/local/cd /usr/local/ln -sv mariadb-10.0.20-linux-x86_64 mysqluseradd -r mysqlmkdir -pv /mydata/datachown -R mysql.mysql /mydata/data/cd mysql/chown -R root.mysql .scripts/mysql_install_db --user=mysql --datadir=/mydata/data/cp support-files/my-large.cnf /etc/my.cnfcp support-files/mysql.server /etc/init.d/mysqldchkconfig --add mysqldchkconfig mysqld on

 

2. Edit the configuration file and start:
Vim/etc/my. cnf -----------------------------------------------> [mysqld] datadir =/mydata/data // Add this row <Alibaba service mysqld start

 

3. Create a zabbix database and an authorized user:
/usr/local/mysql/bin/mysql------------------------------------>CREATE DATABASE zabbix;GRANT ALL ON zabbix.* TO 'zabbix'@'192.168.19.%' IDENTIFIED BY '123456';GRANT ALL ON zabbix.* TO 'zabbix'@'localhost' IDENTIFIED BY '123456';GRANT ALL ON zabbix.* TO 'zabbix'@'mysql.jason.com' IDENTIFIED BY '123456';FLUSH PRIVILEGES;

 

4. Import database files:
Wget http://iweb.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Development/3.0.0alpha2/zabbix-3.0.0alpha2.tar.gztar xf zabbix-3.0.0alpha2.tar.gzcd zabbix-3.0.0alpha2/database/mysql // usr/local/mysql/bin/mysql-uzabbix-p123456 zabbix <schema. SQL // import order cannot be wrong/usr/local/mysql/bin/mysql-uzabbix-p123456 zabbix <images. SQL/usr/local/mysql/bin/mysql-uzabbix-p123456 zabbix <data. SQL

 

3. Install the Zabbix-Server 1. Compile and install zabbix on the server.jason.com Host:
yum -y install mysql-devel libxml2-devel net-snmp-devel libcurl-develwget http://iweb.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Development/3.0.0alpha2/zabbix-3.0.0alpha2.tar.gztar xf zabbix-3.0.0alpha2.tar.gzcd zabbix-3.0.0alpha2groupadd zabbixuseradd -g zabbix zabbix./configure --prefix=/usr/local/zabbix-server --enable-server --with-mysql --with-net-snmp --with-libcurl --with-libxml2make install

 

2. Edit the configuration file and start:
Mkdir/var/log/zabbixchown-R zabbix: zabbix/var/log/zabbixvim/usr/local/zabbix-server/etc/zookeeper> LogFile =/var/log/zabbix/logs = 192.168.19.66DBName = Signature = zabbixDBPassword = 123456 ListenIP = 127.0.0.1, 192.168.19.74 <users/usr/local/zabbix-server/sbin/zabbix_server-c/usr/local/zabbix-server/etc/zabbix_server.conf // start the service

 

Check the port and start listening. 4. Install Zabbix-Web Server 1. Install httpd and php on the web.jason.com Host:
yum -y install httpd php php-mysql libXpm php-bcmath php-gd php-mbstring php-xml t1libmkdir /var/www/html/zabbixwget http://iweb.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Development/3.0.0alpha2/zabbix-3.0.0alpha2.tar.gztar xf zabbix-3.0.0alpha2.tar.gzcd zabbix-3.0.0alpha2/frontends/php/cp -a . /var/www/html/zabbix/

 

2. Configure php and start httpd:
vim /etc/php.ini----------------------------------------->date.timezone = Asia/Shanghaipost_max_size = 16Mmax_execution_time = 300max_input_time = 300----------------------------------------->service httpd start

 

Access http: // 192.168.19.76/zabbix in a browser and follow the prompts to install:

The permission error is reported. Download the configuration file and save it to the/var/www/html/zabbix/conf/zabbix. conf. php file. If an error is returned after the configuration file is manually written, you can ignore it. Close the browser and re-open the connection. Log on to the admin account with the logon password zabbix:
Vim/var/www/html/zabbix/conf/zabbix. conf. php // manually write the configuration --------------------------------------------------------> <? Php // Zabbix GUI configuration file. global $ DB; $ DB ['type'] = 'mysql'; $ DB ['server'] = '2017. 168.19.66 '; $ DB ['Port'] = '0'; $ DB ['database'] = 'zabbix'; $ DB ['user'] = 'zabbix '; $ DB ['Password'] = '000000'; // Schema name. used for IBM DB2 and PostgreSQL. $ DB ['scheme'] = ''; $ ZBX_SERVER = '2017. 168.19.74 '; $ ZBX_SERVER_PORT = '000000'; $ ZBX_SERVER_NAME = ''; $ IMAGE_FORMAT_DEFAULT = IMAGE_FORMAT_PNG;?>

 

5. Install Zabbix-Agent on the agent.jason.com Host:
wget http://iweb.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Development/3.0.0alpha2/zabbix-3.0.0alpha2.tar.gztar xf zabbix-3.0.0alpha2.tar.gz cd zabbix-3.0.0alpha2groupadd zabbix-agentuseradd -g zabbix-agent zabbix-agent./configure --prefix=/usr/local/zabbix-agent --enable-agentmake install

 

2. Edit the configuration file:
mkdir /var/log/zabbixchown -R zabbix-agent:zabbix-agent /var/log/zabbix/vim /usr/local/zabbix-agent/etc/zabbix_agentd.conf------------------------------------------------------------>LogFile=/var/log/zabbix/zabbix_agentd.logServer=192.168.19.74ServerActive=192.168.19.74Hostname=agent.jason.comUser=zabbix-agent<------------------------------------------------------------/usr/local/zabbix-agent/sbin/zabbix_agentd -c /usr/local/zabbix-agent/etc/zabbix_agentd.conf

 

6. Here I will give a general demonstration of adding a host. The process may not be detailed:



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.