CENTOS6 installation Zabbix3.4.3

Source: Internet
Author: User
Tags imap ldap mcrypt snmp

Yum-y Remove php php-bcmath php-cli php-common php-devel php-fpm php-gd php-imap php-ldap php-mbstring php-mcrypt Php-mys QL php-odbc php-pdo php-pear php-pecl-igbinary php-xml php-xmlrpc
RPM-UVH http://mirror.webtatic.com/yum/el6/latest.rpm

Yum-y Install php55w php55w-bcmath php55w-cli php55w-common php55w-devel php55w-fpm php55w-gd php55w-imap php55w-ldap php 55w-mbstring php55w-mcrypt php55w-mysql php55w-odbc php55w-pdo php55w-pear php55w-pecl-igbinary php55w-xml Php55w-xmlrpc Php55w-opcache php55w-intl Php55w-pecl-memcache

Yum-y Install Net-snmp-devel Openipmi-devel

Groupadd Zabbix
Useradd zabbix-g zabbix-s/sbin/nologin

Wget-c http://jaist.dl.sourceforge.net/project/zabbix/ZABBIX%20Latest%20Stable/3.4.3/zabbix-3.4.3.tar.gz
Tar zxf zabbix-3.4.3.tar.gz
CD zabbix-3.4.3
./configure--prefix=/usr/local/zabbix--enable-server--enable-agent--with-mysql--with-net-snmp--with-libcurl-- WITH-LIBXML2--WITH-OPENIPMI--WITH-UNIXODBC

Make install

Service mysqld start;
MYSQL-E "CREATE database Zabbix character set UTF8;"
MYSQL-E "Grant all privileges in zabbix.* to [e-mail protected] identified by ' Zabbix '; flush privileges;"

Mysql-uroot Zabbix < Database/mysql/schema.sql
Mysql-uroot Zabbix < Database/mysql/images.sql
Mysql-uroot Zabbix < Database/mysql/data.sql

Sed-i ' s/^dbuser=. $/dbuser=zabbix/g '/usr/local/zabbix/etc/zabbix_server.conf
Sed-i ' s/^.
Dbpassword=. $/dbpassword=zabbix/g '/usr/local/zabbix/etc/zabbixserver.conf
Cp-r Frontends/php/var/www/html/zabbix
CP Misc/init.d/fedora/core/zabbix
/etc/init.d/
Sed-i ' S#basedir=/usr/local#basedir=/usr/local/zabbix#g '/etc/init.d/zabbix_server
Sed-i ' S#basedir=/usr/local#basedir=/usr/local/zabbix#g '/etc/init.d/zabbix_agentd

Cat >>/etc/services <<eof
Zabbix-agent 10050/tcp #Zabbix Agent
Zabbix-agent 10050/UDP #Zabbix Agent
Zabbix-trapper 10051/tcp #Zabbix Trapper
Zabbix-trapper 10051/udp #Zabbix Trapper
Eof

Sed-i ' s/^register_globals = off$/register_globals = On/g '/etc/services

Cat >>/etc/php.ini <<eof
Date.timezone = Asia/shanghai
Max_execution_time = 300
Max_input_time = 300
Post_max_size = 32M
Memory_limit = 128M
Eof

Cat >>/etc/httpd/conf/httpd.conf <<eof
ServerName 127.0.0.1
<virtualhost *:80>
DocumentRoot "/var/www/html"
ServerName Zabbix_server
</VirtualHost>
Eof

Cat >/var/www/html/zabbix/conf/zabbix.conf.php <<eof
<?php
Zabbix GUI configuration file
Global \ $DB;

\ $DB [' TYPE '] = ' MYSQL ';
\ $DB [' SERVER '] = ' localhost ';
\ $DB [' PORT '] = ' 0 ';
\ $DB [' DATABASE '] = ' Zabbix ';
\ $DB [' USER '] = ' Zabbix ';
\ $DB [' PASSWORD '] = ' Zabbix ';

SCHEMA is relevant only for IBM_DB2 database
\ $DB [' SCHEMA '] = ';

\ $ZBX _server = ' localhost ';
\ $ZBX _server_port = ' 10051 ';
\ $ZBX _server_name = ';

\ $IMAGE _format_default = image_format_png;
?>
Eof

Service Iptables Stop
Chkconfig--level 345 iptables off
Setenforce 0
Sed-i ' s/selinux=enforcing/selinux=disabled/g '/etc/sysconfig/selinux
echo "/etc/init.d/zabbix_server start" >>/etc/rc.local
echo "/etc/init.d/zabbix_agentd start" >>/etc/rc.local
Chkconfig--level 345 mysqld on
Chkconfig--level 345 httpd on

/etc/init.d/zabbix_server start
/etc/init.d/zabbix_agentd start
/ETC/INIT.D/HTTPD start

CENTOS6 installation Zabbix3.4.3

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.