This is an automated email from the ASF dual-hosted git repository.

gongchao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hertzbeat.git


The following commit(s) were added to refs/heads/master by this push:
     new 66049f189 [OSPP] Add RISC-V related help document. (#3712)
66049f189 is described below

commit 66049f189bdd304fcb0e87907c0be0577df768ab
Author: lynx009 <2030509...@qq.com>
AuthorDate: Sun Sep 7 22:45:21 2025 +0800

    [OSPP] Add RISC-V related help document. (#3712)
    
    Signed-off-by: lynx009 <2030509...@qq.com>
    Co-authored-by: Calvin <zhengqi...@apache.org>
    Co-authored-by: Tom <tomsu...@outlook.com>
---
 home/docs/help/risc-v.md                           | 95 ++++++++++++++++++++++
 .../current/help/risc-v.md                         | 92 +++++++++++++++++++++
 home/sidebars.json                                 |  1 +
 3 files changed, 188 insertions(+)

diff --git a/home/docs/help/risc-v.md b/home/docs/help/risc-v.md
new file mode 100644
index 000000000..9c76a7f48
--- /dev/null
+++ b/home/docs/help/risc-v.md
@@ -0,0 +1,95 @@
+---
+id: risc-v
+title: HertzBeat Running in RISC-V Architecture Environment
+sidebar_label: RISC-V
+keywords: [ Open Source Monitoring System, RISC-V Architecture, RISC-V Running 
HertzBeat ]
+---
+
+> How to Set Up a RISC-V Environment and Run HertzBeat on RISC-V Architecture.
+
+## RISC-V Environment Setup
+
+Ensure your RISC-V development environment is properly configured, including 
compatible hardware or emulators. This guide uses the QEMU emulator on Ubuntu 
to simulate RISC-V architecture.
+
+** 1. Install QEMU and Required Packages **
+
+```shell
+sudo apt update
+sudo apt install opensbi qemu-system-misc u-boot-qemu
+```
+
+** 2. Download Ubuntu Image for RISC-V Architecture **
+
+Download link: https://ubuntu.com/download/risc-v
+Select the `QEMU Emulator` version and download your preferred release.
+
+** 3. Install Ubuntu on QEMU **
+
+> Use QEMU to boot Ubuntu and emulate RISC-V architecture. Parameters (e.g., 
boot settings, disk size) can be customized.
+
+```shell
+# Decompress the image
+xz -dk ubuntu-24.04.2-preinstalled-server-riscv64.img.xz
+
+# Optional: Expand the disk size
+qemu-img resize -f raw ubuntu-24.04-preinstalled-server-riscv64.img +5G
+
+# Start the VM using u-boot-qemu
+qemu-system-riscv64 \
+    -machine virt -nographic -m 2048 -smp 4 \
+    -kernel /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf \
+    -device virtio-net-device,netdev=eth0 -netdev user,id=eth0 \
+    -device virtio-rng-pci \
+    -drive 
file=ubuntu-24.04.2-preinstalled-server-riscv64.img,format=raw,if=virtio
+```
+
+After the console output completes, log in with username ubuntu and default 
password ubuntu. You will be prompted to set a new password.
+Reference: [Ubuntu Official 
Documentation](https://canonical-ubuntu-boards.readthedocs-hosted.com/en/latest/how-to/qemu-riscv/)
+
+## Install and Configure RISC-V-Compatible JDK
+
+> Configure a JDK that supports RISC-V architecture. Here we use Temurin JDK 
17.
+
+** 1. Download Temurin JDK **
+Download link: https://adoptium.net/temurin/releases
+
+** 2. Configure JDK Environment **
+
+> Adjust commands based on your downloaded JDK version.
+
+```shell
+# Install tools
+sudo apt update
+sudo apt install -y tar wget
+
+# Create installation directory
+sudo mkdir -p /usr/lib/jvm
+
+# Extract to system directory
+sudo tar -xzf OpenJDK17U-jdk_riscv64_linux_hotspot_17.0.15_6.tar.gz -C 
/usr/lib/jvm
+
+# Edit environment variables
+sudo nano /etc/profile.d/java.sh
+export JAVA_HOME=/usr/lib/jvm/jdk-17.0.15+6
+export PATH=$JAVA_HOME/bin:$PATH
+
+# Apply configuration
+source /etc/profile.d/java.sh
+
+# Verify installation
+java -version
+```
+
+## Run HertzBeat
+
+> Download the installer from [HertzBeat Official 
Site](https://hertzbeat.apache.org/zh-cn/docs/download/) and follow the 
deployment guide. Example for v1.7.2 .
+
+```shell
+cd apache-hertzbeat-1.7.2-incubating-bin/bin/
+./startup.sh
+```
+
+> Notes:
+> 1. Replace `OpenJDK17U-jdk_riscv64_linux_hotspot_17.0.15_6.tar.gz` with your 
actual JDK filename.
+> 2. Ensure the emulator has internet access to download HertzBeat.
+> 3. If issues arise, verify disk permissions and Java environment paths.
diff --git 
a/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/risc-v.md 
b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/risc-v.md
new file mode 100644
index 000000000..53d2525f5
--- /dev/null
+++ b/home/i18n/zh-cn/docusaurus-plugin-content-docs/current/help/risc-v.md
@@ -0,0 +1,92 @@
+---
+id: risc-v
+title: HertzBeat 在 RISC-V 架构环境中运行
+sidebar_label: RISC-V
+keywords: [ 开源监控系统, RISC-V架构, RISC-V 运行 HertzBeat ]
+---
+
+> 如何搭建 RISC-V 环境,并使 HertzBeat 在 RISC-V 架构环境中运行。
+
+## RISC-V 环境搭建
+
+确保你的 RISC-V 开发环境已正确配置,包括拥有兼容 RISC-V 的设备或模拟器。这里采用在 Ubuntu 环境上搭建 QEMU 模拟器的方式,来模拟 
RISC-V 架构。
+
+** 1. 安装 QEMU 以及软件包 **
+
+```shell
+sudo apt update
+sudo apt install opensbi qemu-system-misc u-boot-qemu
+```
+
+** 2. 下载 RISC-V 架构的 Ubuntu 镜像 **
+
+下载地址:```https://ubuntu.com/download/risc-v```
+选择 `QEMU模拟器` , 下载需要的版本。
+
+** 3. 在 QEMU 上安装 Ubuntu
+
+> 使用 QEMU 启动 Ubuntu,模拟 RISC-V 架构。一些参数,如启动、设置磁盘大小等可以灵活设置。
+
+```shell
+# 解压镜像
+xz -dk ubuntu-24.04.2-preinstalled-server-riscv64.img.xz
+# 也可自定义扩大磁盘
+qemu-img resize -f raw ubuntu-24.04-preinstalled-server-riscv64.img +5G
+# 使用 u-boot-qemu 启动虚拟机
+qemu-system-riscv64 \
+    -machine virt -nographic -m 2048 -smp 4 \
+    -kernel /usr/lib/u-boot/qemu-riscv64_smode/uboot.elf \
+    -device virtio-net-device,netdev=eth0 -netdev user,id=eth0 \
+    -device virtio-rng-pci \
+    -drive 
file=ubuntu-24.04.2-preinstalled-server-riscv64.img,format=raw,if=virtio
+```
+
+等待控制台输出完毕后,使用用户 Ubuntu 和默认密码 Ubuntu 
登录;系统会要求您选择一个新密码。详细可参考:[Ubuntu官网文档](https://canonical-ubuntu-boards.readthedocs-hosted.com/en/latest/how-to/qemu-riscv/)
+
+## 安装并配置支持 RISC-V 架构的 JDK
+
+> 在启动的镜像中配置支持 RISC-V 架构的 JDK,这里选用 Temurin JDK 17。
+
+** 1. 下载 Temurin JDK **
+
+下载地址:```https://adoptium.net/zh-CN/temurin/releases```
+
+** 2. 配置 JDK 环境 **
+
+> 根据下载的版本不同,做适当更改
+
+```shell
+# 安装工具
+sudo apt update
+sudo apt install -y tar wget
+
+# 创建安装目录
+sudo mkdir -p /usr/lib/jvm
+# 解压到系统目录
+sudo tar -xzf OpenJDK17U-jdk_riscv64_linux_hotspot_17.0.15_6.tar.gz -C 
/usr/lib/jvm
+
+# 编辑环境变量,添加以下内容
+sudo nano /etc/profile.d/java.sh
+export JAVA_HOME=/usr/lib/jvm/jdk-17.0.15+6
+export PATH=$JAVA_HOME/bin:$PATH
+
+# 使配置生效
+source /etc/profile.d/java.sh
+
+# 验证安装
+java -version
+```
+
+## 运行 HertzBeat
+
+> 在 [Hertzbeat官网](https://hertzbeat.apache.org/zh-cn/docs/download/) 
下载安装包,并按照官网部署教程运行即可,以 1.7.2 版本为例。
+
+```shell
+cd apache-hertzbeat-1.7.2-incubating-bin/bin/
+./startup.sh
+```
+
+> 注意事项:
+> 1. 请将 `OpenJDK17U-jdk_riscv64_linux_hotspot_17.0.15_6.tar.gz` 替换为您实际下载的 JDK 
文件名。
+> 2. 确保模拟器具备网络访问能力,以下载 HertzBeat。
+> 3. 若遇到问题,请检查磁盘权限和 Java 环境路径配置。
diff --git a/home/sidebars.json b/home/sidebars.json
index ea1188c35..618178644 100755
--- a/home/sidebars.json
+++ b/home/sidebars.json
@@ -281,6 +281,7 @@
         "help/collector",
         "help/ai_agent_chat",
         "help/ai_config",
+        "help/risc-v",
         "help/issue"
       ]
     },


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@hertzbeat.apache.org
For additional commands, e-mail: notifications-h...@hertzbeat.apache.org

Reply via email to