Close selinux #setenforce 0 temporarily close
You need to turn off selinux, be sure to turn off this, turning on selinux will cause a series of problems, even the discovery function of zabbix can't be used normally
Confirm whether the modification is successful
Then restart the system
Turn off the firewall
systemctl startfirewalld.service#Start firewall
systemctl stopfirewalld.service#Stop firewall
systemctl disablefirewalld.service#Prohibit firewall from booting up
Install YUM source: cd /etc/yum.repos.d/
wgethttp://mirrors.163.com/.help/CentOS7-Base-163.repo
yum clean all
yum makecache
Starting from the latest version of the linux system, the default is Mariadb instead of mysql!
It is very simple to use the repos that comes with the system:
Start mariadb
The previous service management commands can also be used
Set up auto start
Secure initialization, set root password, etc.
Test login
ServerName localhost:80
"Enabled" means that the httpd service has been set to start, and "active (running)" means that the httpd service is running.
# yum -y install php
Install php-mysql
php-mysql is a module for PHP programs to use MySQL database. To install the module, use the command:
# yum -y install php-mysql
After the installation is complete, PHP will generate the configuration file /etc/httpd/conf.d/php.conf, because the configuration file is in the /etc/httpd/conf.d directory, so it will be read by Apache. PHP will also generate a configuration file /etc/httpd/conf.modules.d/10-php.conf, which will also be read by Apache, and its settings allow Apache to load PHP modules. However, the configuration file of the PHP software itself is actually /etc/php.ini.
Can be tested: In order to test whether Apache can call PHP normally, create a new phpinfo.php document in the /var/www/html directory with the content as follows:
php phpinfo();?> //Among them It is the syntax of the PHP program, and phpinfo(); is a library provided by the PHP program, which can display information about your web server.Visit: http://ip /phpinfo.php
Installation package download address: http://www.zabbix.com/download.php
**1. Official document: **
https://www.zabbix.com/documentation/3.2/manual/installation/install_from_packages
**2. Import source: **
rpm -ivhhttp://repo.zabbix.com/zabbix/3.2/rhel/7/x86_64/zabbix-release-3.2-1.el7.noarch.rpm
3. Install zabbix package
yum -y installzabbix-server-mysql zabbix-web-mysql
4. Initialize zabbix database
mysql> create databasezabbix character set utf8 collate utf8_bin;
Query OK, 1 row affected(0.00 sec)
mysql> grant allprivileges on zabbix.* to zabbix@localhost identified by'zabbix'; //The password is zabbix
Query OK, 0 rows affected(0.00 sec)
mysql> quit
Enter password: //password 123456
5. Start zabbixserver service
DBHost=localhost
DBName=zabbix
DBUser=zabbix
DBPassword=zabbix
In fact, my configuration file is modified to remove the # sign in front of DBHost and DBPassword.
Start zabbix service, set to start automatically
6. Edit the PHP coordination configuration of the zabbix front end
max_execution_time = 300
max_input_time = 300
memory_limit = 128M
post_max_size = 16M
date.timezone = Asia/Shanghai
mbstring.func_overload=2
7. Adjust time synchronization
Install ntpdate
yum -y install ntpdate
8. Log in to zabbix
http://IP/zabbix/
Password: zabbix
carry out
Login, the default user name and password are Admin/zabbix.
Recommended Posts