Centos6.5 install zabbix2.4.5

Source: Internet
Author: User

Centos6.5 install zabbix2.4.5
[root@lvsM_195_205repo]#yum-yinstallnet-snmpnet-snmp-devellibxml2-devellibcurl-devel[root@lvsM_195_205repo]#wgethttp://downloads.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/2.4.5/zabbix-2.4.5.tar.gz[root@lvsM_195_205repo]#tarzxfzabbix-2.4.5.tar.gz[root@lvsM_195_205repo]#cdzabbix-2.4.5[root@lvsM_195_205repo]#useradd-M-s/sbin/nologinzabbix[root@lvsM_195_205zabbix-2.4.5]#./configure--prefix=/usr/local/zabbix--enable-server--with-mysql--with-net-snmp--with-jabber--with-libcurl--with-openipmi--enable-agent--with-libxml2

Configure: error: Not found mysqlclient library

[root@lvsM_195_205zabbix-2.4.5] #yuminstall-ymysql-devel [root@lvsM_195_205zabbix-2.4.5] #./configure--prefix=/usr/local/zabbix--enable-server--with-mysql--with-net-snmp--with-jabber--with-libcurl--with-openipmi--enable-agent--with-libxml2

Configure: error: Jabber library not found

Http://pan.baidu.com/s/1lUn4U download iksemel-1.4.tar.gz

[root@lvsM_195_205zabbix-2.4.5] #tarzxfiksemel-1.4.tar.gz [root@lvsM_195_205zabbix-2.4.5] #cdiksemel-1.4 [root@lvsM_195_205iksemel-1.4] #./configure--prefix=/usr/local/ [root@lvsM_195_205iksemel-1.4] #make-j4&&makeinstall [root@lvsM_195_205iksemel-1.4] #cd.. [root@lvsM_195_205zabbix-2.4.5] #./configure--prefix=/usr/local/zabbix--enable-server--with-mysql--with-net-snmp--with-jabber=/usr/local/--with-libcurl--with-openipmi--enable-agent--with-libxml2

Configure: error: Invalid OPENIPMI directory-unable to find ipmiif. h

[root@lvsM_195_205zabbix-2.4.5] #yuminstall-yOpenIPMI-devel [root@lvsM_195_205zabbix-2.4.5] #./configure--prefix=/usr/local/zabbix--enable-server--with-mysql--with-net-snmp--with-jabber=/usr/local/--with-libcurl--with-openipmi--enable-agent--with-libxml2 [root@lvsM_195_205zabbix-2.4.5] #make-j4&&makeinstall [root@lvsM_195_205zabbix-2.4.5] #mysql-uroot-p mysql>createdatabasezabbixdefaultcharsetutf8; QueryOK,1rowaffected(0.04sec) mysql>grantallonzabbix.*tozabbix@ '%' identifiedby 'zabbix123' ; QueryOK,0rowsaffected(0.06sec) mysql>flushprivileges; QueryOK,0rowsaffected(0.07sec) mysql> exit [root@lvsM_195_205zabbix-2.4.5] #cddatabase/mysql/ [root@lvsM_195_205mysql] #mysql-uzabbix-pzabbix123zabbix<schema.sql [root@lvsM_195_205mysql] #mysql-uzabbix-pzabbix123zabbix<images.sql [root@lvsM_195_205mysql] #mysql-uzabbix-pzabbix123zabbix<data.sql [root@lvsM_195_205mysql] #cd../../ [root@lvsM_195_205zabbix-2.4.5] #cpmisc/init.d/fedora/core/zabbix_*/etc/init.d/ [root@lvsM_195_205zabbix-2.4.5] #chmod775/etc/init.d/zabbix_* [root@lvsM_195_205zabbix-2.4.5] #vim/usr/local/zabbix/etc/zabbix_server.conf 30LogFile= /var/log/zabbix_server .log 68DBHost=localhost 94DBUser=zabbix 102DBPassword=zabbix123 117DBPort=3306 [root@lvsM_195_205zabbix-2.4.5] #vim/etc/init.d/zabbix_server 22BASEDIR= /usr/local/zabbix [root@lvsM_195_205zabbix-2.4.5] #vim/etc/init.d/zabbix_agentd 22BASEDIR= /usr/local/zabbix [root@lvsM_195_205zabbix-2.4.5] #vim/usr/local/php/etc/php.ini 444max_execution_time=300 454max_input_time=300 740post_max_size=50M 1010 date .timezone=Asia /Chongqing [root@lvsM_195_205zabbix-2.4.5] #php-fpm-t [10-Jun-201515:31:30]NOTICE:configuration file /usr/local/php/etc/php-fpm .conf test issuccessful [root@lvsM_195_205zabbix-2.4.5] #/etc/init.d/php-fpmrestart [root@lvsM_195_205conf] #cp-rf/root/repo/zabbix-2.4.5/frontends/php/home/wwwroot/zabbix [root@lvsM_195_205conf] #cd/home/wwwroot/ [root@lvsM_195_205wwwroot] #chown-Rapache.apachezabbix/ [root@lvsM_195_205conf] #vim/etc/httpd/conf/httpd.conf <VirtualHost*:80> ServerNamezabbix.xqzh.com DocumentRoot /home/wwwroot/zabbix <Directory /home/wwwroot/zabbix > DirectoryIndexindex.php Options-IndexesFollowSymLinks Orderallow,deny Allowfromall AllowOverrideNone AddTypeapplication /x-httpd-php .php < /Directory > < /VirtualHost > [root@lvsM_195_205conf] #httpd-t SyntaxOK [root@lvsM_195_205conf] #/etc/init.d/httpdrestart [root@lvsM_195_205wwwroot] #chkconfigzabbix_serveron [root@lvsM_195_205wwwroot] #chkconfigzabbix_agentdon [root@lvsM_195_205wwwroot] #/etc/init.d/zabbix_serverstart Startingzabbix_server:[OK]

