1.1 Check if selinux is closed
[ root@localhost ~]# getenforce
Disabled #Disabled is closed
1.1.1 Temporary closure
[ root@localhost ~]# setenforce 0 #Set SELinux into enforcing mode
1.1.2 Permanently closed
[ root@localhost ~]# vi /etc/selinux/config:
Change SELINUX=enforcing to SELINUX=disabled
Need to restart after setting to take effect
1.2 View the default firewall status
[ root@localhost ~]# firewall-cmd --state
not running #show not running after closing, and running after opening
1.2.1 Stop firewall
[ root@localhost ~]# systemctl stop firewalld.service
1.2.2 Prohibit firewall startup
[ root@localhost ~]# systemctl disable firewalld.service
2.1 Configure zabbix yum source
[ root@localhost ~]# rpm -ivh http://repo.zabbix.com/zabbix/3.4/rhel/7/x86_64/zabbix-release-3.4-2.el7.noarch.rpm
2.2 Install zabbix package, install mysql, zabbxi-agent
[ root@localhost ~]# yum install -y zabbix-server-mysql zabbix-web-mysql zabbix-agent mariadb-server
2.3 Start mariadb and set the boot to start, create a database instance, and authorize
[ root@localhost ~]# systemctl start mariadb #Start mariadb
[ root@localhost ~]# systemctl enable mariadb #Set boot up
[ root@localhost ~]# mysql #Log in to the database
MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin; #Create database instance
Query OK, 1 row affected (0.00 sec)
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@'%' identified by'zabbix'; #Authorize all hosts to access the database instance zabbix, username/password: zabbix/zabbix
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost identified by'zabbix'; #Authorize localhost host name to access database instance zabbix, username/password: zabbix/zabbix
Query OK, 0 rows affected (0.00 sec)
MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@localhost.localdomain identified by'zabbix'; #Authorize localhost.localdomain host to access database instance zabbix, username/password: zabbix/zabbix
Query OK, 0 rows affected (0.00 sec)
Import initial patterns and data
[ root@localhost ~]# cd /usr/share/doc/zabbix-server-mysql-3.4.4/ #Enter the directory where create.sql.gz is located
[ root@localhost zabbix-server-mysql-3.4.4]# zcat create.sql.gz |mysql -uroot zabbix #Import trouble mode
2.4 start zabbix-server service
2.4.1 Configure zabbix-server configuration file zabbix_server.conf
[ root@localhost zabbix-server-mysql-3.4.4]# vi /etc/zabbix/zabbix_server.conf
DBHost=localhost # Data host name
DBName=zabbix # database instance
DBUser=zabbix # user name
DBPassword=zabbix # password
2.4.2 Start zabbix-server service
[ root@localhost zabbix-server-mysql-3.4.4]# systemctl start zabbix-server #Start zabbix-server service
[ root@localhost zabbix-server-mysql-3.4.4]# systemctl enable zabbix-server #Set the zabbix-server service to start automatically
2.5 Edit the Apache configuration file, uncomment and set the correct time zone
[ root@localhost zabbix-server-mysql-3.4.4]# vi /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
Start the httpd service, set the boot to start the httpd service
[ root@localhost ~]# systemctl start httpd #Start httpd service
[ root@localhost ~]# systemctl enable httpd #Set boot to start httpd service
Start zabbix-agent and set it to start automatically
[ root@localhost ~]# systemctl start zabbix-agent # Start zabbix-agent service
[ root@localhost ~]# systemctl enable zabbix-agent # Set zabbix-agent service to start automatically
Zabbix web page installation
4.1. Enter the address http://serverip/zabbix/setup.php in the browser, the welcome interface appears, click Next;
4.2. The necessary condition detection interface appears, normal is OK, click Next
4.3. Configure the DB connection, consistent with the host, database name, user name, and password in the zabbix_server.conf file, click Next
4.4. zabbix server details, click next
4.5. Summarize before installation, check the information is correct, click Next to install
4.6. Successful installation
Congratulations! You have successfully installed Zabbix frontend.
Configuration file directory
Configuration file "/etc/zabbix/web/zabbix.conf.php" created.
5 zabbix web login
Enter http://zabbix server ip/zabbix/index.php in the browser, enter the administrator user name Admin (case sensitive), the default password zabbix, and click login.
( adsbygoogle = window.adsbygoogle || []).push({});
Recommended Posts