Zabbix 3.4 Source code compilation installation
1. Installation environment (Hyper-V virtual machine):
$ hostnamectl Static hostname: localhost.localdomain Icon name: computer-vm Chassis: vm Machine ID: renwoles1d8743989a40cb81db696400 Boot ID: renwoles272f4aa59935dcdd0d456501 Virtualization: microsoft Operating System: CentOS Linux 7 (Core) CPE OS Name: cpe:/o:centos:centos:7 Kernel: Linux 3.10.0-514.2.2.el7.x86_64 Architecture: x86-64
2. Since the Zabbix UI front-end is written in PHP, it must run on a web server that supports PHP scripting language. Prerequisites:
《Centos 7 编译安装nginx》 《Centos 7 编译安装PHP 7 之生产篇》 《Linux JAVA JDK JRE 环境变量安装与配置》 《Centos 7 二进制安装 MariaDB(MySQL)数据库》
3. If your server already has a PHP environment, please skip step 2 and continue with the following configuration:
Configuring php.ini must meet the following requirements:
max_execution_time = 300 max_input_time = 300 memory_limit = 128M post_max_size = 32M date.timezone = Asia/Shanghai mbstring.func_overload=2 #Zabbix PHP LDAP 认证开启(可选) extension = "/usr/local/php/lib/php/extensions/no-debug-zts-20160303/ldap.so"
4. Install dependent packages and create groups & users
$ yum -y install epel-release && yum -y update $ yum install -y net-snmp-devel OpenIPMI-devel libssh2-devel iksemel-devel $ groupadd zabbix $ useradd -g zabbix zabbix
5. Install Zabbix Server
Download address: https://www.zabbix.com/download
$ cd /tmp $ tar -zxvf zabbix-3.4.2.tar.gz $ cd zabbix-3.4.2 $ ./configure --prefix=/usr/local/zabbix \ --sysconfdir=/usr/local/zabbix/etc \ --enable-server \ --enable-agent \ --with-mysql=/usr/bin/mysql_config \ --with-net-snmp \ --with-libcurl \ --with-libxml2 \ --enable-proxy \ --enable-ipv6 \ --enable-java \ --with-ssh2 \ --with-iconv \ --with-openipmi \ --with-ldap \ --with-openssl \ --with-jabber \ $ make $ make install
Note: –enable-agent is optional, this parameter is mainly used for clients (monitored persons).
Note: If you have not installed the JAVA environment, please remove the –enable-java option, which is mainly used to monitor Tomcat.
6. Create and grant permissions to the Zabbix configuration file directory
$ mkdir -p /usr/local/zabbix/logs $ chown -R zabbix.zabbix /usr/local/zabbix
7. Copy the Zabbix UI front-end program source code to the Nginx Web directory
$ cp -rf /tmp/zabbix-3.4.2/frontends/php/* /apps/web/zabbix $ chown -R www.www /apps/web/zabbix
8. Create database name: zabbix User: zabbix Password: renwolecom and grant the user all permissions to the database:
$ mysql -uroot -p Enter password:(输入root数据库密码回车) MariaDB [(none)]> create database zabbix character set utf8 collate utf8_bin; MariaDB [(none)]> grant all privileges on zabbix.* to zabbix@"%" identified by 'renwolecom'; MariaDB [(none)]> flush privileges; MariaDB [(none)]> quit;
9. Import the Zabbix related structure table files into the zabbix database in sequence
Import sequence schema.sql table structure > images.sql picture library > data.sql initial script
$ cd /tmp/zabbix-3.4.2/database/mysql $ mysql -uzabbix -prenwolecom zabbix <p>10.Configure zabbix_server.conf</p> <p>The content after the configuration is completed is as follows: </p> <pre class="brush:php;toolbar:false"> $ egrep -v "^$|^#|^;" /usr/local/zabbix/etc/zabbix_server.conf LogFile=/usr/local/zabbix/logs/zabbix_server.log PidFile=/usr/local/zabbix/zabbix_server.pid LogFileSize=0 DBHost=10.10.204.62 DBName=zabbix DBUser=zabbix DBPassword=renwolecom JavaGateway=10.10.204.62 JavaGatewayPort=10052 StartJavaPollers=5 StartPingers=4 Timeout=4 AlertScriptsPath=/usr/local/zabbix/share/zabbix/alertscripts LogSlowQueries=3000 Include=/usr/local/zabbix/etc/zabbix_server.conf.d/
Note: Since the parameter configuration of each production environment is different, I only list the basic and commonly used configuration files. See more configuration parameters for instructions.
11. Create systemctl system Zabbix servers unit file
$ vim /usr/lib/systemd/system/zabbix.service [Unit] Description=Zabbix Server After=syslog.target After=network.target [Service] Environment="CONFFILE=/usr/local/zabbix/etc/zabbix_server.conf" EnvironmentFile=-/usr/local/zabbix/etc/zabbix_server.conf.d Type=forking Restart=on-failure PIDFile=/usr/local/zabbix/zabbix_server.pid KillMode=control-group ExecStart=/usr/local/zabbix/sbin/zabbix_server -c $CONFFILE ExecStop=/bin/kill -SIGTERM $MAINPID RestartSec=10s TimeoutSec=0 [Install] WantedBy=multi-user.target
12. Start zabbix and add auto-start at boot
$ systemctl start zabbix $ systemctl enable zabbix
13.Firewalld firewall settings
$ firewall-cmd --permanent --add-port=10051/tcp $ firewall-cmd --permanent --add-port=80/tcp $ firewall-cmd --reload
Installation completed.
Next, you can use IP or domain name to access the Zabbix monitoring and management system. For specific settings, please follow the Zabbix Server Web wizard prompts.
After the setting is completed, zabbix default account: Admin Password: zabbix (note that accounts are case-sensitive) After logging in, the English interface is displayed. Just click on the little man icon in the upper right corner (current user settings) to locate the Language item and select Chinese ( zh_CN), click Update to switch to the Chinese interface
The above is the detailed content of Zabbix 3.4 Source code compilation installation. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undress AI Tool
Undress images for free

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

To enable PHP containers to support automatic construction, the core lies in configuring the continuous integration (CI) process. 1. Use Dockerfile to define the PHP environment, including basic image, extension installation, dependency management and permission settings; 2. Configure CI/CD tools such as GitLabCI, and define the build, test and deployment stages through the .gitlab-ci.yml file to achieve automatic construction, testing and deployment; 3. Integrate test frameworks such as PHPUnit to ensure that tests are automatically run after code changes; 4. Use automated deployment strategies such as Kubernetes to define deployment configuration through the deployment.yaml file; 5. Optimize Dockerfile and adopt multi-stage construction

Windowsisbetterforbeginnersduetoeaseofuse,seamlesshardwarecompatibility,andsupportformainstreamsoftwarelikeMicrosoftOfficeandAdobeapps.2.LinuxoutperformsWindowsonolderorlow-resourcehardwarewithfasterboottimes,lowersystemrequirements,andlessbloat.3.Li

Building an independent PHP task container environment can be implemented through Docker. The specific steps are as follows: 1. Install Docker and DockerCompose as the basis; 2. Create an independent directory to store Dockerfile and crontab files; 3. Write Dockerfile to define the PHPCLI environment and install cron and necessary extensions; 4. Write a crontab file to define timing tasks; 5. Write a docker-compose.yml mount script directory and configure environment variables; 6. Start the container and verify the log. Compared with performing timing tasks in web containers, independent containers have the advantages of resource isolation, pure environment, strong stability, and easy expansion. To ensure logging and error capture

There are three main ways to install software on Linux: 1. Use a package manager, such as apt, dnf or pacman, and then execute the install command after updating the source, such as sudoaptininstallcurl; 2. For .deb or .rpm files, use dpkg or rpm commands to install, and repair dependencies when needed; 3. Use snap or flatpak to install applications across platforms, such as sudosnapinstall software name, which is suitable for users who are pursuing version updates. It is recommended to use the system's own package manager for better compatibility and performance.

cronisusedforpreciseschedulingonalways-onsystems,whileanacronensuresperiodictasksrunonsystemsthataren'tcontinuouslypowered,suchaslaptops;1.Usecronforexacttiming(e.g.,3AMdaily)viacrontab-ewithsyntaxMINHOURDOMMONDOWCOMMAND;2.Useanacronfordaily,weekly,o

ChoosePop!_OS,Ubuntu,NobaraLinux,orArchLinuxforoptimalgamingperformancewithminimaloverhead.2.InstallofficialNVIDIAproprietarydriversforNVIDIAGPUs,ensureup-to-dateMesaandkernelversionsforAMDandIntelGPUs.3.EnabletheperformanceCPUgovernor,usealow-latenc

Linux is suitable for old hardware, has high security and is customizable, but has weak software compatibility; Windows software is rich and easy to use, but has high resource utilization. 1. In terms of performance, Linux is lightweight and efficient, suitable for old devices; Windows has high hardware requirements. 2. In terms of software, Windows has wider compatibility, especially professional tools and games; Linux needs to use tools to run some software. 3. In terms of security, Linux permission management is stricter and updates are convenient; although Windows is protected, it is still vulnerable to attacks. 4. In terms of difficulty of use, the Linux learning curve is steep; Windows operation is intuitive. Choose according to requirements: choose Linux with performance and security, and choose Windows with compatibility and ease of use.

Timesynchronizationiscrucialforsystemreliabilityandsecuritybecauseinconsistenttimecauseslogconfusion,securityfailures,misfiredscheduledtasks,anddistributedsystemerrors;1.CheckNTPstatususingtimedatectlstatustoconfirmsynchronizationandserviceactivity;2
