For AI agents: the complete documentation index is available at https://www.tteam.icu/llms.txt, the full documentation bundle is available at https://www.tteam.icu/llms-full.txt, and this page is available as Markdown at https://www.tteam.icu/ops/service/nacos.md.

nacos

官方文档

Nacos 可以用作微服务的管理,也可以存储配置文件。

启动
创建用户和命名空间
#!/bin/bash

docker kill nacos
docker rm nacos

docker run --name nacos -d \
--net host \
--restart=always \
-v /etc/localtime:/etc/localtime:ro \
-v /etc/timezone:/etc/timezone:ro \
-v $(pwd)/data/:/home/nacos/data/ \
-e NACOS_AUTH_ENABLE=true \
-e NACOS_AUTH_TOKEN_EXPIRE_SECONDS=86400 \
-e NACOS_AUTH_TOKEN=dnN5T2wxVld4TzdRQjFoekNvMnBnRUxxSUpVRU5kSU4= \
-e NACOS_AUTH_CACHE_ENABLE=false \
-e NACOS_AUTH_IDENTITY_VALUE=vfmY1wdxXfXi0ogB \
-e NACOS_AUTH_IDENTITY_KEY=qYEglRrmYbudPpjd \
-e JVM_XMS=512m \
-e JVM_XMX=512m \
-e MODE=standalone \
nacos/nacos-server:v2.4.1
Tip

NACOS_AUTH_TOKEN 参数需要使用 openssl rand -base64 32 来生成。