一、安装软件包:
yum install -y httpd mariadb-server mariadb php php-mysql php-gd libjpeg* php-ldap php-odbc php-pear php-xml php-xmlrpc php-mhash php-mbstring php-bcmath
rpm -ivh http://repo.zabbix.com/zabbix/3.5/rhel/7/x86_64/zabbix-release-3.5-1.el7.noarch.rpm
yum install zabbix-server-mysql zabbix-web-mysql zabbix-get zabbix-server zabbix-web zabbix-agent
一、启动数据库:
systemctl start mariadb.service
二、初始化数据库:
mysql_secure_installation
三、建立zabbix库及帐号密码:
mysql -u root -p
CREATE DATABASE zabbix character set utf8 collate utf8_bin;
GRANT all ON zabbix.* TO 'zabbix'@'%' IDENTIFIED BY 'zabbix@123'
flush privileges;
四、导入数据:
zcat /usr/share/doc/zabbix-server-mysql-4.0.0/create.sql.gz | mysql -uzabbix -p -h 192.168.128.100 zabbix
一、修改/etc/httpd/conf/httpd.conf: DirectoryIndex index.html index.php 二、修改 /etc/php.ini: date.timezone = PRC
三、修改selinux为disabled:
setenforce 0
四、修改/etc/zabbix/zabbix_server.conf:
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix@123
五、修改/etc/httpd/conf.d/zabbix.conf:
php_value date.timezone Asia/Shanghai
一、加入自启动
systemctl enable zabbix-server
systemctl enable zabbix-agent
systemctl enable httpd
systemctl enable mariadb
二、重启服务:
systemctl restart zabbix-server
systemctl restart zabbix-agent
systemctl restart httpd
systemctl restart mariadb
三、关闭防火墙:
systemctl stop firewalld.service
systemctl disable firewalld
1、访问进行初始化后帐号密码为Admin,zabiix: http://192.168.80.181/zabbix/
一、修改/etc/zabbix/zabbix-agent.conf:
Server=*.*.*.* #主动模式地址
ServerActive=*.*.*.* #被动模式地址
Hostname=主机名(最好和zabbix的主机名同样,否则主动来拉取地址的时候会有问题)
二、重启:
systemctl restart zabbix-agent