CentOS-6.9 mounting zabbix 3.4

Source: Internet
Author: User
Tags snmp

1. Disable SELinux

[[Email protected]/] # sed-I "s # SELinux = enforcing # SELinux = disabled # G"/etc/SELinux/config # restart to take effect [[email protected]/] # setenforce 0 # temporarily disable

2. zabbix requires MySQL or a later version. Delete the old version.

Download mysql5.6
rpm -ivh http://dev.mysql.com/get/mysql-community-release-el6-5.noarch.rpmyum -y install mysql-serveryum list installed | grep mysql

3. Modify the MySQL configuration file/etc/My. CNF and add innodb_file_per_table = 1 to [mysqld ].

[[email protected] /]# vim /etc/my.cnfinnodb_file_per_table=1[[email protected] /]# /etc/init.d/mysqld start

4. log on to the database

[[Email protected]/] # MySQL # create zabbix library, specify the character set mysql> Create Database zabbix Character Set utf8 collate utf8_bin; query OK, 1 row affected (0.06 Sec) # create zabbix User Password: zabbix authorizes all permissions to access the zabbix database mysql> grant all privileges on zabbix. * To [email protected] identified by 'zabbix'; query OK, 0 rows affected( 0.02 Sec)

# Check whether the database is successfully created
mysql> show databases;+--------------------+| Database           |+--------------------+| information_schema || mysql              || performance_schema || zabbix             |+--------------------+4 rows in set (0.03 sec)

5. zabbix 3 requires PHP to be at least version 5.4 or later. Therefore, we need to install a new centos 6.5 library and PHP 5.3.3.

[[email protected] /]# rpm -ivh http://repo.webtatic.com/yum/el6/latest.rpm

Install the required package

yum -y install httpd php56w php56w-gd php56w-mysql php56w-bcmath php56w-mbstring php56w-xml php56w-ldap

6. Modify PHP configuration

[[email protected] /]# vim /etc/php.ini post_max_size = 16Mmax_execution_time = 300max_input_time = 300date.timezone = Asia/Shanghaialways_populate_raw_post_data = -1

7. Modify Apache configuration

Vim/etc/httpd/CONF/httpd. confservername 127.0.0.1directoryindex index.html. var index. php

Start the HTTPd service
/etc/init.d/httpd start

8. Create a zabbix user

[[email protected] /]# groupadd zabbix[[email protected] /]# useradd -g zabbix zabbix

9. Install dependency packages

yum -y install gcc mysql-community-devel libxml2-devel unixODBC-devel net-snmp-devel libcurl-devel libssh2-devel OpenIPMI-devel openssl-devel openldap-devel

10. Download The zabbix installation package, decompress the package, and import SQL

 
Official source package: wget https://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/3.4.7/zabbix-3.4.7.tar.gz
Tar-zxvf zabbix-3.4.7.tar.gz
CD zabbix-3.4.7/database/MySQL/

[[Email protected] _ 217 MySQL] # ls
Data. SQL images. SQL schema. SQL

mysql -uzabbix -p zabbix < schema.sql mysql -uzabbix -p zabbix < images.sql mysql -uzabbix -p zabbix < data.sql 

11. Install zabbix

 
[[Email protected] MySQL] # cd/zabbix-3.0.4 compilation [[email protected] zabbix-3.0.4] #. /configure -- enable-server -- enable-agent -- With-mysql -- enable-ipv6 -- With-net-snmp -- With-libcurl -- with-libxml2 -- With-unixodbc -- with-ssh2 -- With-openipmi -- -OpenSSL -- prefix =/usr/local/zabbix install [[email protected] zabbix-3.0.4] # make install [[email protected] zabbix-3.0.4] # echo $? 0

12. modify the configuration of zabbix_server

[[email protected] etc]# vim /usr/local/zabbix/etc/zabbix_server.confDBName=zabbixDBUser=zabbixDBPassword=zabbix

13. Create a new Web Front-End file

