码迷,mamicode.com
首页 > 其他好文 > 详细

Centos6.8 安装Zabbix3.4

时间:2018-07-30 11:26:07      阅读:175      评论:0      收藏:0      [点我收藏+]

标签:unit   sea   sources   mysql5.6   XML   always   centos   apache服务   用户   

一、部署zabbix

1、下载软件包

https://www.zabbix.com/download_sources

2、安装mysql5.6,由于Centos6.8默认安装的版本是5.1的,故要先卸载再安装5.6版本的

yum remove mysql* -y

3、配置mysql5.6的源

vim /etc/yum.repos.d/mysql.repo

[mysql56]  
name=MySQL 5.6 Community Server  
baseurl=http://repo.mysql.com/yum/mysql-5.6-community/el/6/$basearch/  
enabled=1  
gpgcheck=0  
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql

#yum clean all

#yum makecache

安装mysql

yum install mysql-community-server -y

#配置my.cnf

#vi /etc/my.cnf
[mysqld]
innodb_file_per_table=1  #增加这一行代码

4、安装php5.6和Apache服务

#获取yum源
rpm -ivh http://repo.webtatic.com/yum/el6/latest.rpm
yum clean all
yum makecache

#安装下列所有包
yum search httpd php56w php56w-gd php56w-mysqlnd php56w-bcmath php56w-mbstring php56w-xml php56w-ldap
yum -y install httpd php56w php56w-gd php56w-mysqlnd php56w-bcmath php56w-mbstring php56w-xml php56w-ldap

#编辑php的ini文件
vim /etc/php.ini

max_execution_time = 300
max_input_time = 300
date.timezone = Asia/Shanghai
always_populate_raw_post_data = -1

#配置/etc/httpd/conf/httpd.conf
DocumentRoot "/var/www/html/zabbix"
<Directory "/var/www/html/zabbix">
ServerName 127.0.0.1
DirectoryIndex index.html index.html.var index.php

#设置web前端
mkdir /var/www/html/zabbix
cp -a zabbix-3.4.3/frontends/php/ /var/www/html/zabbix

#设置apache的执行和所有者
chown -R apache:apache /var/www/html/zabbix

#赋予可执行权限
chmod +x /var/www/html/zabbix/conf/

5、创建zabbix用户和组

groupadd zabbix
useradd -g zabbix zabbix

6、编译安装zabbix

groupadd zabbix
useradd -g zabbix zabbix
yum install gcc* mysql-devel libxml2-devel net-snmp* java* curl-devel -y
yum install libdbi-dbd-mysql net-snmp-devel curl-devel net-snmp libcurl-devel libxml2-devel ncurses-devel libssh2-devel OpenIPMI-devel iksemel-devel  libxml2-devel  unixODBC-devel OpenIPMI-devel curl-devel libevent-devel pcre pcre-devel -y

#编译安装
./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --enable-java --with-net-snmp --with-libcurl --with-libxml2 --with-unixodbc --with-ssh2 --with-openipmi --with-openssl --prefix=/usr/local/zabbix

#编译成功
*******************************************************
*            Now run ‘make install‘                       *
*                                                         *
*            Thank you for using Zabbix!                  *
*              <http://www.zabbix.com>                    *
*******************************************************

 











 

Centos6.8 安装Zabbix3.4

标签:unit   sea   sources   mysql5.6   XML   always   centos   apache服务   用户   

原文地址:https://www.cnblogs.com/nulige/p/9388814.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!