Files
Nexus/UBUNTU-DEV-README.txt
T
2026-07-08 22:31:31 +08:00

50 lines
2.0 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Nexus — Ubuntu 离线开发包
========================
解压:
mkdir -p ~/Nexus && tar xzf nexus-ubuntu-dev-2026-06-03.tar.gz -C ~/
cd ~/Nexus
Python 后端:
sudo apt install -y python3 python3-venv python3-pip git curl build-essential
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt -r requirements-dev.txt
# 复制已有 .env,或执行下方 generate + sync_root_env
MySQL + RedisDocker):
sudo apt install -y docker.io docker-compose-v2
sudo usermod -aG docker "$USER" # 重新登录后免 sudo docker
python3 docker/generate_env.py
python3 docker/sync_root_env.py # 生成根目录 .env127.0.0.1 + 较小连接池)
docker compose up -d mysql redis # Redis 已映射 6379 供宿主机 uvicorn
# 首次空库:先不要 sync_root_env,无 .env 启动 uvicorn 走 /app/install.html 向导
启动 API
bash scripts/start-dev.sh
# 或一键验证:bash scripts/local_verify.sh
前端(Node 20+):
cd frontend && npm ci && npx vite build
编码 / 换行(Windows tar 解压后必做):
git config core.autocrlf false
bash scripts/normalize_worktree_lf.sh
python3 scripts/check_worktree_eol.py
python3 scripts/check_text_eol.py
详见 docs/audit/2026-06-04-encoding-review-ubuntu-phase1.md
SOCKS5 代理(拉 Docker / npm 镜像):
默认 192.168.124.93:10808 — 改 scripts/proxychains-docker.conf 或环境变量
scripts/with-proxy.sh docker compose pull
cd frontend && ../scripts/with-proxy.sh npm ci
source scripts/proxy-env.sh # pip/curl 等
本地管理员(空库一次):
# .env 增加 NEXUS_TEST_ADMIN_PASSWORD=你的密码
python3 scripts/seed_local_admin.py
cd frontend && NEXUS_E2E_BASE=http://127.0.0.1:8600 NEXUS_E2E_PASSWORD=... npm run test:e2e
工作区路径:~/Nexus
路径 SSOTdocs/project/linux-dev-paths.md · docs/project/local-integration-test.md
Git 远程:http://66.154.115.8:3000/admin/Nexus.git(网络恢复后可 git pull