CentOS 7.3 install Zabbix3

CentOS 7.3 install Zabbix3.X

One, configure CentOS 7

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

sed -i"s/SELINUX=enforcing/SELINUX=disabled/g" /etc/selinux/config

Confirm whether the modification is successful

grep SELINUX/etc/selinux/config

Then restart the system

reboot

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

Two, install LAMP

1、 Install MySQL

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:

yum install -y mariadbmariadb-server

Start mariadb

systemctl start mariadb

The previous service management commands can also be used

service mariadb start

Set up auto start

systemctl enable mariadb

Secure initialization, set root password, etc.

mysql_secure_installation

Test login

mysql -uroot -p123456 //password 123456

2. Install Apache software###

yum -y install httpd

vim/etc/httpd/conf/httpd.conf

ServerName localhost:80

systemctl starthttpd.service

systemctl enablehttpd.service

systemctl statushttpd.service //Check the status

"Enabled" means that the httpd service has been set to start, and "active (running)" means that the httpd service is running.

3. Install PHP

# 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

systemctl restart httpd //Restart httpd service

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:

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

Three, install Zabbix

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 -uroot -p123456 //Log in to the mysql 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

cd/usr/share/doc/zabbix-server-mysql-3.2.x //Enter this directory x According to different versions, different directories

ls //View files in the directory

zcat create.sql.gz | mysql-uroot -p zabbix //Run the command, corresponding to the newly created zabbix library in the database

Enter password: //password 123456

5. Start zabbixserver service

vim/etc/zabbix/zabbix_server.conf

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

systemctl start zabbix-server

systemctl enablezabbix-server

6. Edit the PHP coordination configuration of the zabbix front end

vim /etc/php.ini

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

ntpdate cn.pool.ntp.org //Sync time

8. Log in to zabbix

http://IP/zabbix/

Password: zabbix

carry out

Login, the default user name and password are Admin/zabbix.

Recommended Posts

CentOS 7.4 install Zabbix 3.4
CentOS 7.3 install Zabbix3
centos 6.5 install zabbix 4.4
CentOS 8 install ZABBIX4.4 guide
Centos 7 install Zabbix 3.4 original
1.5 Install Centos7
Install Zabbix 3.4 based on CentOS 7
CentOS 8.0.1905 install ZABBIX4.4 version (verified)
Centos6 install Python2.7.13
Centos7.3 install nginx
CentOS7.2 install Mysql5.7.13
CentOS install Redmine
Centos7 install Python 3.6.
CentOS7 install MySQL
Centos7 install protobuf
CentOS 7 install Docker
CentOS7 install GlusterFS
CentOS7 install Docker
CentOS install Python 3.6
Vmware install CentOS6
centos7 install docker-ce 18.01.0
CentOS 7.2 install MariaDB
CentOS 7 install Hadoop 3.0.0
Centos7 install Python2.7
Centos 7.6 install seleniu
Centos7 install LAMP+PHPmyadmin
CentOS install mysql
CentOS install openjdk 1.8
CENTOS6.5 install CDH5.12.1 (1)
CentOS install PHP
CentOS6 install mist.io
Centos7 install Docker
CentOS7 install mysql
centOs install rabbitMQ
CentOS 7 install MySQL 5.6
Centos7 install Nginx
CentOS6.5 install CDH5.13
Centos7 install docker18
Centos install Python3
centos7 install docker
CentOS install jdk
centos7 install nginx-rtmp
CentOS8 install MySQL8.0
Centos6.3 install KVM
CentOS install PostgreSQL 9.1
CentOS7 install mysql8
CentOS 7 install Java 1.8
CentOS8 install fastdfs6.06
CentOS 7 install Gitlab
Centos 7 install PostgreSQL
CentOS7 install MySQL8
CentOS 7 install Java 1.8
CentOS 6 install Docker
Centos8 install Docker
CentOS6.8 install python2.7
CentOS install nodejs 8
CentOS6.5 install GNS3
centos 7.5 install mysql5.7.17
Centos7 install MySQL8.0-manual
CentOS7 install Kubernetes 1.16.3
VirtualBox install centos7