您好,登錄后才能下訂單哦!
在CentOS 7上使用Yum源安裝 Zabbix 3.2
1. 環境準備
[root@szzabbix ~]# setenforce 0 [root@szzabbix ~]# sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config [root@szzabbix ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 [root@szzabbix ~]# yum install epel-release.noarch wget vim gcc gcc-c++ lsof chrony tree nmap unzip rsync -y [root@szzabbix ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
2. LAMP安裝
[root@szzabbix ~]# yum install httpd mariadb mariadb-server mariadb-client php php-mysql [root@szzabbix ~]# systemctl start mariadb
3. Zabbix安裝
[root@szzabbix ~]# rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm [root@szzabbix ~]# rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX [root@szzabbix ~]# yum install zabbix-server-mysql zabbix-web-mysql zabbix-get zabbix-agent
4. 創建數據庫
[root@szzabbix ~]#mysqladmin -u root password ABCabc!@#123 [root@szzabbix ~]# mysql -uroot -p
MariaDB [(none)]> CREATE DATABASE zabbix DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; MariaDB [(none)]> GRANT ALL ON zabbix.* TO 'zabbix'@'%' IDENTIFIED BY 'zabbix'; MariaDB [(none)]> GRANT ALL ON zabbix.* TO 'zabbix'@'localhost' IDENTIFIED BY 'zabbix'; MariaDB [(none)]> flush privileges; MariaDB [(none)]> quit
5. 導入數據
[root@szzabbix ~]# cd /usr/share/doc/zabbix-server-mysql-3.2.0/ [root@szzabbix zabbix-server-mysql-3.2.0]# zcat create.sql.gz | mysql -uroot -p zabbix [root@szzabbix zabbix-server-mysql-3.2.0]# cd ~
6. 修改配置
[root@szzabbix ~]# vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
[root@szzabbix ~]# vim /etc/httpd/conf.d/zabbix.conf
php_value date.timezone Asia/Chongqing
7. 啟動
[root@szzabbix ~]# systemctl start httpd [root@szzabbix ~]# systemctl start zabbix-server [root@szzabbix ~]# systemctl start zabbix-agent
8. 通過 http://ip地址/zabbix配置
訪問默認用戶名/密碼:Admin/zabbix,注意用戶名也區分大小寫
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。