RedHat 7.1 Installation of Zabbix monitoring program (suitable for Linux novice users)

Source: Internet
Author: User
Tags gpg install php

RedHat 7.1 Installing the ZABBIX Monitoring program in detail (for Linux novice users) 2017-05-02

Installation steps:

1.zabbix need to install lamp architecture

2. Installing the Zabbix Service

3. Initializing the Zabbix system

1. Installation Environment: VMware Virtual

1234 [[email protected] ~]# cat /etc/redhat-releaseRed Hat Enterprise Linux Server release 7.1 (Maipo)[[email protected] ~]# uname -aLinux localhost.localdomain 3.10.0-229.el7.x86_64 #1 SMP Thu Jan 29 18:37:38 EST 2015 x86_64 x86_64 x86_64 GNU/Linux

================================= OK, let's start installing the lamp architecture ============================

1. To facilitate access to the installation application, first configure the Yum service, RedHat default yum is installed, below we directly configure Yum Local source and network source.

[Email protected] ~]# Mount/dev/cdrom/mnt/cdrom
Mount:/dev/sr0 is write-protected, mounting read-only

2. Check if Yum is installed, (the following is installed)

[Email protected] ~]# Rpm-qa |grep yum*
Yum-metadata-parser-1.1.4-10.el7.x86_64
Yum-3.4.3-125.el7.noarch
Yum-rhn-plugin-2.0.1-5.el7.noarch
Keyutils-libs-1.5.8-3.el7.x86_64
Python-pyudev-0.15-6.el7.noarch

3. Configure Yum Local source and network source;

[[email protected] yum.repos.d]# mkdir Repobak Create a new backup folder

[[email protected] YUM.REPOS.D] #mv * Repobak yum.repos.d files in the folder back into the Repobak

[[email protected] YUM.REPOS.D] #vi Zabbix.repo Create a new Zabbix.repo yum source file, add the following:

==============zabbix.repo file =======================

[Zabbix]
Name=zabbix official repository-$basearch
baseurl=http://repo.zabbix.com/zabbix/3.2/rhel/7/$basearch/
Enabled=1
Gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-zabbix-a14fe591

[Zabbix-non-supported]
Name=zabbix official Repository non-supported-$basearch
baseurl=http://repo.zabbix.com/non-supported/rhel/7/$basearch/
Enabled=1
Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-zabbix
Gpgcheck=1
[Waiwang]
Name=waiwang
baseurl=http://mirrors.163.com/centos/7/os/x86_64/
Enabled=1
Gpgcheck=0
[Extras]
Name=extras
baseurl=http://mirrors.163.com/centos/7/extras/x86_64/
Enabled=1
Gpgcheck=0

=================end===========================

4. Purge Yum cache files

[email protected] ~]# Yum Clean all
Loaded Plugins:product-id, Subscription-manager
This system isn't registered to Red Hat Subscription Management. You can use the Subscription-manager to register.
Cleaning Repos:extras Waiwang Zabbix zabbix-non-supported
Cleaning up everything

5. Create a Yum cache file

[email protected] ~]# Yum Makecache
Loaded Plugins:product-id, Subscription-manager
This system isn't registered to Red Hat Subscription Management. You can use the Subscription-manager to register.
Extras | 3.4 KB 00:00
Waiwang | 3.6 KB 00:00
Zabbix | 951 B 00:00
zabbix-non-supported | 951 B 00:00
(1/8): Extras/prestodelta | KB 00:00
(2/8): extras/primary_db | 151 KB 00:00
(3/8): Waiwang/group_gz | 155 KB 00:00
(4/8): extras/other_db | 640 KB 00:01
(5/8): extras/filelists_db | 770 KB 00:02
(6/8): waiwang/filelists_db | 6.6 MB 00:02
(7/8): waiwang/other_db | 2.4 MB 00:00
(8/8): waiwang/primary_db | 5.6 MB 00:03
(1/6): zabbix/x86_64/primary | KB 00:00
(2/6): zabbix/x86_64/filelists | KB 00:00
(3/6): Zabbix/x86_64/other | 7.7 KB 00:00
(4/6): zabbix-non-supported/x86_64/filelists | 660 B 00:00
(5/6): zabbix-non-supported/x86_64/primary | 1.6 KB 00:00
(6/6): Zabbix-non-supported/x86_64/other | 1.5 KB 00:00
Zabbix 92/92
Zabbix 92/92
Zabbix 92/92
Zabbix-non-supported 4/4
Zabbix-non-supported 4/4
Zabbix-non-supported 4/4
Metadata Cache Created

6.[[email protected] ~]# Yum list to see a listing of the files that Yum gets to

7. Close firewall: (vi/etc/selinux/)

[[Email protected] ~] #systemctl Stop Firewalld.service #停止firewall

[[Email protected] ~] #systemctl Disable Firewalld.service #禁止firewall开机启动

[[email protected] ~]# vi/etc/selinux/config change selinux=enforcing to selinux=disabled.

[[email protected] ~]# sestatus view selinux status

======================================= cut-off Yum environment is ready =======================

I. Start installing the LAMP architecture

