Zabbix 安裝部署
一、初始化系統設定
systemctl stop firewalld
systemctl disable firewalld
setenforce 0
sed -i "s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config
二、安裝 LAMP 環境
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
yum clean all
yum makecache
yum -y install mariadb mariadb-server httpd php php-mysql
systemctl enable httpd
systemctl restart httpd
systemctl enable mariadb
systemctl restart mariadb
mysql_secure_installation
三、Zabbix 初始化
rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-ZABBIX
yum -y install zabbix-server-mysql zabbix-web-mysql zabbix-agent
mysql -u root -p
CREATE DATABASE zabbix DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix';
cd /usr/share/doc/zabbix-server-mysql-3.2.1
zcat create.sql.gz | mysql -uroot -p zabbix
vim /etc/zabbix/zabbix_server.conf
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
systemctl start zabbix-server
systemctl enable zabbix-server
systemctl restart httpd
vim /etc/httpd/conf/httpd.conf
修改documentroot
/usr/share/zabbix
vim /etc/httpd/conf.d/zabbix.conf
php_value max_execution_time 300
php_value memory_limit 128M
php_value post_max_size 16M
php_value upload_max_filesize 2M
php_value max_input_time 300
php_value always_populate_raw_post_data -1
php_value date.timezone Asia/Shanghai
ntpdate -u ntp1.aliyun.com
systemctl restart httpd
四、修改中文亂碼
/usr/share/zabbix/fonts
Admin
zabbix
五、新增客戶端
vi /usr/local/zabbix/etc/zabbix_agentd.configure
LogFile=/tmp/zabbix_agentd.log
Server= 192.168.24.10{server端IP}
ServerActive= 192.168.24.10{server端IP}
Hostname=192.168.24.20{自身IP地址}
rpm -ivh http://repo.zabbix.com/zabbix/3.2/rhel/6/x86_64/zabbix-release-3.2-1.el6.noarch.rpm