一、安裝mysqlphp
yum install -y mariadb mariadb-servermysql
systemctl start mariadblinux
二、安裝apacheweb
yum -y install httpdsql
systemctl start httpd.service數據庫
三、安裝phpapache
yum -y install phpspa
yum -y install php-mysql代理
重啓apache: systemctl restart httpdrest
四、安裝zabbix
rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
yum -y install zabbix-server-mysql zabbix-web-mysql
五、初始化數據庫
create database zabbix character set utf8 collate utf8_bin;
zcat create.sql.gz | mysql -u root -p zabbix
備註:需進入/usr/share/doc/zabbix-server-mysql-3.2.7
六、啓動zabbix服務:
修改 /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=root
DBPassword=root
systemctl start zabbix-server
systemctl start httpd
進入:http://IP/zabbix/ 完成初始化,跳轉至zabbix登錄界面,默認帳戶 Admin zabbix
七、安裝代理
yum -y install zabbix-agent
修改etc/zabbix/zabbix_agentd.conf,修改參數以下:
Server:服務端IP地址
ServerActive:服務端IP地址
Hostname:本機IP地址
八、基本使用:
8.1 在Configuration -> Hosts中添加主機;
8.2 添加完成後在Monitoring下查看參數:
備註下例中添加主機時選擇了linux os這個模板,理解模板裏前置定義了監控項(item),監控異常後處理(trigger)、圖標(graph)等