Centos Zabbix Compile and install

Source: Internet
Author: User
Tags ldap snmp openldap

1. Install the dependent packages:

Yum–y install gcc gcc-c++ autoconf httpd php mysql mysql-server php-mysql httpd-manual mod_ssl mod_perl mod_auth_mysql ph P-GD php-xml php-mbstring php-ldap php-pear php-xmlrpc php-bcmath mysql-connector-odbc mysql-devel libdbi-dbd-mysql Net-snmp-devel curl-devel UNIX-ODBC-DEVL openipmi-devel java-devel

650) this.width=650; "title=" clip_image002 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; margin:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" clip_image002 "src=" http://s3.51cto.com/wyfs02/M01/6E/C5/ Wkiom1wgfj3j5pdpaaadvbx7cm8824.jpg "" 244 "height="/>

2. Configure the required environment for PHP

Vim/etc/php.ini

Date.timezone = Asia/shanghai

Max_execution_time = 300

Post_max_size = 32M

Max_input_time = 300

Memory_limit = 128M

Mbstring.func_overload = 2

3 Download and install Zbbix-server

wget Http://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Stable/2.2.2/zabbix-2.2.2.tar.gz-P/root

Add Zabbix Users

Groupadd Zabbix

Useradd–g zabbix–m Zabbix

Tar zxf zabbix-2.2.2-tar.gz–c/usr/src

cd/usr/src/zabbix-2.2.2

./configure--prefix=/usr/local/zabbix--sysconfir=/etc/zabbix–enable-server–enable-proxy–enable-agent– enable-ipv6–with-mysql=/usr/bin/msyql_config–with-net-snmp–with-libcurl–with-openipmi–with-unixodbc–with-ldap– With-ssh2–enable-java

650) this.width=650; "title=" clip_image004 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; margin:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" clip_image004 "src=" http://s3.51cto.com/wyfs02/M02/6E/C2/ Wkiol1wgflogsokcaaazeqi11fk916.jpg "" 244 "height="/>

650) this.width=650; "title=" clip_image005 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; margin:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" clip_image005 "src=" http://s3.51cto.com/wyfs02/M00/6E/C2/ Wkiol1wgflothsyvaaaffrb_vd0930.jpg "244" height= "Notoginseng"/>

Installing yum install Php-pecl-ssh2 Libssh2-devel

650) this.width=650; "title=" clip_image007 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; margin:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" clip_image007 "src=" http://s3.51cto.com/wyfs02/M01/6E/C2/ Wkiol1wgflognhzxaaaurzuudhm450.jpg "" 244 "height=" "/>

Installation:
Yum Install OpenLDAP Openldap-devel

Compile and install:

Make && make install

3. Account Opening Database

Service mysqld Start

Chkconfig mysqld on

4. Create a Zabbix database

Mysql–u Root

Create Database Zabbix;

Grant all on zabbix.* to [email protected] identified by ' Zabbix ';

Importing a Zabbix-server database

650) this.width=650; "title=" clip_image008 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; margin:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" clip_image008 "src=" http://s3.51cto.com/wyfs02/M02/6E/C2/ Wkiol1wgfloidrgsaaausletsbo059.jpg "" 244 "height="/>

Cd/usr/src/zabbix-2.2.2/database/mysql

Mysql–u Zabbix–p Zabbix < Schema.sql

Note: If you are installing proxy, just import schema.sql, no need to import the following SQL, or proxy will not work

Mysql–u Zabbix–p Zabbix < Images.sql

Mysql–u Zabbix–p Zabbix < Data.sql

or in the database. Import: Source/usr/src/zabbix-2.2.2/database/mysql/schema.sql

5. Copy the service startup script

650) this.width=650; "title=" clip_image009 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; margin:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" clip_image009 "src=" http://s3.51cto.com/wyfs02/M02/6E/C6/ Wkiom1wgfj6j8imuaaagsqr1ysq862.jpg "244" height= "Notoginseng"/>

cp/usr/src/zabbix-2.2.2/misc/init.d/fedora/core/zabbix_server/etc/init.d/

chmod +x/etc/init.d/zabbix_server

