10.0.0.61 zabbix-server
hostnamectl set-hostname zabbix-server && bash
sed -ri 's#(IPADDR=)(.*)#\110.0.0.61#g' /etc/sysconfig/network-scripts/ifcfg-eth0
systemctl restart network && ip add
cat >>/etc/hosts<<EOF
10.0.0.61 zabbix-server
EOF
wget http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
rpm -ivh zabbix-release-4.0-1.el7.noarch.rpm
yum install zabbix-server-mysql zabbix-web-mysql -y
rpm -qa |grep zabbix
yum install mariadb-server -y
systemctl start mariadb
systemctl enable mariadb
mysql_secure_installation
回车
n
4次y
create database zabbix character set utf8 collate utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by '123456';
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -p123456 zabbix
#检查zabbix库是否导入成功
mysql -uroot zabbix -e 'show tables;'
vi /etc/zabbix/zabbix_server.conf
91行:DBHost=localhost
100行:DBName=zabbix
116行:DBUser=zabbix
124行:DBPassword=123456
#启动zabbix-server
systemctl start zabbix-server
systemctl enable zabbix-server
#检查
netstat -lntup | grep 10051
vi /etc/httpd/conf.d/zabbix.conf #<==修改时区为上海
20行:php_value date.timezone Asia/Shanghai
systemctl start httpd
systemctl enable httpd
浏览器访问:http://10.0.0.61/zabbix
登录的账号密码:
Admin
zabbix
后期修改zabbix数据库密码的时候,需要修改的配置文件:
/etc/zabbix/web/zabbix.conf.php
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。