日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問(wèn) 生活随笔!

生活随笔

當(dāng)前位置: 首頁(yè) > 编程资源 > 编程问答 >内容正文

编程问答

Zabbix 最新版 5.2 版本源码安装

發(fā)布時(shí)間:2025/3/11 编程问答 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Zabbix 最新版 5.2 版本源码安装 小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

Zabbix 最新版 5.0 LTS 版本安裝

zabbix 5.0 版本于 5 月 11 日正式發(fā)布,是最新的 LTS(長(zhǎng)期支持)版本,5.0 帶來(lái)很多功能和特性,后面會(huì)陸續(xù)推出文章介紹,下面主要介紹下 5.0 版本的安裝。

環(huán)境要求

5.0 版本對(duì)基礎(chǔ)環(huán)境的要求有大的變化,最大的就是對(duì) php 版本的要求,最低要求 7.2.0 版本,對(duì) php 擴(kuò)展組件版本也有要求,詳見(jiàn)官網(wǎng)文檔https://www.zabbix.com/documentation/current/manual/installation/requirements

zabbix 5.0 版本于 5 月 11 日正式發(fā)布,是最新的 LTS(長(zhǎng)期支持)版本,5.0 帶來(lái)很多功能和特性,后面會(huì)陸續(xù)推出文章介紹,下面主要介紹下 5.0 版本的安裝。

YUM 安裝

基本環(huán)境

操作系統(tǒng)安裝方式
CentOS Linux release 7.8.2003 (Core) x86_64最小化安裝

1,安裝好操作系統(tǒng)后,關(guān)閉防火墻和 selinux 并重啟

sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/selinux/config systemctl disable --now firewalld reboot

2,下載?Zabbix?官網(wǎng)最新源碼:https://www.zabbix.com/cn/download_sources

3,yum?scl 安裝?Apache?httpd?php7.2 集成系統(tǒng)

yum install centos-release-scl-rh -y # yum search php yum install rh-php72 -y yum install rh-php72 rh-php72-php rh-php72-php-gd rh-php72-php-mbstring rh-php72-php-ldap rh-php72-php-bcmath rh-php72-php-intl rh-php72-php-pecl-apcu -y yum install rh-php72-php-mysqlnd -y scl -l scl enable rh-php72 "php -v" scl enable rh-php72 bash php -v php -myum install -y httpd systemctl start httpd systemctl enabled httpdln -s /opt/rh/httpd24/root/etc/httpd/conf.d/rh-php72-php.conf /etc/httpd/conf.d/ ln -s /opt/rh/httpd24/root/etc/httpd/conf.modules.d/15-rh-php72-php.conf /etc/httpd/conf.modules.d/ ln -s /opt/rh/httpd24/root/etc/httpd/modules/librh-php72-php7.so /etc/httpd/modules/systemctl restart httpd

4,安裝編譯zabbix 5.2?源碼