1. Installing Apache

[[Email protected] ~] #yum Install httpd #根据提示, enter y installation for successful installation

[[Email protected] ~] #systemctl start Httpd.service #启动apache

[[Email protected] ~] #systemctl Stop Httpd.service #停止apache

[[Email protected] ~] #systemctl restart Httpd.service #重启apache

[[Email protected] ~] #systemctl enable Httpd.service #设置apache开机启动

2. Installing MARIADB

In RHEL 7.0, the MySQL database has been replaced with MARIADB

2.1 Installing MARIADB

[[Email protected] ~] #yum install mariadb mariadb-server #询问是否要安装, enter y for automatic installation until installation is complete

[[Email protected] ~] #systemctl start Mariadb.service #启动MariaDB

[[Email protected] ~] #systemctl Stop Mariadb.service #停止MariaDB

[[Email protected] ~] #systemctl restart Mariadb.service #重启MariaDB

[[Email protected] ~] #systemctl enable Mariadb.service #设置开机启动

3. Install PHP

[[Email protected] ~] #yum Install PHP #根据提示输入Y直到安装完成

4. Install PHP components to enable PHP support MariaDB

[[Email protected] ~] #yum install php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc Php-mhash

#这里选择以上安装包进行安装, enter Y return as prompted

[[Email protected] ~] #systemctl restart Mariadb.service #重启MariaDB

[[Email protected] ~] #systemctl restart Httpd.service #重启apache

5. Restart the service

[[Email protected] ~] #systemctl restart Mariadb.service #重启MariaDB

[[Email protected] ~] #systemctl restart Httpd.service #重启apache

6. Login http://localhost Test httpd service is normal.

=========================lamp architecture has been built ==========================================

Two. Installation and configuration of the Zabbix service

1 Installing the repository configuration file [[email protected] ~] #rpm-IVH http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/ ZABBIX-RELEASE-3.2-1.EL7.NOARCH.RPM2. Installing the Zabbix program [[Email protected] ~] #yum Install Zabbix-server-mysql Zabbix-web-mysql zabbix-get zabbix-agent Install Zabbix, cue point "y" to complete the installation. [[Email protected] ~] #rpm-ql zabbix-server-mysql Verify the installation file

/etc/logrotate.d/zabbix-server
/etc/zabbix/zabbix_server.conf
/usr/lib/systemd/system/zabbix-server.service
/usr/lib/tmpfiles.d/zabbix-server.conf
/usr/lib/zabbix/alertscripts
/usr/lib/zabbix/externalscripts
/usr/sbin/zabbix_server_mysql
/usr/share/doc/zabbix-server-mysql-3.2.5
/usr/share/doc/zabbix-server-mysql-3.2.5/authors
/usr/share/doc/zabbix-server-mysql-3.2.5/copying
/usr/share/doc/zabbix-server-mysql-3.2.5/changelog
/usr/share/doc/zabbix-server-mysql-3.2.5/news
/usr/share/doc/zabbix-server-mysql-3.2.5/readme
/usr/share/doc/zabbix-server-mysql-3.2.5/create.sql.gz
/usr/share/man/man8/zabbix_server.8.gz
/var/log/zabbix
/var/run/zabbix

3. Initialize the MARIADB database [[email protected] ~] #mysql-U root

4: Import Zabbix initial mode and data

[[Email protected] ~] #zcat/usr/share/doc/zabbix-server-mysql-3.2.1/create.sql.gz | Mysql-uroot Zabbix [[email protected] ~] #mysql-U root Verify that the data was successfully imported

MariaDB [Zabbix]>use Zabbix;

Database changed
MariaDB [zabbix]> Show tables;
+----------------------------+
| Tables_in_zabbix |
+----------------------------+
| acknowledges |
| Actions |
| Alerts |
| Application_discovery |
| Application_prototype |
| Application_template |
| Applications |
| Auditlog |

5. Configure the Zabbix configuration file and modify the database password to Zabbix

[[Email protected] ~] #vi/etc/zabbix/zabbix_server.confdbpassword=zabbix 6. Configure the HTTP configuration file, modify the time zone for Asia Shanghai # vi/etc/httpd/ Conf.d/zabbix.confphp_value date.timezone Asia/shanghai 7. Start the Zabbix-server and set the boot#systemctl start Zabbix-server#systemctl Enable Zabbix-server Note:① If Zabbixserver cannot start, you will need to install the trousers support package. #yum Install trousers② If the PID error is reportedneed to do soft connect/var/run >/run#ln-S/var/run/run 8. Start the HTTP and set the boot#systemctl start httpd#systemctl enable httpd 9. Start the zabbix-agent and set the boot#systemctl start Zabbix-agent#systemctl Enable Zabbix-agent 10 is set using the IE login Zabbix GUI. Address:/HTTP192.168.1.*/zabbix/(Zabbix server IP)Account: admin password: ZabbixOne. Zabbix the configuration of the graphical interface. There are many graphical interface configuration on the Internet, can be self-query, omitted here ....

RedHat 7.1 Installation of Zabbix monitoring program (suitable for Linux novice users)

Related Article

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.