Pagoda compile and install zabbix 5.0

Pagoda configuration:

Pagoda official website: https://www.bt.cn/
Pagoda Linux panel is a server management software that improves operation and maintenance efficiency. It supports one-click LAMP/LNMP/cluster/monitoring/website/FTP/database/JAVA and more than 100 server management functions.

Download landing pagoda

Download the pagoda script and install

yum install -y wget && wget -O install.sh http://download.bt.cn/install/install_6.0.sh && sh install.sh

After the installation is complete,
Insert picture description hereopen the browser as shown in the figure below , and use the given address to access (use the bt command to modify the initial account and password)
Insert picture description here

Install LNMP environment

One-click installation of LNMP environment
Note: zabbx5.0 requires php7.2 or higher version support, choose php7.4 here
Insert picture description here
Insert picture description here
installation manual:

nginx安装目录
/www/server/nginx

nginx配置文件
/www/server/nginx/conf/nginx.conf
多域名Nginx配置文件:
/www/server/panel/vhost/nginx/你的域名.conf

mysql安装目录
/www/server/mysql

数据存储目录
/www/server/data

mysql配置文件
/etc/my.cnf

php安装目录
/www/server/php

php配置文件
/www/server/php/74/etc/php.ini

Compile and install:

  1. Download the 5.0 version of the package from zabbix official website
    https://www.zabbix.com/cn/
    Insert picture description here
  2. Upload and unzip the package
tar -zxf zabbix-5.0.7.tar.gz

Insert picture description here

  1. Create zabbix users and user groups
 groupadd zabbix
 useradd zabbix -g zabbix -s /sbin/nologin

  1. Install the pre-compiled environment. There
    may be some dependencies that require epel sources, and it does not matter if some errors are reported.
yum install  -y unixODBC-devel  net-snmp-devel net-snmp  snmpd   libxml2 libxml2-devel  curl curl-devel  libcurl   libcurl-devel epel-release    gcc gcc-c++ make php* unixODBC unixODBC-devel  fping OpenIPMI OpenIPMI-libs httpd   libevent-devel   libevent mysql-devel java-1.8.0-openjdk*   
  1. Compile
cd zabbix-5.0.7

./configure --prefix=/usr/local/zabbix-server --enable-server --enable-agent --with-mysql  --enable-ipv6  --with-net-snmp --with-libcurl --with-libxml2 --with-unixodbc 

Compiled successfully
Insert picture description here
installed

make & make install

Database import

  1. Change the mysql database root password
bt 

Insert picture description here

  1. Enter the database to create the library used by zabbix
mysql -u root --p

mysql>create database zabbix character set utf8 collate utf8_bin;
mysql>create user 'zabbix'@'localhost' identified by '密码';
mysql>grant all privileges on zabbix.* to 'zabbix'@'localhost';
mysql>flush PRIVILEGES;
mysql>exit
  1. Import database
数据库表在下载解压的包里,我们需要把三个表依次导入更改创建的库中。

mysql> use zabbix;    # 进入zabbix库中

mysql>source /opt/zabbix-5.0.7/database/mysql/schema.sql;
mysql>source /opt/zabbix-5.0.7/database/mysql/images.sql;
mysql>source /opt/zabbix-5.0.7/database/mysql/data.sql;

Check it down

Insert picture description here

Modify the configuration file

  1. Modify the configuration file zabbix_server.conf
vim /usr/local/zabbix-server/etc/zabbix_server.conf
  1. Clear, write the following configuration
LogFile=/var/log/zabbix/zabbix_server.log    
PidFile=/tmp/zabbix_server.pid
DBHost=localhost       #数据库连接地址
DBName=zabbix          #数据库库名
DBUser=zabbix          #数据库账户
DBPassword=密码         #数据库密码
DBSocket=/tmp/mysql.sock      
DBPort=3306
StartPollers=100
StartTrappers=10
StartPingers=10
StartDiscoverers=10
Timeout=4
LogSlowQueries=3000
Include=/usr/local/zabbix-server/etc/zabbix_server.conf.d/*.conf
StatsAllowedIP=127.0.0.1

Visit page configuration

  1. Modify the max_input_time value of php to 300 in the pagoda panel (you can also modify it in the php.ini configuration file)
    Insert picture description here

  2. Delete in the disabled functionputenv
    Insert picture description here

  3. Create a site for interface guidance

Insert picture description here
Delete all the content under the site just created

rm -rf /www/wwwroot/www.站点名字/*
  1. Copy all files in the ui directory of the locally decompressed zabbix source code package to the site release directory
cp -r /opt/zabbix-5.0.7/ui/* /www/wwwroot/www.站点名字/

starting program

/usr/local/zabbix-server/sbin/zabbix_server -c /usr/local/zabbix-server/etc/zabbix_server.conf   ##启动监控服务端
/usr/local/zabbix-server/sbin/zabbix_agentd -c /usr/local/zabbix-server/etc/zabbix_agentd.conf   ##监控自身agent开启

You can put these two commands in the /etc/rc.d/rc.local command and start automatically after booting.
Insert picture description here

If the startup fails
1. If it prompts a directory with no log, just create it
. 2. If it prompts no permission, just grant permission

chown -R zabbix:zabbix /usr/local/zabbix-server/

After successful startup, check the started port
Insert picture description here

Web guided installation

  1. Browser access site address
    Insert picture description here

  2. Detection is correct, continue to the next step
    Insert picture description here

  3. Fill in the connected database, port, account, password, etc.
    Insert picture description here

  4. Custom information
    Insert picture description here

  5. double confirm
    Insert picture description here

  6. Default account for login: AdminDefault password:zabbix
    Insert picture description here

  7. Successful boot prompt
    Insert picture description here

  8. Enter the main interface
    Insert picture description here

================================================= ================================================= ================================================= ================================================= ================================================= =============================================
Hard browsing and watching, if right You are helpful, please like it (σ゚∀゚)σ…:*☆

Guess you like

Origin blog.csdn.net/qq_26129413/article/details/112905260