CentOS7安装部署zabbix server 5.0 LTS

环境如下:

zabbix版本:5.0LTS

系统版本:CentOS7

数据库:centos7 默认的 mariadb 数据库

WEB server:nginx

 

Install and configure Zabbix server for your platform

a. Install Zabbix repository

# rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
# yum clean all

b. Install Zabbix server and agent

# yum install zabbix-server-mysql zabbix-agent

c. Install Zabbix frontend

Enable Red Hat Software Collections

# yum install centos-release-scl

Edit file /etc/yum.repos.d/zabbix.repo and enable zabbix-frontend repository.

[zabbix-frontend]
...
enabled=1
...

Install Zabbix frontend packages.

# yum install zabbix-web-mysql-scl zabbix-nginx-conf-scl
# yum install mariadb-server -y
# systemctl enable --now mariadb

d. Create initial database

Make sure you have database server up and running.

Run the following on your database host.

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

On Zabbix server host import initial schema and data. You will be prompted to enter your newly created password.

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

e. Configure the database for Zabbix server

Edit file /etc/zabbix/zabbix_server.conf

DBPassword=password

f. Configure PHP for Zabbix frontend

Edit file /etc/opt/rh/rh-nginx116/nginx/conf.d/zabbix.conf, uncomment and set 'listen' and 'server_name' directives.

listen 80;
server_name zabbix.net-7x24.cn;

Edit file /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf, add nginx to listen.acl_users directive.

listen.acl_users = apache,nginx

Then uncomment and set the right timezone for you.

php_value[date.timezone] = Asia/Shanghai

g. Start Zabbix server and agent processes

Start Zabbix server and agent processes and make it start at system boot.

# systemctl restart zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm
# systemctl enable zabbix-server zabbix-agent rh-nginx116-nginx rh-php72-php-fpm

 

H. visit the zabbix install page http://zabbix.net-7x24.cn

登录账号为 Admin,密码:zabbix

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值