update docs/setup_ubuntu_2204.sh
This commit is contained in:
parent
657e7937a9
commit
b3c5ba4dbf
3
Makefile
3
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 \
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user