安装zabbix

安装zabbix

#配置zabbix源

rpm -ivh https://mirrors.aliyun.com/zabbix/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm
yum clean all

#安装Zabbix server, frontend, agent

yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent

#启动并设置开机自启zabbix-server,zabbix-agent

systemctl restart zabbix-server zabbix-agent
systemctl enable zabbix-server zabbix-agent

初始化mysql数据库

mysql -uroot -p123456

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

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

编辑zabbix-server配置文件

vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=123456	#只修改此处

复制zabbix站点文件到apache站点目录

mkdir -p /var/www/html/zabbix
cp -a /usr/share/zabbix/* /var/www/html/zabbix/

重启httpd,zabbix-server,zabbix-agent

systemctl restart httpd zabbix-server zabbix-agent

访问zabbix页面

http://10.0.0.41/zabbix/

默认用户名:Admin 
密码:zabbix

页面会出现部分参数,failed,需要调整一下参数:

vim /etc/php.ini 
date.timezone = Asia/Shanghai

重启httpd

systemctl restart httpd

你可能感兴趣的:(安装zabbix)