{"id":1000,"date":"2024-09-20T09:56:51","date_gmt":"2024-09-20T01:56:51","guid":{"rendered":"http:\/\/www.o6s.net\/?p=1000"},"modified":"2025-10-25T22:53:00","modified_gmt":"2025-10-25T14:53:00","slug":"%e3%80%90%e6%a1%88%e4%be%8b%e3%80%9122-03-lts-%e5%ae%89%e8%a3%85zabbix-%e6%95%99%e7%a8%8b","status":"publish","type":"post","link":"https:\/\/www.o6s.net\/index.php\/2024\/09\/20\/%e3%80%90%e6%a1%88%e4%be%8b%e3%80%9122-03-lts-%e5%ae%89%e8%a3%85zabbix-%e6%95%99%e7%a8%8b\/","title":{"rendered":"\u3010\u6848\u4f8b\u301122.03 LTS \u5b89\u88c5zabbix \u6559\u7a0b"},"content":{"rendered":"<h1 id=\"_22-03-lts-\u5b89\u88c5zabbix-\u6559\u7a0b\" tabindex=\"-1\">22.03 LTS \u5b89\u88c5zabbix \u6559\u7a0b<\/h1>\n<h2 id=\"openeuler-\u6700\u5c0f\u5b89\u88c5\" tabindex=\"-1\">openEuler \u6700\u5c0f\u5b89\u88c5<\/h2>\n<p>\u5173\u95ed\u9632\u706b\u5899<\/p>\n<div class=\"language-text vp-adaptive-theme\">\n<pre class=\"shiki shiki-themes github-light github-dark vp-code\" tabindex=\"0\"><code><span class=\"line\">systemctl stop firewalld<\/span>\r\n<span class=\"line\">systemctl disable firewalld<\/span><\/code><\/pre>\n<\/div>\n<h2 id=\"mysql\u670d\u52a1\u5b89\u88c5\u914d\u7f6e\" tabindex=\"-1\">MYSQL\u670d\u52a1\u5b89\u88c5\u914d\u7f6e<\/h2>\n<ol>\n<li>\u5b89\u88c5mysql\n<div class=\"language-text vp-adaptive-theme\">\n<pre class=\"shiki shiki-themes github-light github-dark vp-code\" tabindex=\"0\"><code><span class=\"line\">dnf install mysql mysql-server mysql-common mysql-libs mysql-devel mysql-selinux --nogpgcheck<\/span><\/code><\/pre>\n<\/div>\n<\/li>\n<li>\u542f\u52a8mysql\u670d\u52a1\n<div class=\"language-text vp-adaptive-theme\">\n<pre class=\"shiki shiki-themes github-light github-dark vp-code\" tabindex=\"0\"><code><span class=\"line\">systemctl enable mysqld<\/span>\r\n<span class=\"line\">systemctl start mysqld<\/span>\r\n<span class=\"line\">systemctl status mysqld<\/span><\/code><\/pre>\n<\/div>\n<\/li>\n<li>\u914d\u7f6e\u5bc6\u7801\n<div class=\"language-mysql vp-adaptive-theme\">\n<pre class=\"shiki shiki-themes github-light github-dark vp-code\" tabindex=\"0\"><code><span class=\"line\">mysql -uroot -p<\/span>\r\n<span class=\"line\">&gt; password \u56de\u8f66<\/span>\r\n<span class=\"line\">ALTER USER 'root'@'localhost' IDENTIFIED BY '\u5bc6\u7801';<\/span><\/code><\/pre>\n<\/div>\n<\/li>\n<\/ol>\n<h2 id=\"\u5b89\u88c5zabbix\u670d\u52a1\" tabindex=\"-1\">\u5b89\u88c5ZABBIX\u670d\u52a1<\/h2>\n<div class=\"language-text vp-adaptive-theme\">\n<pre class=\"shiki shiki-themes github-light github-dark vp-code\" tabindex=\"0\"><code><span class=\"line\">dnf config-manager --add-repo https:\/\/repo.oepkgs.net\/openeuler\/rpm\/openEuler-22.03-LTS\/contrib\/others\/aarch64\/<\/span>\r\n<span class=\"line\">dnf clean all &amp;&amp; dnf makecache<\/span>\r\n<span class=\"line\">dnf install zabbix-server-mysql zabbix-web-mysql zabbix-nginx-conf zabbix-sql-scripts zabbix-agent --nogpgcheck<\/span><\/code><\/pre>\n<\/div>\n<h2 id=\"\u914d\u7f6e\u548c\u542f\u52a8zabbix\u8fdb\u7a0b\" tabindex=\"-1\">\u914d\u7f6e\u548c\u542f\u52a8zabbix\u8fdb\u7a0b<\/h2>\n<ol>\n<li>\u914d\u7f6ezabbix\n<div class=\"language-mysql vp-adaptive-theme\">\n<pre class=\"shiki shiki-themes github-light github-dark vp-code\" tabindex=\"0\"><code><span class=\"line\">mysql -uroot -p<\/span>\r\n<span class=\"line\">&gt; password<\/span>\r\n<span class=\"line\">create database zabbix character set utf8mb4 collate utf8mb4_bin;<\/span>\r\n<span class=\"line\">create user zabbix@localhost identified by '\u5bc6\u7801';<\/span>\r\n<span class=\"line\">grant all privileges on zabbix.* to zabbix@localhost;<\/span>\r\n<span class=\"line\">set global log_bin_trust_function_creators = 1;<\/span>\r\n<span class=\"line\">quit;<\/span><\/code><\/pre>\n<\/div>\n<\/li>\n<li>\u521d\u59cb\u5316\u67b6\u6784\u548c\u6570\u636e\n<div class=\"language-text vp-adaptive-theme\">\n<pre class=\"shiki shiki-themes github-light github-dark vp-code\" tabindex=\"0\"><code><span class=\"line\">zcat \/usr\/share\/doc\/zabbix-sql-scripts\/mysql\/server.sql.gz | mysql --default-character-set=utf8mb4 -uzabbix -p zabbix<\/span><\/code><\/pre>\n<\/div>\n<p>Disable log_bin_trust_function_creators option after importing database schema.<\/p>\n<div class=\"language-mysql vp-adaptive-theme\">\n<pre class=\"shiki shiki-themes github-light github-dark vp-code\" tabindex=\"0\"><code><span class=\"line\">mysql -uroot -p<\/span>\r\n<span class=\"line\">&gt; password<\/span>\r\n<span class=\"line\">set global log_bin_trust_function_creators = 0;<\/span>\r\n<span class=\"line\">quit;<\/span><\/code><\/pre>\n<\/div>\n<\/li>\n<li>\u4fee\u6539zabbix server\u914d\u7f6e\u6570\u636e\u5e93\u548cPHP\n<div class=\"language-text vp-adaptive-theme\">\n<pre class=\"shiki shiki-themes github-light github-dark vp-code\" tabindex=\"0\"><code><span class=\"line\">vi  \/etc\/zabbix\/zabbix_server.conf <\/span>\r\n<span class=\"line\">---<\/span>\r\n<span class=\"line\">DBPassword=\u5bc6\u7801<\/span>\r\n<span class=\"line\">---<\/span>\r\n<span class=\"line\">vi \/etc\/nginx\/conf.d\/zabbix.conf<\/span>\r\n<span class=\"line\">---<\/span>\r\n<span class=\"line\">listen 8080;#\u53d6\u6d88\u6ce8\u91ca<\/span>\r\n<span class=\"line\">server_name example.com;#\u53d6\u6d88\u6ce8\u91ca<\/span>\r\n<span class=\"line\">---<\/span><\/code><\/pre>\n<\/div>\n<\/li>\n<li>\u5347\u7ea7net-snmp\n<div class=\"language-text vp-adaptive-theme\">\n<pre class=\"shiki shiki-themes github-light github-dark vp-code\" tabindex=\"0\"><code><span class=\"line\">dnf install net-snmp  net-snmp-devel net-snmp-utils --nogpgcheck<\/span><\/code><\/pre>\n<\/div>\n<\/li>\n<li>\u542f\u52a8zabbix\u8fdb\u7a0b\n<div class=\"language-text vp-adaptive-theme\">\n<pre class=\"shiki shiki-themes github-light github-dark vp-code\" tabindex=\"0\"><code><span class=\"line\">systemctl restart zabbix-server zabbix-agent nginx php-fpm<\/span>\r\n<span class=\"line\">systemctl enable zabbix-server zabbix-agent nginx php-fpm<\/span><\/code><\/pre>\n<\/div>\n<\/li>\n<li>\u8bbf\u95eezabbix\u9996\u9875\n<p>\u9ed8\u8ba4\u7aef\u53e3\u662f8080<\/p>\n<p>by\u5bcc\u7118<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>22.03 LTS \u5b89\u88c5zabbix \u6559\u7a0b openEuler \u6700\u5c0f\u5b89\u88c5 \u5173\u95ed\u9632\u706b\u5899 systemctl st [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-1000","post","type-post","status-publish","format-standard","hentry","category-openeuler"],"_links":{"self":[{"href":"https:\/\/www.o6s.net\/index.php\/wp-json\/wp\/v2\/posts\/1000","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.o6s.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.o6s.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.o6s.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.o6s.net\/index.php\/wp-json\/wp\/v2\/comments?post=1000"}],"version-history":[{"count":1,"href":"https:\/\/www.o6s.net\/index.php\/wp-json\/wp\/v2\/posts\/1000\/revisions"}],"predecessor-version":[{"id":1007,"href":"https:\/\/www.o6s.net\/index.php\/wp-json\/wp\/v2\/posts\/1000\/revisions\/1007"}],"wp:attachment":[{"href":"https:\/\/www.o6s.net\/index.php\/wp-json\/wp\/v2\/media?parent=1000"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.o6s.net\/index.php\/wp-json\/wp\/v2\/categories?post=1000"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.o6s.net\/index.php\/wp-json\/wp\/v2\/tags?post=1000"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}