setenforce 0php
安裝zabbixmysql
sudo rpm -i https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpmweb
sudo yum install -y zabbix-server-mysql zabbix-web-mysql zabbix-agentsql
數據庫安裝設置數據庫
sudo yum install -y mariadb-servervim
sudo systemctl enable mariadb服務器
sudo systemctl start mariadb架構
sudo mysql_secure_installation ide
建立數據庫用戶,並導入數據庫架構post
sudo mysql -uroot -p
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbixpasswd';
mysql> quit;
cd /usr/share/doc/zabbix-server-mysql-4.0.0/
sudo zcat create.sql.gz | mysql -uroot -p zabbix
sudo vi /etc/zabbix/zabbix_server.conf
--
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbixpasswd
--
sudo 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
依據所在時區,你能夠取消 「date.timezone」 設置的註釋,並正確配置它。在配置文件更改後,須要重啓Apache Web服務器。
sudo systemctl start zabbix-server
sudo systemctl enable zabbix-server
sudo systemctl status zabbix-server
sudo systemctl start httpd
sudo systemctl enable httpd
sudo systemctl status httpd
firefox http://localhost/zabbix