Centos6.8 安装Zabbix3.4
Posted nulige
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Centos6.8 安装Zabbix3.4相关的知识,希望对你有一定的参考价值。
一、部署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的主要内容,如果未能解决你的问题,请参考以下文章