centos7.9安装zabbix5.0
1 rpm -Uvh https://repo.zabbix.com/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
2 ls /etc/yum.repos.d/
3 yum list | grep zabbix
4 yum -y install zabbix-server-mysql zabbix-agent
5 yum -y install centos-release-scl
6 yum -y install mariadb-server mariadb
7 systemctl start mariadb
8 systemctl enable mariadb
初始化数据库,设置root密码
9 mysql_secure_installation
10 yum install zabbix-web-mysql-scl zabbix-apache-conf-scl
修改[zabbix-frontend],enabled=1
11 vim /etc/yum.repos.d/zabbix.repo
12 yum clean all
13 yum install zabbix-web-mysql-scl zabbix-apache-conf-scl
14 rpm -qa | grep zabbix
进入数据库,创建数据库zabbix,设置zabbix用户和密码
15 mysql -uroot -p
MariaDB [(none)]> show databases;
+——————–+
| Database |
+——————–+
| information_schema |
| mysql |
| performance_schema |
+——————–+
3 rows in set (0.00 sec)
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> create user zabbix@localhost identified by ‘zabbix’;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost;
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> quit
Bye
16 zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p zabbix
修改DBPassword=zabbix
17 vi /etc/zabbix/zabbix_server.conf
修改时区为亚洲上海php_value[date.timezone] = Asia/Shanghai
18 vi /etc/opt/rh/rh-php72/php-fpm.d/zabbix.conf
19 systemctl restart zabbix-server zabbix-agent httpd rh-php72-php-fpm
20 systemctl enable zabbix-server zabbix-agent httpd rh-php72-php-fpm
21 [root@king_test_1 ~]# netstat -nltpu
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1015/sshd
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN 1423/master
tcp 0 0 0.0.0.0:10050 0.0.0.0:* LISTEN 10127/zabbix_agentd
tcp 0 0 0.0.0.0:10051 0.0.0.0:* LISTEN 10105/zabbix_server
tcp 0 0 127.0.0.1:9000 0.0.0.0:* LISTEN 10100/php-fpm: mast
tcp 0 0 0.0.0.0:3306 0.0.0.0:* LISTEN 9726/mysqld
tcp6 0 0 :::80 :::* LISTEN 10197/httpd
tcp6 0 0 :::22 :::* LISTEN 1015/sshd
tcp6 0 0 ::1:25 :::* LISTEN 1423/master
tcp6 0 0 :::10050 :::* LISTEN 10127/zabbix_agentd
tcp6 0 0 :::10051 :::* LISTEN 10105/zabbix_server
udp 0 0 0.0.0.0:68 0.0.0.0:* 9124/dhclient
udp 0 0 127.0.0.1:323 0.0.0.0:* 712/chronyd
udp6 0 0 ::1:323 :::* 712/chronyd
22 页面打开,输入IP地址,如:http://192.168.56.129/zabbix
23 输入数据库密码:zabbix,其他不变,一直点击下一步即可
24 登录用户名:Admin,密码:zabbix
25 设置页面显示为中文乱码问题。
0 条评论