2018-11-15
Install and configure Zabbix server
本章轉載zabbix官方文檔php
a. Install Repository with MySQL database
documentation
rpm -i https://repo.zabbix.com/zabbix/4.0/rhel/7/x86_64/zabbix-release-4.0-1.el7.noarch.rpm
b. Install Zabbix server, frontend, agent
yum install zabbix-server-mysql zabbix-web-mysql zabbix-agent
c. Create initial database
documentation
mysql -uroot -p
password
mysql> create database zabbix character set utf8 collate utf8_bin;
mysql> grant all privileges on zabbix. to zabbix@localhost identified by '123456';
mysql> quit;
Import initial schema and data. You will be prompted to enter your newly created password.
zcat /usr/share/doc/zabbix-server-mysql/create.sql.gz | mysql -u zabbix -p zabbix
d. Configure the database for Zabbix server
Edit file /etc/zabbix/zabbix_server.conf
DBPassword=123456
e. Configure PHP for Zabbix frontend
Edit file /etc/httpd/conf.d/zabbix.conf, uncomment and set the right timezone for you.# php_value date.timezone Asia/China
f. Start Zabbix server and agent processes
Start Zabbix server and agent processes and make it start at system boot:
systemctl restart zabbix-server zabbix-agent httpd
systemctl enable zabbix-server zabbix-agent httpd
Now your Zabbix server is up and running!
Configure Zabbix frontend
Connect to your newly installed Zabbix frontend: http://server_ip_or_name/zabbix
Installing frontend
Step 1
In your browser, open Zabbix URL: http://<server_ip_or_name>/zabbix
You should see the first screen of the frontend installation wizard.mysql
Step 2
Make sure that all software prerequisites are met.web
Step 3
Enter details for connecting to the database. Zabbix database must already be created.
if localhost is incorrect, please change it to 127.0.0.1sql
Step 4
Enter Zabbix server details.frontend
Entering a name for Zabbix server is optional, however, if submitted, it will be displayed in the menu bar and page titles.
Step 5
Review a summary of settings.ide
Step 6
Download the configuration file and place it under conf/ in the webserver HTML documents subdirectory where you copied Zabbix PHP files to.ui
Providing the webserver user has write access to conf/ directory the configuration file would be saved automatically and it would be possible to proceed to the next step right away.
Step 7
Finish the installation.rest
Step 8
Zabbix frontend is ready! The default user name is Admin, password zabbix.server