1. Virtual machine vmware12
2.linux system: CentOS-7-X86_64-DVD-1810
3. Install the linux system, and make sure that the virtual system can access the Internet after installation.
There are two ways: LAMP/LNMP
LAMP: Linux+Apache+MySQL/Mariadb+Perl/PHP/Python, a set of open source software that is often used to build dynamic websites or servers. The higher the compatibility, the stronger web application platform is formed.
LNMP: LNMP refers to a one -click installation package based on Centos/Debian -based Nginx, PHP, MySQL, PHPMYADMIN, Eaccelerator. You can easily install the LNMP production environment on VPS and independent hosts.
computer configuration should be high.
Reference document: https://www.jb51.net/article/148736.htm
zibbx official website:
Preparation before installation:
1.1 Installation dependency package:
1.2 Close the firewall:
need to close Selinux, it must be closed. Opening Selinux will cause a series of problems. Even Zabbix’s Discovery function cannot be used normally
systemctl stop firewalld.service
systemctl disable firewalld.service
#sed -i “s/SELINUX=enforcing/SELINUX=disabled/g” /etc/selinux/config
Confirm whether to modify it successfully
#grep SELINUX /etc/selinux/config
and then restart the system.
[If! SupportLists] 2. [Endif] Install Zabbix Server3.0
Before installing Zabbix Server3.0 on Centos7, we first built the LAMP environment required by Zabbix.
download the latest YUM source, as follows:
#wget -P /etc/yum.repos.d http://mirrors.aliyun.com/repo/Centos-7.repo
Need to install
yum install -y httpd
httpd service boot to start self -activation
systemctl enable httpd
Start HTTPD service
Systemctl start httpd
Edit homepage file and access test
http://192.168.10.128/ // Browser input test
If this interface is not available,
Instructions are that the firewall blocks port 80, just let go of port 80
firewall-cmd –zone=public –add-port=80/tcp –permanent
firewall-cmd –zone=public –query-port=80/tcp
Before starting the installation, it is necessary to explain that the MySQL comes with CentOS7 is MariaDB. We can view through the following command:
#yum search mysql|tac
Now start installing the LAMP environment and use the following command:
#yum -y install mariadb mariadb-server php php-mysql httpd
Through the above figure, we can clearly see that CentOS7 is installed by CENTOS7 default is PHP5.4, HTTPD2.4 and Maradb5.5, which fully meets the requirements of the software version of ZABBIX3.0. After LAMP is installed, we now configure mysql database.
Set up the self -starting mysql, and start mysql, and use the following command:
systemctl enable mariadb.service
systemctl start mariadb.service
can also be verified:
Initialize mysql database and configure the root user password. Use the following command:
Note: At the Enter Current Passwdord for Root in the figure above, we can knock on the car button directly. Because mysql’s default root user password on CentOS7 is empty. The above figure is mainly to configure the password for the root user and refresh the relevant permissions. (The password is set to 123456, only for experimental, the production environment is customized) Remove Anonymous Users? Delete anonymous users? DISALLOW ROOT LOGIN Remotly? It is forbidden for ROOT to remotely log in to Remove Test DataBase and Access to It? Delete the test database and access it with its RELOAD Privilege Tables now. Emperor related configuration.
After the initialization of
MySQL, we are now creating the ZABBIX database and its users, and the following commands are used:
mysql -uroot [email protected] -e “create database zabbix default character set utf8 collate utf8_bin;”
mysql -uroot [email protected] -e “grant all privileges on zabbix.* to [email protected] identified by ‘zabbix’”
Now testing whether the Zabbix user just created can connect the MySQL database, as follows:
[[email protected] ~]# mysql -uzabbix -pzabbix
MariaDB [(none)]> show databases;
MariaDB [(none)]> quit
Through the above figure, we can clearly see that Zabbix users can connect the database normally.
Start Apache and open port 80, as follows:
[[email protected] ~]# systemctl start httpd.service
[[email protected] ~]# netstat -ltun
The LAMP environment has been completed here.