上一节搭建了环境,打开虚拟机,xshell连接虚拟机,接下来咱们一起部署zabbix5.0吧。
- 关闭防火墙
上节已经操作完毕 - 检查网络环境
[root@localhost ~]# iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:domain
ACCEPT tcp -- anywhere anywhere tcp dpt:domain
ACCEPT udp -- anywhere anywhere udp dpt:bootps
ACCEPT tcp -- anywhere anywhere tcp dpt:bootps
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere 192.168.122.0/24 ctstate RELATED,ESTABLISHED
ACCEPT all -- 192.168.122.0/24 anywhere
ACCEPT all -- anywhere anywhere
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
REJECT all -- anywhere anywhere reject-with icmp-port-unreachable
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT udp -- anywhere anywhere udp dpt:bootpc
[root@localhost ~]#
均为accept即可
付iptables命令介绍http://cnzhx.net/blog/common-iptables-cli/#2l
- 服务端配置
[root@localhost ~]# free -m
total used free shared buff/cache available
Mem: 972 606 62 10 303 216
Swap: 2047 5 2042
mem:内存
内存尽量大一些,4G为好,显然我们目前虚拟机的内存约1G比较小,需要改大一点。怎么改呢?
这里我采用的是一个图形化界面的修改方式,方便快捷:
右键虚拟机,点击设置:
直接在页面上修改:
上图可以看到,我已经把内存修改成了2G。
这里要说明一点,开机状态下,虚拟机的内存可以从小往大改,但是不支持从大往小改。若想往小了改,需要关机操作。
修改后,在命令行看结果:
[root@localhost ~]# free -m
total used free shared buff/cache available
Mem: 1996 647 1081 10 267 1304
Swap: 2047 5 2042
- 获取zabbix官方源
[root@localhost ~]# rpm -Uvh https://mirrors.aliyun.com/zabbix/zabbix/5.0/rhel/7/x86_64/zabbix-release-5.0-1.el7.noarch.rpm
Retrieving