diff --git a/Makefile b/Makefile index 3fae536..c580ee6 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ OS := $(shell uname -s) SHELL := /bin/bash O_BIN ?= /usr/local/go/bin -export PATH := $(GO_BIN):$(PATH) PG_DSN ?= postgres://user:password@127.0.0.1:5432/postgres NODE_MAJOR ?= 22 +export PATH := $(GO_BIN):$(PATH) + .PHONY: install install-openresty install-redis install-postgresql install-pgvector install-zhparser init-db \ build build-server build-homepage build-panel \ start start-openresty start-server start-homepage start-panel \ diff --git a/docs/setup_ubuntu_2204.sh b/docs/setup_ubuntu_2204.sh index 7694d4d..09651d9 100644 --- a/docs/setup_ubuntu_2204.sh +++ b/docs/setup_ubuntu_2204.sh @@ -55,9 +55,12 @@ install-nodejs() { sudo apt-get install -y ca-certificates curl gnupg # NodeSource 官方仓库(更稳妥的 GPG 方式) - sudo mkdir -p /etc/apt/keyrings - curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \ - | sudo gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg + sudo install -d -m 0755 /etc/apt/keyrings + curl -fsSL --socks5-hostname 127.0.0.1:1080 \ + https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key \ + | sudo gpg --batch --yes --dearmor -o /etc/apt/keyrings/nodesource.gpg + gpg --keyserver keyserver.ubuntu.com --recv-keys 2F59B5F99B1BE0B4 + gpg --export --armor 2F59B5F99B1BE0B4 | sudo tee /etc/apt/trusted.gpg.d/missing-key.gpg echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR}.x nodistro main" \ | sudo tee /etc/apt/sources.list.d/nodesource.list >/dev/null