Ubuntu 16.04 安装Zabbix 3.4 MySQL版 完整安装

  • 2018-09-27
  • 140
  • 0
  • 0

1:更新源

 # apt update

2:升级操作系统

 # apt upgrade

3:安装apache

 # apt-get install apache2

4:安装MySQL

 # apt install mysql-server

5:安装相关PHP及其组件

 # apt install php7.0 php7.0-gd libapache2-mod-php7.0 php7.0-mysql php7.0-bcmath php7.0-mbstring php7.0-xml

6:编辑php设定时区以及其他设置

 # vim /etc/php/7.0/apache2/php.ini
 # # 查找date字符串,查找date.timezone去除前面的";"及添加后面的字段Asia/Shanghai
date.timezone = Asia/Shanghai
max_input_time = 600
max_execution_time= 600
post_max_size = 32M

7:重启Apache已生效PHP

 # /etc/init.d/apache2 restart

8:下载安装Zabbix 3.4组件

 # wget https://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

9:安装Zabbix 3.4

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

10:进入Mysql创建Zabbix 3.4相关库及用户,password修改为你设定的密码。

 # 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;

11:拷贝Zabbix的数据表到MySQL

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

12:修改zabbix_server.conf文件

 # vim /etc/zabbix/zabbix_server.conf
# 配置参考如下,主要是修改密码,
DBHost=localhost
DBName=zabbix
DBUser=zabbix 
DBPassword=password
 

13:启动Zabbix服务器和代理进程

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

14:安装中文字体,以确保Zabbix支持中文

 # apt install language-pack-zh-hant language-pack-zh-hans

15:重启apache2已支持中文支持

 # /etc/init.d/apache2 restart

评论

还没有任何评论,你来说两句吧

你必须 登录 才能发表评论.