本文共 1810 字,大约阅读时间需要 6 分钟。
主机名称 | 操作系统 | IP地址 |
---|---|---|
zabbix | CentOS 7.4 | 192.168.26.56 |
hostnamectl set-hostname zabbix.rhce.ccecho '192.168.26.56 zabbix.rhce.cc zabbix' >> /etc/hosts
firewall-cmd --set-default-zone=trustedsed -i '/SELINUX=/cSELINUX=disabled' /etc/selinux/configsetenforce 0
systemctl stop NetworkManagersystemctl disable NetworkManager
rm -rf /etc/yum.repos.d/*curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repocurl -o /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.reporpm -ivh https://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
yum install zabbix-server-mysql zabbix-proxy-mysql zabbix-web-mysql zabbix-get zabbix-agent -yyum install *open*vm*tool bash* vim lrzsz wget tree -y
yum install -y mariadb-serversystemctl start mariadb.service
mysql -e 'create database zabbix character set utf8 collate utf8_bin;'mysql -e 'grant all privileges on zabbix.* to zabbix@localhost identified by "zabbix";'
zcat /usr/share/doc/zabbix-server-mysql*/create.sql.gz | mysql -uzabbix -pzabbix zabbix
sed -i.ori '91a DBHost=localhost' /etc/zabbix/zabbix_server.confsed -i.ori '115a DBPassword=zabbix' /etc/zabbix/zabbix_server.conf
sed -i.ori '18a php_value date.timezone Asia/Shanghai' /etc/httpd/conf.d/zabbix.conf
yum -y install wqy-microhei-fonts\cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf
systemctl restart mariadb.servicesystemctl start zabbix-serversystemctl start httpdsystemctl enable mariadb.servicesystemctl enable httpdsystemctl enable zabbix-server
echo "浏览器访问 http://
hostname -I|awk '{print $1}'/zabbix"
转载于:https://blog.51cto.com/12909202/2311667