安装前的准备工作
1、操作系统要求
2、配置编译环境以及安装一些依赖包
3、关闭selinux、firewall
setenforce 0
systemctl stop firewalld.service
4、安装依赖软件包
yum install gcc net-snmp-devel libxml2-devel mysql-devel -y
搭建lamp
*1.安装mysql
*2.安装apache
*3安装php
下载zabbix3.0
wge thttp://sourceforge.net/projects/zabbix/files/ZABBIX%20Latest%20Development/3.0.0alpha4/zabbix-3.0.0alpha4.tar.gz
tar zxvf zabbix-3.0.0alpha4.tar.gz
cd zabbix-3.0.0alpha4
./configure --prefix=/usr/local/zabbix --with-mysql --with-libxml2 --with-net-snmp --with-libcurl --enable-server --enable-agent
make
make install
//所需参数 ./configuer -h
创建数据库
1 | mysql -uroot -p |
导入数据库
1 |
|
#创建用户组
[root@localhost ~]# groupadd zabbix
[root@localhost ~]# useradd -g zabbix zabbix
编辑
[root@localhostlocal#vi/usr/local/zabbix/etc/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=123456
BPort=3306
编辑vi /etc/php.ini
post_max_size =16M
max_execution_time =300
max_input_time =300
date.timezone = Asia/Shanghai
配置web
[root@localhost frontends]# mkdir /var/www/html/zabbix
root@localhost frontends]# cp -a php/* /var/www/html/zabbix/
启动服务
1 | [root@localhost frontends]# systemctl restart php-fpm.service |
安装zabbix
在IE中输入http://ip/zabbix