[Blog recommendations] CentOS6.6 + Puppet3.7.3 distributed deployment of Zabbix2.4 Monitoring System (1)

Source: Internet
Author: User
Tags import database

[Blog recommendations] CentOS6.6 + Puppet3.7.3 distributed deployment of Zabbix2.4 Monitoring System (1)

This blog post is from the Bkjia blog redking blogger. If you have any questions, go to the blog page for an interactive discussion!
Blog: http://redking.blog.51cto.com/27212/1604984

OS:CentOS-6.6-x86_64(Minimal)Puppet 3.7.3Zabbix 2.4Puppet/Zabbix master: master/zabbix.redking.comPuppet/Zabbix agent:  agent1~5.redking.com

Puppet Installation

1. Install puppet-server on the server

Puppet is not in the basic CentOS source. You must add the official sources provided by PuppetLabs. The Puppet Master server installs puppet-server and automatically matches related dependent packages such as Facter installation.

[root@master ~]# rpm -ivh http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-7.noarch.rpm[root@master ~]# yum install -y puppet-server[root@master ~]# chkconfig puppetmaster on[root@master ~]# service puppetmaster start

2. Install puppet on the client

[root@agent ~]# rpm -ivh http://yum.puppetlabs.com/el/6/products/x86_64/puppetlabs-release-6-7.noarch.rpm[root@agent ~]# yum install -y puppet[root@agent ~]# chkconfig puppet on[root@agent ~]# service puppet start

Puppet Master server configuration

1. Configure Automatic Authentication

Allow hosts in all redking.com domains to issue certificates automatically. Create the autosign. conf file.

[root@master ~]# cat > /etc/puppet/autosign.conf <<EOF> *.redking.com> EOF[root@master ~]#

Puppet Agent client Configuration

1. Modify the main configuration file puppet. conf of the client to add listeners and specify server domain names.

[root@agent ~]# vim /etc/puppet/puppet.conf [agent]        listen = true        server = master.redking.com

Puppet Testing

In this way, we can use Puppet to manage Puppet, manage all puppet clients by configuring puppet modules, and apply the configuration file to all servers.

The client needs to send a request to the server for the server to manage the client. this is actually a process of issuing certificates. when you run the puppet client for the first time, an SSL certificate is generated and sent to the Puppet server. If the server agrees to manage the client, the certificate is issued. You can use this command to issue the certificate, because we have set the server address on the client, we do not need to contact the server address.

[root@agent ~]# puppet agent --test

To learn more about the registration process and daily troubleshooting, you can add parameters.

-No-daemonize foreground output log

-Verbose: enter more detailed logs.

-Debug more detailed logs, used in troubleshooting

-Test indicates the test. You can use the-test parameter.

[root@agent ~]# puppet agent --no-daemonize --onetime --verbose --debug

Server View certificate issuance Information

[root@master ~]# puppet cert list --all

Zabbix Server Installation

1. Configure the software repository and install Zabbix

[root@master ~]# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm[root@master ~]# yum install -y zabbix-server-mysql zabbix-web-mysql mysql-server

By default, users and groups running Zabbix are created, and the Web server Apache virtual host configuration file is created.

2. Create a database and import data tables

[root@master ~]# rpm -ivh http://repo.zabbix.com/zabbix/2.4/rhel/6/x86_64/zabbix-release-2.4-1.el6.noarch.rpm[root@master ~]# yum install -y zabbix-server-mysql zabbix-web-mysql mysql-server[root@master ~]# service mysqld start[root@master ~]# chkconfig mysqld on[root@master ~]# mysqladmin -u root password '123456'[root@master ~]# mysql -uroot -p123456mysql> create database zabbix character set utf8;mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';mysql> flush privileges;

Enter the Zabbix database file directory to import database information

[root@master ~]# cd /usr/share/doc/zabbix-server-mysql-2.4.3/create/[root@master create]# mysql -uroot -p123456 zabbix < schema.sql[root@master create]# mysql -uroot -p123456 zabbix < images.sql[root@master create]# mysql -uroot -p123456 zabbix < data.sql

3. Modify Zabbix configuration file configuration database information

[root@master ~]# vim /etc/zabbix/zabbix_server.confDBHost=localhostDBName=zabbixDBUser=zabbixDBPassword=zabbix

4. Set the default time zone of PHP

[root@master ~]# vim /etc/php.inidate.timezone = PRC

5. Start Zabbix and Apache services

[root@master ~]# service zabbix-server start[root@master ~]# chkconfig zabbix-server on[root@master ~]# service httpd start[root@master ~]# chkconfig httpd on

6. Set Zabbix

Zabbix installation page: http://zabbix.redking.com/zabbix/setup.php

Zabbix background Interface


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.