3 Commits

Author SHA1 Message Date
1bc9b1288a feat: 添加大页内存配置功能,更新相关安装脚本
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in -34s
Build and Release / build-and-test (amd64, alpine) (push) Successful in -37s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in -21s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in -25s
Build and Release / release (push) Successful in 16s
2026-01-23 11:47:56 +08:00
3399456f48 更新版本号至 3.4.9-xg1,调整相关文档和构建脚本示例
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in -21s
Build and Release / build-and-test (amd64, alpine) (push) Successful in -18s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in -9s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in -3s
Build and Release / release (push) Successful in 23s
2026-01-06 12:22:17 +08:00
4cd7d0453d 更新 APT 源配置,使用签名密钥增强安全性
All checks were successful
Build and Release / build-and-test (arm64, alpine) (push) Successful in -11s
Build and Release / build-and-test (amd64, alpine) (push) Successful in -4s
Build and Release / build-and-test (arm64, ubuntu) (push) Successful in 1s
Build and Release / build-and-test (amd64, ubuntu) (push) Successful in 11s
Build and Release / release (push) Has been skipped
2025-12-25 11:36:33 +08:00
6 changed files with 31 additions and 6 deletions

View File

@@ -9,7 +9,7 @@ on:
env:
DOCKER_BUILDKIT: "1"
PRODUCT_NAME: "xxxigcc"
PACKAGE_VERSION: "3.4.8-xg1"
PACKAGE_VERSION: "3.4.9-xg1"
BUILDX_NO_DEFAULT_ATTESTATIONS: "1"
jobs:

View File

@@ -34,10 +34,10 @@ sudo apt-get install xxxigcc
```bash
# 1. 下载对应架构的包
wget https://gitea.bcde.io/releases/download/3.4.8-xg1/xxxigcc-amd64-ubuntu-3.4.8-xg1.tar.gz
wget https://gitea.bcde.io/releases/download/3.4.9-xg1/xxxigcc-amd64-ubuntu-3.4.9-xg1.tar.gz
# 2. 解压
tar -xzf xxxigcc-amd64-ubuntu-3.4.8-xg1.tar.gz
tar -xzf xxxigcc-amd64-ubuntu-3.4.9-xg1.tar.gz
cd xxxigcc
# 3. 编辑配置文件

2
debian/build-deb.sh vendored
View File

@@ -4,7 +4,7 @@ set -e
# 参数检查
if [ $# -ne 3 ]; then
echo "Usage: $0 <ARCH> <VERSION> <TARGZ_FILE>"
echo "Example: $0 amd64 3.4.8-xg1 xxxigcc-amd64-ubuntu-3.4.8-xg1.tar.gz"
echo "Example: $0 amd64 3.4.9-xg1 xxxigcc-amd64-ubuntu-3.4.9-xg1.tar.gz"
exit 1
fi

View File

@@ -33,6 +33,8 @@ SyslogIdentifier=xxxigcc-daemon
# 资源限制
LimitNOFILE=65535
LimitMEMLOCK=infinity
AmbientCapabilities=CAP_IPC_LOCK
[Install]
WantedBy=multi-user.target

View File

@@ -53,8 +53,9 @@ get_arch() {
# 添加 APT 源并更新
add_apt_repository() {
echo "deb [trusted=yes] https://${GITEA_SERVER}/api/packages/${GITEA_OWNER}/debian stable main" \
>/etc/apt/sources.list.d/xxxigcc.list
curl https://${GITEA_SERVER}/api/packages/${GITEA_OWNER}/debian/repository.key -o /etc/apt/keyrings/gitea-${GITEA_OWNER}.asc
echo "deb [signed-by=/etc/apt/keyrings/gitea-${GITEA_OWNER}.asc] https://${GITEA_SERVER}/api/packages/${GITEA_OWNER}/debian stable main" \
>/etc/apt/sources.list.d/${GITEA_OWNER}.list
apt-get update -qq
}
@@ -100,6 +101,16 @@ configure_cpu_rx() {
jq ".cpu.$field = [ $rx_array ]" "$CONFIG_FILE" >"$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
}
# 配置大页内存
configure_hugepages() {
if [[ "$one_gb_pages" == "true" ]]; then
log "$BLUE" "配置 大页内存..."
sysctl -w vm.nr_hugepages=3072
echo "vm.nr_hugepages=3072" >>/etc/sysctl.conf
log "$GREEN" "大页内存配置完成"
fi
}
# 更新配置文件
replace_config() {
[[ ! -f "$CONFIG_FILE" ]] && error "配置文件缺失"
@@ -136,6 +147,7 @@ replace_config() {
jq "$jq_cmd" "$CONFIG_FILE" >"$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
configure_cpu_rx
configure_hugepages
}
show_usage() {

View File

@@ -108,6 +108,16 @@ configure_cpu_rx() {
jq ".cpu.$field = [ $rx_array ]" "$CONFIG_FILE" >"$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
}
# 配置大页内存
configure_hugepages() {
if [[ "$one_gb_pages" == "true" ]]; then
log "$BLUE" "配置 大页内存..."
sysctl -w vm.nr_hugepages=3072
echo "vm.nr_hugepages=3072" >>/etc/sysctl.conf
log "$GREEN" "大页内存配置完成"
fi
}
# 更新配置文件
replace_config() {
[[ ! -f "$CONFIG_FILE" ]] && error "配置文件缺失"
@@ -144,6 +154,7 @@ replace_config() {
jq "$jq_cmd" "$CONFIG_FILE" >"$CONFIG_FILE.tmp" && mv "$CONFIG_FILE.tmp" "$CONFIG_FILE"
configure_cpu_rx
configure_hugepages
}
# 创建并启动服务