and modify the/etc/init.d/zabbix_server

Basedir=/usr/local instead of:/usr/local/zabbix

6. Configure zabbix_server.conf

Dbuser=zabbix

Dbname=zabbix

Dbpassword=zabbix

7. Copy the Web file to/var/www/html

650) this.width=650; "title=" clip_image010 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; margin:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" clip_image010 "src=" http://s3.51cto.com/wyfs02/M00/6E/C6/ Wkiom1wgfj6gggfsaaaca3gejtk193.jpg "" 244 "height="/>

Cp-r/usr/src/zabbix-2.2.2/frontends/php//var/www/html/zabbix

Chown–r Apache.apache/var/www/html/zabbix

8. Turn on Zabbix service

Chkconfig Zabbix_server on

Service Zabbix_server Start

Service httpd Start

Chkconfig httpd on

9. Visit Http://ip/zabbix

650) this.width=650; "title=" clip_image012 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; margin:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" clip_image012 "src=" http://s3.51cto.com/wyfs02/M02/6E/C6/ Wkiom1wgfj6s5wh3aaazwjeo0vc804.jpg "" 244 "height=" 127 "/>

Click Next

650) this.width=650; "title=" clip_image013 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; margin:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" clip_image013 "src=" http://s3.51cto.com/wyfs02/M00/6E/C2/ Wkiol1wgflszmow8aaasatr378k272.jpg "" 244 "height="/>

Vim/etc/php.ini

Search Date.timezone =

Modified: Date.timezone=asia/shanghai

650) this.width=650; "title=" clip_image015 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; margin:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" clip_image015 "src=" http://s3.51cto.com/wyfs02/M02/6E/C6/ Wkiom1wgfj7zoccgaabk6d89uok611.jpg "" 244 "height=" 153 "/>

To test the connection:

650) this.width=650; "title=" clip_image017 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; margin:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" clip_image017 "src=" http://s3.51cto.com/wyfs02/M00/6E/C6/ Wkiom1wgfj7jpx6-aaan8goruwe066.jpg "" 244 "height="/>

Enter Name:

650) this.width=650; "title=" clip_image019 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; margin:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" clip_image019 "src=" http://s3.51cto.com/wyfs02/M00/6E/C6/ Wkiom1wgfj6z64saaaae1uutwo0618.jpg "" 244 "height="/>

Ok,finish

650) this.width=650; "title=" clip_image021 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; margin:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" clip_image021 "src=" http://s3.51cto.com/wyfs02/M01/6E/C6/ Wkiom1wgfj7qmm1qaaatzttlu18354.jpg "" 244 "height="/>

Login: Default User name Admin password: Zabbix

650) this.width=650; "title=" clip_image023 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; margin:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" clip_image023 "src=" http://s3.51cto.com/wyfs02/M02/6E/C6/wKiom1WGfJ_ Dcej7aaazaf65vgs086.jpg "" 244 "height=" 111 "/>

650) this.width=650; "title=" clip_image025 "style=" border-top:0px; border-right:0px; Background-image:none; border-bottom:0px; padding-top:0px; padding-left:0px; border-left:0px; padding-right:0px "border=" 0 "alt=" clip_image025 "src=" http://s3.51cto.com/wyfs02/M00/6E/C6/ Wkiom1wgfj-zn--aaaa0hfalkt0286.jpg "" 244 "height=" 109 "/>

To this, the Zabbix-server installation is complete.

Note: firewall, SELinux.

1. You can close the firewall and SELinux directly

Service Iptables Stop

Vim/etc/selinux/config selinux=disable

2 or set policy

Iptables–a input–m state–state new–m tcp–p tcp–dport 22–j ACCEPT

Iptables–a input–m state–state new–m tcp–p tcp–dport 80–j ACCEPT

Iptables–a input–m state–state new–m tcp–p tcp–dport 10051–j ACCEPT

Iptables–a output–m state–state new–m tcp–p tcp–dport 10050–j ACCEPT

Iptables–a input–m state–state new–m tcp–p tcp–dport 10050–j ACCEPT

Centos Zabbix Compile and install

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.