The yum install zabbix

# Set analytic Note: better network conditions, you can not self yum source

echo ‘10.0.0.1 mirrors.aliyuncs.com mirrors.aliyun.com repo.zabbix.com’ >> /etc/hosts

# Zabbix installation source, aliyun YUM source
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo
curl -o / etc / yum. repos.d / epel.repo http://mirrors.aliyun.com/repo/epel-6.repo
RPM -ivh http://repo.zabbix.com/zabbix/3.0/rhel/7/x86_64/zabbix-release -3.0-1.el7.noarch.rpm

#安装zabbix
yum install -y zabbix-server-mysql zabbix-web-mysql

# Installation starts mariadb database

yum install -y mariadb-server
systemctl 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”;’

# Import data
zcat /usr/share/doc/zabbix-server-mysql-3.0.13/create.sql.gz|mysql -uzabbix -pzabbix zabbix

# Configure zabbixserver connected MySQL
Sed -i.ori '= ZABBIX DBPassword 115a' /etc/zabbix/zabbix_server.conf

When adding zone #
sed -i.ori '18a php_value date.timezone Asia / Shanghai' /etc/httpd/conf.d/zabbix.conf

Solve the Chinese garbled #
yum -y install wqy-microhei-Fonts
\ cp /usr/share/fonts/wqy-microhei/wqy-microhei.ttc /usr/share/fonts/dejavu/DejaVuSans.ttf

# Start Service
systemctl Start zabbix-Server
systemctl Start httpd

# Write boot from the start
chmod + /etc/rc.d/rc.local the X-
CAT >> / etc / rc.d / rc.local << EOF
systemctl Start mariadb.service
systemctl Start httpd
systemctl Start zabbix-Server
EOF

# Output
echo "browser to access HTTP: // hostname -I|awk '{print $1}'/ zabbix"

Published 52 original articles · won praise 1 · views 1682

Guess you like

Origin blog.csdn.net/wx25051/article/details/104522246