CentOS 7Install Zabbix Monitoring Server and Agent
来源:互联网 发布:淘宝品牌库查询入口 编辑:程序博客网 时间:2024/05/18 22:50
Basic parameters configuration
Zabbix requires minimum of 128 MB of RAM and 256 MB of free disk space to setup its installation process but the amount of required disk memory obviously depends on the number of hosts and the parameters that are being monitored.
Considering the below parameters we will go through the steps to build Zabbix Server.
Zabbix NMSZabbix PackageZabbix-2.4.5Base Operating SystemCentOS Linux 7 (Core)Databasemysql Ver 15.1 Distrib 5.5.41-MariaDB, for Linux (x86_64)Client ViewPHP 5.4.16 (cli)RAM and CPU4 GB , 2.0 GHZHard Disk30 GBZabbix Servers Installation
Create a backup directory and download the Zabbix Application for CentOS operating system.
[root@linux-tutorials backup]# wget http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/2.4.5/zabbix-2.4.5.tar.gz
Extract the zabbix application package here
[root@linux-tutorials backup]# ls
zabbix-2.4.5.tar.gz
[root@linux-tutorials backup]# tar zxvf zabbix-2.4.5.tar.gz
Before starting the Zabbix setup we need to create Zabbix group and user.
Perform the following steps to create.
Create new group Zabbix
[root@linux-tutorials backup]# groupadd zabbix
create new user Zabbix and add it to the group Zabbix
[root@linux-tutorials backup]# groupadd zabbix
Once zabbix user is done we need to create a new database for zabbix server. To do so we need to perform following steps.
Login to MySQL MariaDB
[root@linux-tutorials backup]# mysql -u root –p
Create new database
MariaDB [(none)]> create database zabbix character set utf8;
Query OK, 1 row affected (0.00 sec)
Grant all privileges to zabbix user on zabbix database
MariaDB [(none)]> grant all privileges on zabbix .* to 'zabbix'@'localhost' identified by 'zabbix123' with grant option;
Query OK, 0 rows affected (0.00 sec)
Now Import initial schema and data.
[root@linux-tutorials zabbix-2.4.5]# mysql -u zabbix -p zabbix < /backup/zabbix-2.4.5/database/mysql/schema.sql
Enter password:
[root@linux-tutorials zabbix-2.4.5]# mysql -u zabbix -p zabbix < /backup/zabbix-2.4.5/database/mysql/images.sql
Enter password:
[root@linux-tutorials zabbix-2.4.5]# mysql -u zabbix -p zabbix < /backup/zabbix-2.4.5/database/mysql/data.sql
Enter password:
[root@linux-tutorials zabbix-2.4.5]#
Start Zabbix Server and its Agent Installation
Before running the installation script make sure that all the required php extensions and other supporting libraries including mysql-devel php-mysql and net-snmp are installed without that installation process will not be complete.
[root@linux-tutorials zabbix-2.4.5]# ./configure --enable-server --enable-agent --with-mysql --with-net-snmp
Now run make to install everything
[root@linux-tutorials zabbix-2.4.5]# make install
Front-End Installation using PHP
Now we need to create the apache document root directory to then move all frontend php files in it.
[root@linux-tutorials zabbix-2.4.5]# mkdir /var/www/html/zabbix
[root@linux-tutorials zabbix-2.4.5]# cp -r frontends/php/* /var/www/html/zabbix/
[root@linux-tutorials zabbix-2.4.5]#
Setup basic parameters in PHP configuration file php.ini
[root@linux-tutorials zabbix-2.4.5]# vim /etc/php.ini
Restart Apache service to take effect after making change in php.ini file.
[root@linux-tutorials zabbix-2.4.5]# systemctl restart httpd.service
In your browser, open Zabbix URL as per your server IP or name.
http://://172.20.3.174/zabbix
You should see the first screen of the frontend installation wizard.
Once php parameters are setup in the screen it should be all parameters ok. Click on toNEXT
Enter details for connection to the database. Zabbix database must be already created.
Then Enter Zabbix servers detail and click on Test Connection to confirm its connectivity with the database.
Review a summary of settings.
Download the configuration file and place it under following conf directory.
"/var/www/html/zabbix/conf/zabbix.conf.php"
After uploading conf file into mentioned destination folder click to "Retry" and the click to"Finish" after it appears OK status.
Zabbix frontend is now ready to access with default user name "Admin" and password"zabbix".
Zabbix Server Configuration
Now lets come to zabbix server configuration file to configure it to start monitoring hosts.
Open the configuration file.
#vim /usr/local/etc/zabbix_server.conf
SourceIP= 127.0.0.1
LogFile=/tmp/zabbix_server.logDBName=zabbix
DBUser=zabbix
DBPassword=******
Zabbix Agent Configuration
As we already installed zabbix agent now we just need to configure its parameters to make it communicate with the server. So lets open the zabbix agent configuration file and configure the parameters.
#vim /usr/local/etc/zabbix_agentd.conf
SourceIP=172.20.3.174
EnableRemoteCommands=1
Server=127.0.0.1
ServerActive=127.0.0.1
Hostname=Zabbix server
Timeout=30
Start Zabbix Services:
After making changes to zabbix server and its agent configurations start zabbix server and zabbix agent services as.
[root@linux-tutorials zabbix-2.4.5]# zabbix_server
[root@linux-tutorials zabbix-2.4.5]# zabbix_agentd
Enable Your First Monitoring
Lets point to zabbix Configuration and then Hosts to enable the zabbix server to start its monitoring and then add many hosts and web scenerios to enjoy with an awesome interface, dashboard and graphs.
Conclusion:
Zabbix is an open source enterprise monitoring solution for networks and applications designed to monitor and track the status of various network devices, performance and availability of cross platform servers and other network hardware. It has allowed us to address a number of issues within our client’s infrastructure that allows us to monitor hundreds and thousands of devices with high performance, and high capacity platform.
- CentOS 7Install Zabbix Monitoring Server and Agent
- CentOS 安装zabbix-server和zabbix-agent
- Install ZABBIX agent on Linux (CentOS)
- CentOS 7下【zabbix-agent】
- How To Install Zabbix Server On CentOS 7
- CentOS 7 yum install zabbix 2.4
- Centos minimal install zabbix
- CentOS 6.7 安装zabbix-agent
- centos 6安装zabbix agent
- 在centos 7上安装zabbix server3.0和zabbix agent
- centos 6.4 yum安装zabbix-agent端
- Install Zabbix Server On CentOS5
- zabbix-2.0.0 server & agent安装
- zabbix-2.0.0 server & agent安装
- Zabbix应用之Server/Agent部署
- ubantu 安装zabbix (server和agent)
- Zabbix学习之Server/Agent部署
- 安装zabbix 3.0/minimal CentOS 7 install zabbix from rpm package
- Android Weekly #203 中文版
- 基于半关闭的文件传输程序(Linux-GCC)
- HDU-ACM2029
- Jquery 获取对象的几种方式详细介绍
- HDU-ACM2030
- CentOS 7Install Zabbix Monitoring Server and Agent
- 23种设计模式(3):工厂方法模式
- HDU-ACM2031
- [BZOJ2154]Crash的数字表格(莫比乌斯反演)
- 【Python学习笔记】 lambda表达式学习
- 44-Count and Say
- HDU-ACM2032--杨辉三角
- CentOS 7.x PhpMyAdmin Install and Configure with Nginx
- 使用ReentrantLock实现线程同步