tar -xzvf zabbix-5.2.1.tar.gz cd zabbix-5.2.1/yum -y install gcc gcc-c++ curl curl-devel net-snmp net-snmp-devel perl-DBI libxml2-devel libevent-devel pcregroupadd zabbix useradd -g zabbix zabbix usermod -s /sbin/nologin zabbix./configure --prefix=/usr/local/zabbix --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 make&&make install chown zabbix:zabbix /usr/local/zabbix/ -Rln -s /usr/local/zabbix/sbin/zabbix_* /usr/local/sbin/ cd zabbix-5.2.1/ cp misc/init.d/tru64/{zabbix_agentd,zabbix_server} /etc/init.d/;chmod o+x /etc/init.d/zabbix_*cd zabbix-5.2.1/ cp -a ui/* /var/www/html/ chown -R apache:apache /var/www/html/cd /usr/local/zabbix/etc/ cp zabbix_server.conf zabbix_server.conf.bak修改zabbix_server.conf配置文件中代碼設(shè)置為如下: ######################################## LogFile=/tmp/zabbix_server.log DBHost=localhost DBName=zabbix DBUser=zabbix DBPassword=123456 ########################################修改/etc/opt/rh/rh-php72/php.ini ######################################## PHP option "post_max_size" 8M 16M Fail PHP option "max_execution_time" 30 300 Fail PHP option "max_input_time" 60 300 Fail pdo_mysql.default_socket= /tmp/mysql.sock mysqli.default_socket = /tmp/mysql.sock ########################################chmod -R 777 /var/www/html/conf//etc/init.d/zabbix_server restart systemctl restart httpd

5,安裝mysql數(shù)據(jù)庫(kù)

yum -y install wget gcc gcc-c++ ncurses ncurses-devel cmake numactl.x86_64 libaio wget http://mirrors.ustc.edu.cn/mysql-ftp/Downloads/MySQL-5.7/mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz tar -zxvf mysql-5.7.24-linux-glibc2.12-x86_64.tar.gz -C /usr/local/ mv /usr/local/mysql-5.7.24-linux-glibc2.12-x86_64/ /usr/local/mysql cd /usr/local/mysql/ cp /usr/local/mysql/support-files/mysql.server /etc/init.d/mysql cat >/etc/my.cnf <<EOF [client] port=3306 socket=/tmp/mysql.sock [mysqld] port=3306 socket=/tmp/mysql.sock skip-external-locking key_buffer_size = 38M max_allowed_packet = 1M table_open_cache = 64 sort_buffer_size = 512K net_buffer_length = 8K read_buffer_size = 256K read_rnd_buffer_size = 512K myisam_sort_buffer_size = 8M basedir=/usr/local/mysql datadir=/var/lib/mysql bind-address=0.0.0.0 innodb_flush_log_at_trx_commit=1 sync_binlog=1 log-bin=/var/lib/mysql/mysql_logbin log-error=/var/log/mariadb slow_query_log =1 slow_query_log_file=/tmp/mysql_slow.log server-id=1 symbolic-links=0 [mysqld_safe] pid-file=/var/run/mariadb/mariadb.pid EOFuseradd mysql mkdir -p /var/lib/mysql chown mysql:mysql /var/lib/mysql mkdir -p /var/log/mariadb chown mysql:mysql /var/log/mariadb/ mkdir -p /var/run/mariadb chown mysql:mysql /var/run/mariadb/ touch /var/run/mariadb/mariadb.pid cat >> /etc/profile << EOF export PATH=\$PATH:/usr/local/mysql/bin:/usr/local/mysql/lib EOF source /etc/profile chmod -R 777 /var/log mysqld --defaults-file=/etc/my.cnf --user=mysql --initialize-insecure /etc/init.d/mysql startmysql -u root -p update mysql.user set authentication_string=password('123456') where user='root'; flush privileges;#################################################################################### mysql -u root -p ######################### create database zabbix character set utf8 collate utf8_bin; grant all on zabbix.* to zabbix@localhost identified by '123456'; flush privileges; use zabbix; source /root/zabbix-5.2.1/database/mysql/schema.sql source /root/zabbix-5.2.1/database/mysql/images.sql source /root/zabbix-5.2.1/database/mysql/data.sql flush privileges; #########################ln -s /tmp/mysql.sock /var/lib/mysql/mysql.sock

訪問(wèn):http://118.89.23.220/? ,?切記? 數(shù)據(jù)庫(kù)連接host填 “127.0.0.1”

使用瀏覽器訪問(wèn) http://ip 即可訪問(wèn) zabbix 的 web 頁(yè)面

日志位置:/var/log/zabbix/zabbix_server.log

更多資訊或疑問(wèn)內(nèi)容請(qǐng)關(guān)注?微信公眾號(hào) “讓夢(mèng)飛起來(lái)”?或添加小編微信,?后臺(tái)回復(fù) “Python” ,領(lǐng)取更多資料哦

? ?? ? ? ? ? ? ?? ? ? ? ? ? ? ? ? ??

總結(jié)

以上是生活随笔為你收集整理的Zabbix 最新版 5.2 版本源码安装的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。

如果覺(jué)得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。