[[Email protected] conf] # mkdir/var/www/html/zabbix move source to the directory just created [[email protected] conf] # cd/zabbix-3.0.4/frontends/PHP/ [[email protected] PHP] # cp-RF */var/www/html/zabbix/

Set Apache as the owner of the Web user interface file

[[email protected] php]# chown -R apache:apache /var/www/html/zabbix

Add permissions to the zabbix web interface execution File

[[email protected] php]# chmod +x /var/www/html/zabbix/conf/

Add zabbix server and zabbix proxy Startup Script

[[email protected] php]# cp /zabbix-3.4.7/misc/init.d/fedora/core/zabbix_server /etc/init.d/zabbix_server[[email protected] php]# cp /zabbix-3.4.7/misc/init.d/fedora/core/zabbix_agentd /etc/init.d/zabbix_agentd

Add zabbix server and zabbix proxy service

[[email protected] php]# chkconfig --add /etc/init.d/zabbix_server[[email protected] php]# chkconfig --add /etc/init.d/zabbix_agentd[[email protected] php]# chkconfig httpd on[[email protected] php]# chkconfig mysqld on[[email protected] php]# chkconfig zabbix_server on[[email protected] php]# chkconfig zabbix_agentd on

Start zabbix_server

 
[[Email protected] PHP] #/etc/init. d/zabbix_server start # error starting zabbix_server:/etc/init. d/functions: Line 546:/usr/local/sbin/zabbix_server: no such file or directory [failed] [[email protected] PHP] # Vim/etc/init. d/zabbix_serverbasedir =/usr/local/zabbix # change the path [[email protected] PHP] #/etc/init. d/zabbix_server startstarting zabbix_server: [OK] [[email protected] PHP] # Vim/etc/init. d/zabbix_agentdbasedir =/usr/local/zabbix # change the path [[email protected] PHP] #/etc/init. d/zabbix_agentd startstarting zabbix_agentd: [OK]
 

Error message:

 
Error while loading shared libraries: libpcre. so.1: cannot open shared object file: no such file or directory "indicates that the Lib file is missing due to an error, further Look At The LDD $ (which/usr/local/zabbix/sbin/zabbix_server) linux-vdso.so.1 => (0x00007fff2cbff000) libpthread. so.0 =>/lib64/libpthread. so.0 (0x00007f6a5758a000) libcrypt. so.1 =>/lib64/libcrypt. so.1 (0x00007f6a570000000) libpcre. so.1 => not found # The file libz is not found here. so.1 =>/lib64/libz. so.1 (0x00007f6a56f1f000) libc. so.6 =>/lib64/libc. so.6 (0x00007f6a56b8b000)/lib64/ld-linux-x86-64.so.2 (0x00007f6a577af000) libfreebl3.so =>/lib64/libfreebl3.so (0x00007f6a56928000) libdl. so.2 =>/lib64/libdl. so.2 (0x00007f6a56724000)

First, check whether the file exists in the system:

[[Email protected] _ 217 ~] # Find/-name 'libpcre. so.1 '/usr/lib64/libpcre. so.1/usr/local/zabbix/lib/libpcre. so.1/usr/local/lib/libpcre. so.1/usr/lib/libpcre. so.1/lib64/libpcre. so.1/root/Django/pcre-8.35 /. libs/libpcre. so.1

We can see that the system has this file, and then create a soft connection to this file, and then we can start the service normally.
cd /lib64/
ln -s /usr/local/lib/libpcre.so.1 /lib64/ 

 

 

14. Enter the IP address 192.168.1.1/zabbix on the zabbix web installation interface.
1. Go to the installation page:

2. Check whether the configuration is OK.

3. Connect to the database (the user name and password created by your database)

4. Enter zabbix server details.

5. Confirm the settings.

6. configuration file generated after installation:/var/www/html/zabbix. conf. php

7. log on to zabbix

 

Login User name: Admin Login Password: zabbix centos 7 system installation and deployment, please refer to the zabbix official documents https://www.zabbix.com/download installed!

CentOS-6.9 mounting zabbix 3.4

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.