Zabbix4.4服务端安装

IT
IT
IT
335
文章
1
评论
2020年4月11日10:31:24 评论 822 3164字阅读10分32秒

选择您Zabbix服务器的平台

Zabbix4.4服务端安装

安装 数据库
[xiaoxin@iZ2zed99h19kmb7fgbjcghZ ~]$ sudo rpm -Uvh https://repo.zabbix.com/zabbix/4.4/rhel/7/x86_64/zabbix-release-4.4-1.el7.noarch.rpm
[xiaoxin@iZ2zed99h19kmb7fgbjcghZ ~]$ sudo yum clean all
[xiaoxin@iZ2zed99h19kmb7fgbjcghZ ~]$ sudo yum install zabbix-server-mysql zabbix-agent -y
  • Install epel repository.
[xiaoxin@iZ2zed99h19kmb7fgbjcghZ ~]$ sudo yum install epel-release
  • Install Zabbix frontend packages.
[xiaoxin@iZ2zed99h19kmb7fgbjcghZ ~]$ sudo yum install zabbix-web-mysql zabbix-nginx-conf -y
安装数据库
[xiaoxin@iZ2zed99h19kmb7fgbjcghZ ~]$ sudo yum -y install mariadb-server
[xiaoxin@iZ2zed99h19kmb7fgbjcghZ ~]$ sudo systemctl start mariadb
[xiaoxin@iZ2zed99h19kmb7fgbjcghZ ~]$ sudo systemctl enable mariadb
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.

创建Zabbix相应的数据库和用户

[xiaoxin@iZ2zed99h19kmb7fgbjcghZ ~]$ sudo mysql
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 3
Server version: 5.5.64-MariaDB MariaDB Server
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> CREATE DATABASE zabbix CHARSET utf8 COLLATE utf8_bin;
MariaDB [(none)]> GRANT ALL ON zabbix.* TO zabbixadmin@localhost IDENTIFIED BY '123456';
Query OK, 0 rows affected (0.00 sec)

导入Zabbix自带的SQL语句

[xiaoxin@iZ2zed99h19kmb7fgbjcghZ ~]$ rpm -ql zabbix-server-mysql
/etc/logrotate.d/zabbix-server
/etc/zabbix/zabbix_server.conf
/usr/lib/systemd/system/zabbix-server.service
/usr/lib/tmpfiles.d/zabbix-server.conf
/usr/lib/zabbix/alertscripts
/usr/lib/zabbix/externalscripts
/usr/sbin/zabbix_server_mysql
/usr/share/doc/zabbix-server-mysql-4.4.7
/usr/share/doc/zabbix-server-mysql-4.4.7/AUTHORS
/usr/share/doc/zabbix-server-mysql-4.4.7/COPYING
/usr/share/doc/zabbix-server-mysql-4.4.7/ChangeLog
/usr/share/doc/zabbix-server-mysql-4.4.7/NEWS
/usr/share/doc/zabbix-server-mysql-4.4.7/README
/usr/share/doc/zabbix-server-mysql-4.4.7/create.sql.gz
/usr/share/man/man8/zabbix_server.8.gz
/var/log/zabbix
/var/run/zabbix
[xiaoxin@iZ2zed99h19kmb7fgbjcghZ ~]$ zcat /usr/share/doc/zabbix-server-mysql-4.4.7/create.sql.gz | mysql -uzabbixadmin -p123456 zabbix

修改Zabbix服务器端的配置文件/etc/zabbix_server.conf的相关参数

[xiaoxin@iZ2zed99h19kmb7fgbjcghZ ~]$ sudo vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbixadmin
 DBPassword=123456

修改httpd的配置文件/etc/httpd/conf.d/zabbix.conf

[xiaoxin@iZ2zed99h19kmb7fgbjcghZ ~]$ sudo vim /etc/php-fpm.d/zabbix.conf
php_value[date.timezone] = Asia/Shanghai
启动Zabbix server和agent进程

启动Zabbix server和agent进程,并为它们设置开机自启

[xiaoxin@iZ2zed99h19kmb7fgbjcghZ ~]$ sudo systemctl restart zabbix-server zabbix-agent nginx php-fpm
[xiaoxin@iZ2zed99h19kmb7fgbjcghZ ~]$ sudo systemctl enable zabbix-server zabbix-agent nginx php-fpm
Created symlink from /etc/systemd/system/multi-user.target.wants/nginx.service to /usr/lib/systemd/system/nginx.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/php-fpm.service to /usr/lib/systemd/system/php-fpm.service.
为Zabbix前端配置PHP

编辑配置文件 /etc/nginx/conf.d/zabbix.conf, uncomment and set 'listen' and 'server_name' directives.

[xiaoxin@iZ2zed99h19kmb7fgbjcghZ ~]$ sudo vim /etc/nginx/conf.d/zabbix.conf

server {
listen 80;
server_name zabbix.lucky.tech;
  • 访问

http://zabbix.lucky.tech/

Zabbix4.4服务端安装

系统默认的用户名:Admin

系统默认密码:zabbix

Zabbix4.4服务端安装

继续阅读
  • 我的QQ
  • QQ扫一扫
  • weinxin
  • 我的头条
  • 头条扫一扫
  • weinxin
IT
  • 本文由 发表于 2020年4月11日10:31:24
  • 除非特殊声明,本站文章均为原创,转载请务必保留本文链接
zabbix4.4配置自动发现 zabbix

zabbix4.4配置自动发现

配置->自动发现->创建发现规则   添加自动发现动作 配置->动作 事件源选自动发现 监测->自动发现 配置->主机
zabbix4.4服务端安装字体 zabbix

zabbix4.4服务端安装字体

打开图形页面有乱码 $ sudo yum install wqy-microhei-fonts -y 修改字体链接,链接到新安装的字体 $ sudo rm /usr/share/zabbix/asse...