码迷,mamicode.com
首页 > 系统相关 > 详细

ubuntu16.04 安装zabbix3.4(网上过程有坑先下班等有空再整理)

时间:2018-04-20 20:39:31      阅读:601      评论:0      收藏:0      [点我收藏+]

标签:zabbix   安装   

部署Zabbix需要LAMP环境(Linux、Apache、MySQL、PHP),所以首先要安装Apache、MySQL和PHP。在Ubuntu 16.04下只有php7.0而没有php5

sudo apt-get install apache2 sudo apt-get install mysql-serversudo apt-get install php7.0 php7.0-gd libapache2-mod-php7.0   php7.0-mysql php7.0-bcmath php7.0-mbstring php7.0-xml


sudo /etc/init.d/apache2 restart



# wget http://repo.zabbix.com/zabbix/3.4/ubuntu/pool/main/z/zabbix-release/zabbix-release_3.4-1+xenial_all.deb
# dpkg -i zabbix-release_3.4-1+xenial_all.deb
# apt update


# apt install zabbix-server-mysql zabbix-frontend-php zabbix-agent



# mysql -uroot -p
password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'password';
mysql> quit;


# zcat /usr/share/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix


之后还要修改zabbix_server.conf文件

sudo nano /etc/zabbix/zabbix_server.conf1
# 配置参考如下,主要是修改密码DBHost=localhostDBName=zabbixDBUser=zabbix 
DBPassword=zabbix12345

完成以上配置后,重启zabbix-server

sudo /etc/init.d/zabbix-server restart




# systemctl restart zabbix-server zabbix-agent apache2
# systemctl enable zabbix-server zabbix-agent apache2


# 下载安装>sudo apt-get install zabbix-frontend-php

# 拷贝zabbix到apache2的前端文件夹里sudo cp -r /usr/share/zabbix /var/www/html/zabbix

ubuntu16.04 安装zabbix3.4(网上过程有坑先下班等有空再整理)

标签:zabbix   安装   

原文地址:http://blog.51cto.com/viphyy/2105920

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