Install zabbix on lamp + centos6.5

Source: Internet
Author: User
Tags snmp

System Version: centos6.5

Kernel version: 2.6.32-358. el6.x86 _ 64

 

  1. Install the lamp environment in Yum;

yum install -y gcc gcc-c++httpd httpd-devel mysql msql-server mysql-devel php php-mysql php-common php-gdphp-mbstring php-mcrtpt php-devel php-xml php-bcmath libcurl-develnet-snmp-devel

 

2. Add users and groups;

groupadd zabbixuseradd zabbix -g zabbix -s /sbin/nologin

 

3. Create a database and authorize the user;

create database zabbixcharacter set utf8;grant all privileges on zabbix.* to [email protected] by ‘zabbix‘;flush privileges;

 

4. Compile and install zabbix;

wget http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.2.5/zabbix-2.2.5.tar.gztar zxf zabbix-2.2.5.tar.gzcd zabbix-2.2.5./configure --prefix=/usr/local/zabbix--enable-server --enable-agent --with-mysql --with-net-snmp --with-libcurlmake install

 

5. Import the database;

mysql -uzabbix -pzabbix -hlocalhost zabbix< database/mysql/schema.sqlmysql -uzabbix -pzabbix -hlocalhost zabbix< database/mysql/images.sqlmysql -uzabbix -pzabbix -hlocalhost zabbix< database/mysql/data.sql

 

6. modify the configuration file;

cp misc/init.d/fedora/core/zabbix_server/etc/init.d/cp misc/init.d/fedora/core/zabbix_agentd/etc/init.d/cp -R frontends/php /var/www/html/zabbixsed -i "s/max_execution_time =30/max_execution_time = 300/g" /etc/php.inised -i "s/max_input_time = 60/max_input_time = 300/g" /etc/php.inised -i "s/post_max_size = 8M/post_max_size = 16M/g" /etc/php.inised -i "s/;date.timezone =/date.timezone = Asia/Shanghai/g"/etc/php.inised-i ‘s/^DBUser=.*$/DBUser=zabbix/g‘ /usr/local/zabbix/etc/zabbix_server.confsed-i ‘s/^.*DBPassword=.*$/DBPassword=zabbix/g‘ /usr/local/zabbix/etc/zabbix_server.confsed-i ‘s/BASEDIR=\/usr\/local/BASEDIR=\/usr\/local\/zabbix/g‘ /etc/init.d/zabbix_serversed -i ‘s/BASEDIR=\/usr\/local/BASEDIR=\/usr\/local\/zabbix/g‘ /etc/init.d/zabbix_agentd

 

7. Add a service port;

cat >>/etc/services <<EOFzabbix-agent    10050/tcp               Zabbix Agentzabbix-agent    10050/udp               Zabbix Agentzabbix-trapper  10051/tcp              Zabbix Trapperzabbix-trapper  10051/udp               Zabbix TrapperEOF

 

8. Start the service;

/etc/init.d/zabbix_server start/etc/init.d/zabbix_agentd startecho "/etc/init.d/zabbix_serverstart" >> /etc/rc.localecho "/etc/init.d/zabbix_agentdstart" >> /etc/rc.local/etc/init.d/httpd restart/etc/init.d/mysqld restart

 

9. Access the page for configuration;

Http: // server IP/zabbix

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/45/10/wKiom1Pjo6OzfhyoAALC_PjTjjo204.jpg "Title =" 1.png" alt = "wkiom1pjo6ozfhyoaalc_pjtjjo204.jpg"/>

 

 

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/45/11/wKioL1PjpSPDKGp4AAM1YgGqfcM239.jpg "style =" float: none; "Title =" 2.png" alt = "wkiol1pjpspdkgp4aam1ygg1_cm239.jpg"/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/45/11/wKiom1PjpA-jQCrcAAL000pOuM4018.jpg "style =" float: none; "Title =" 3.png" alt = "wKiom1PjpA-jQCrcAAL000pOuM4018.jpg"/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/45/11/wKioL1PjpS2CfPZ_AAJe7RAxvUA348.jpg "style =" float: none; "Title =" 4.png" alt = "wkiol1pjps2cfpz_aaje7raxvua348.jpg"/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/45/11/wKiom1PjpBmCMlM0AALlskI7nSc540.jpg "style =" float: none; "Title =" 5.png" alt = "wkiom1pjpbmcmlm0aallski7nsc540.jpg"/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/45/11/wKioL1PjpYbiec_bAAMRk2SfC5I290.jpg "Title =" 7.png" alt = "wkiol1pjpybiec_baamrk2sfc5i290.jpg"/>

 

 

This prompt indicates that zabbix is not found under/var/www/html/zabbix/CONF. conf. the PHP file is very simple. Click downloadconfiguration file to download the configuration file to your local computer, upload it to/var/www/html/zabbix/CONF/, and then click Retry.

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/45/11/wKiom1PjpK6AWEijAAIpMzX1C1I002.jpg "style =" float: none; "Title =" 8.png" alt = "wkiom1pjpk6aweijaaipmzx1c1i002.jpg"/>

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/45/11/wKioL1PjpcuRpoEBAAFIWqjWYv0725.jpg "Title =" 9.png" alt = "wkiol1pjpcurpoebaafiwqjwyv0725.jpg"/>



At this point, our system setup has been completed. Default User name: Admin Password: zabbix

 

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M00/45/11/wKioL1PjpeqBVzziAAXQ9oDcmyQ893.jpg "Title =" 10.png" alt = "wkiol1pjpeqbvzziaaxq9odcmyq893.jpg"/>

 

10. There is no Chinese solution in the web page language;

Vim/var/www/html/zabbix/include/locales. Inc. php

Change zh_cn and zh_tw display => false to true.

function getLocales() {       return array(                ‘en_GB‘ => array(‘name‘=> _(‘English (en_GB)‘),       ‘display‘ => true),                ‘en_US‘ => array(‘name‘=> _(‘English (en_US)‘),       ‘display‘ => true),                ‘bg_BG‘ => array(‘name‘=> _(‘Bulgarian (bg_BG)‘),     ‘display‘ => false),                ‘zh_CN‘ => array(‘name‘ => _(‘Chinese(zh_CN)‘),        ‘display‘ => true),                ‘zh_TW‘ => array(‘name‘ => _(‘Chinese(zh_TW)‘),        ‘display‘ => true),                ‘cs_CZ‘ => array(‘name‘=> _(‘Czech (cs_CZ)‘),         ‘display‘ => false),                ‘nl_NL‘ => array(‘name‘=> _(‘Dutch (nl_NL)‘),         ‘display‘ => false),


This article is from the "Jerry on the road" blog, please be sure to keep this source http://jerry0117.blog.51cto.com/1664014/1537239

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.