centos安装zabbix4.0
1.关闭selinux #setenforce 0 #sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config 2.安装依赖包 #yum install epel-release.noarch wget vim gcc gcc-c++ lsof chrony tree nmap unzip rsync telnet net-tools httpd mariadb mariadb-client php php-mysql -y 3.安装zabbix和数据库 #rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 #rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7 #yum install -y httpd mariadb mariadb-server mariadb-client php php-mysql #rpm -ivh http://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm #rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX #yum install -y zabbix-server-mysql zabbix-web-mysql zabbix-get zabbix-agent #systemctl start mariadb.service 4.导入数据库 # mysql -uroot -p MariaDB [(none)]> CREATE DATABASE zabbix DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; MariaDB [(none)]> GRANT ALL ON zabbix.* TO 'zabbix'@'localhost' IDENTIFIED BY 'test'; MariaDB [(none)]> update user set password=PASSWORD('12345678') where USER='zabbix'; MariaDB [(none)]> flush privileges; # zcat /usr/share/doc/zabbix-server-mysql-4.0/create.sql.gz | mysql -uzabbix -p zabbix 5.配置zabbix # vi /etc/zabbix/zabbix_server.conf # vim /etc/httpd/conf.d/zabbix.conf 取消注释 php_value date.timezone # systemctl start httpd # systemctl start zabbix-server # systemctl enable zabbix-server # systemctl enable httpd #systemctl enable mariadb.service 通过
http://ip/zabbix 访问 默认用户名/密码:Admin/zabbix,注意用户名也区分大小写
扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄

更多精彩