Zabbix server-Side installation configuration

Source: Internet
Author: User
Tags snmp

From http://www.cnblogs.com/wsl222000/p/5615111.html

1. Install the httpd,mysql,php

Yum install httpd php mysql mysql-devel php-xmlwriter php-gd php-mbstring php-bcmath php-mysql

2. Download and install zabbix-2.2.6.tar.gz

Tar zxvf zabbix-2.2.6.tar.gz-c/usr/local/src/#解压useradd zabbix-s/sbin/nologin #添加zabbix用户yum Install NET-SNMP NET-SNM P-devel Curl Curl-devel #安装依赖包cd/usr/local/src/zabbix-2.2.6 #进入安装目录./configure--prefix=/usr/local/zabbix-- Enable-server--enable-agent--enable-proxy--with-net-snmp--with-libcurl  --with-mysql=/usr/bin/mysql_ Configmake #编译make Install #安装ln-S/usr/local/zabbix/sbin/*/usr/local/sbin/#添加系统命令ln-S/usr/local/zabbix/bin/*/usr/ local/bin/#添加系统命令

3. Create a Zabbix database

Mysql-u root-p #进入MySQL控制台 CREATE database Zabbix character set UTF8; #创建数据库zabbix, and the database encoding uses UTF8 INSERT into Mysql.user (Host,user,password) VALUES (' localhost ', ' Zabbix ', Password (' 123456 ‘)); #新建账户zabbix, password 123456 grant all on zabbix.* to ' Zabbix ' @ ' localhost ' identified by ' 123456 ' with GRANT option; #允许账户zabbix能从本机连接到数据库zabbix flush Privileges; #刷新系统授权表 use Zabbix #进入数据库 source/usr/local/src/zabbix-2.2.6/database/mysql/schema.sql #导入脚本文件到zabbix数据库 source/usr/ Local/src/zabbix-2.2.6/database/mysql/images.sql #导入脚本文件到zabbix数据库 source/usr/local/src/zabbix-2.2.6/database/ Mysql/data.sql #导入脚本文件到zabbix数据库

4. Modify the configuration file

vim/usr/local/zabbix/etc/zabbix_server.conf Dbname=zabbix #数据库名称 Dbuser=zabbix #数据库用户名 dbpassword=123456 #数据库密码 Liste nip=127.0.0.1 #数据库ip地址 alertscriptspath=/usr/local/zabbix/share/zabbix/alertscripts vim/usr/local/zabbix/etc/ zabbix_agentd.conf include=/usr/local/zabbix/etc/zabbix_agentd.conf.d/ unsafeuserparameters=1 # Enable the custom key   

5. Add a startup script

Cp/usr/local/src/zabbix-2.2.6/misc/init.d/fedora/core/zabbix_server/etc/rc.d/init.d/zabbix_server #服务端cp/usr/ Local/src/zabbix-2.2.6/misc/init.d/fedora/core/zabbix_agentd/etc/rc.d/init.d/zabbix_agentd #客户端chmod +X/ETC/RC.D /init.d/zabbix_server #添加脚本执行权限chmod +x/etc/rc.d/init.d/zabbix_agentd #添加脚本执行权限chkconfig zabbix_server on # Add boot chkconfig zabbix_agentd on #添加开机启动

5.1 Modifying the Zabbix installation directory in the Zabbix boot script

vim/etc/rc.d/init.d/zabbix_server #编辑服务端配置文件 basedir=/usr/local/zabbix/ #zabbix安装目录vim/etc/rc.d/init.d/ zabbix_agentd #编辑客户端配置文件 basedir=/usr/local/zabbix/#zabbix安装目录 

6. Configure the Web site

Cd/usr/local/src/zabbix-2.2.6cp-r/usr/local/src/zabbix-2.2.6/frontends/php/var/www/html/zabbixchown Apache.apache-r/var/www/html/zabbix

7. Modify PHP configuration file parameters

Vim/etc/php.ini #编辑修改    date.timezone=prc    post_max_size =16m    max_execution_time =300    max_input_time =300

8. Install the Web interface

Open in Browser: http://IP/zabbix/setup.php start Installation

9. Other references are http://www.osyunwei.com/archives/7984.html

Zabbix server-Side installation configuration

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.