Article Directory
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,
open 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)
Install LNMP environment
One-click installation of LNMP environment
Note: zabbx5.0 requires php7.2 or higher version support, choose php7.4 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:
- Download the 5.0 version of the package from zabbix official website
https://www.zabbix.com/cn/
- Upload and unzip the package
tar -zxf zabbix-5.0.7.tar.gz
- Create zabbix users and user groups
groupadd zabbix
useradd zabbix -g zabbix -s /sbin/nologin
- 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*
- 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
installed
make & make install
Database import
- Change the mysql database root password
bt
- 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
- 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
Modify the configuration file
- Modify the configuration file zabbix_server.conf
vim /usr/local/zabbix-server/etc/zabbix_server.conf
- 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
-
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)
-
Delete in the disabled function
putenv
-
Create a site for interface guidance
Delete all the content under the site just created
rm -rf /www/wwwroot/www.站点名字/*
- 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.
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
Web guided installation
-
Browser access site address
-
Detection is correct, continue to the next step
-
Fill in the connected database, port, account, password, etc.
-
Custom information
-
double confirm
-
Default account for login:
Admin
Default password:zabbix
-
Successful boot prompt
-
Enter the main interface
================================================= ================================================= ================================================= ================================================= ================================================= =============================================
Hard browsing and watching, if right You are helpful, please like it (σ゚∀゚)σ…:*☆