Zabbix_server [18262]: cannot open [/var/log/zabbix_server.log]: [13] Permission denied

[root@lvsM_195_205wwwroot] #touch/var/log/zabbix_server.log [root@lvsM_195_205wwwroot] #chmod-R777/var/log/zabbix_server.log [root@lvsM_195_205wwwroot] #/etc/init.d/zabbix_serverstart Startingzabbix_server:[OK] [root@lvsM_195_205wwwroot] #/etc/init.d/zabbix_agentdstart Startingzabbix_agentd:[OK] [root@lvsM_195_205wwwroot] # Netstat-tunlp | grepzabbix # check that the port is missing server10051tcp000.0.0.0: 100500.0.0.0: * LISTEN31107/zabbix_agentd [root@lvsM_195_205wwwroot] #tail-f/var/log/zabbix_server.log

9871: 20150610: 160421.477 [Z3001] connection to database 'zabbix' failed: [2002] Can't connect to local MySQL server through socket '/var/lib/mysql. sock '(2)

9871: 20150610: 160421.477 database is down: reconnecting in 10 seconds

[root@lvsM_195_205wwwroot] #vim/usr/local/zabbix/etc/zabbix_server.conf 109DBSocket= /tmp/mysql .sock [root@lvsM_195_205wwwroot] #netstat-tunlp|grepzabbix tcp000.0.0.0:100500.0.0.0:*LISTEN31107 /zabbix_agentd tcp000.0.0.0:100510.0.0.0:*LISTEN23885 /zabbix_server

Modify the C: \ Windows \ System32 \ drivers \ etc \ HOSTS file

192.168.195.205 zabbix.xqzh.com

Browser access: http://zabbix.xqzh.com/

1. Next

2. bcmath missing

[Root @ lvsM_195_205wwwroot] # yum search bcmath

[Root @ lvsM_195_205wwwroot] # yum install-y php-bcmath.x86_64

[Root @ lvsM_195_205wwwroot] #/etc/init. d/httpd restart

After resolution: retry to redetect and Next

3. sock not found

[Root @ lvsM_195_205tmp] # ln-s/tmp/mysql. sock/var/lib/mysql/

4. Enter the zabbix address, ip address, and next path. The installation is complete.

5. On the logon page, the default user name is admin and the password is zabbix.

This article is from the "xieping_linux" blog, please be sure to keep this http://xieping.blog.51cto.com/3715452/1660505

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.