您好,登錄后才能下訂單哦!
一、安裝環境介紹
操作系統:CentOS6.5
Mysql: 5.1
php: 官方要求5.4以上,php7暫不支持,本文選擇使用php5.6
Apache: httpd2.2
zabbix: 3.0
二、安裝httpd
yum -y install httpd httpd-devel
三、安裝php
a.添加repo源(二選一)
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
rpm -Uvh https://mirror.webtatic.com/yum/el6/latest.rpm
b.安裝php及相關組件
yum install php56w php56w-cli php56w-common php56w-devel php56w-pear php56w-gd php56w-mbstring php56w-mysql php56w-xml php56w-bcmath
四、安裝mysql
yum -y install mysql-server mysql
啟動數據庫并設置密碼
service mysqld start
/usr/bin/mysqladmin -u root password '123456'
五、安裝zabbix
a.添加repo源
vi /etc/yum.repo.d/zabbix.repo
[zabbix]
name=Zabbix Official Repository - $basearch
baseurl=http://repo.zabbix.com/zabbix/3.0/rhel/6/$basearch/
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
[zabbix-non-supported]
name=Zabbix Official Repository non-supported - $basearch
baseurl=http://repo.zabbix.com/non-supported/rhel/6/$basearch/
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
gpgcheck=1
b.安裝相關組件
yum install OpenIPMI libssh3 fping libcurl libiksemel net-snmp
c.安裝zabbix
yum install -y zabbix-release.noarch
yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent zabbix-java-gateway
d.創建初始化數據庫
mysql> create database zabbix character set utf8 collate utf8_bin; mysql> grant all privileges on zabbix.* to zabbix@localhost identified by '<password>'; mysql> quit;
zcat /usr/share/doc/zabbix-server-mysql-3.0.*/create.sql.gz | mysql -uzabbix -p zabbix
e.修改zabbix配置文件
# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=<password>
六、啟動zabbix-server
service zabbix-server start
七、添加httpd的zabbix.conf文件
cp /usr/share/doc/zabbix-web-3.0.7/httpd22-example.conf /etc/httpd/conf.d/zabbix.conf
修改文件里的date.timezone Asia/ShangHai
重啟httpd服務
service httpd restart
訪問
http://172.0.0.1/zabbix
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。