jimtse
网站页面
#*************** Config Module Related Configurations ***************#
### If use MySQL as datasource:
### Deprecated configuration property, it is recommended to use `spring.sql.init.platform` replaced.
# spring.datasource.platform=mysql
spring.sql.init.platform=mysql
### Count of DB:
db.num=1
### Connect URL of DB:
db.url.0=jdbc:mysql://127.0.0.1:3306/nacos_cfg?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
db.user.0=root
db.password.0=root
### The auth system to use, currently only 'nacos' and 'ldap' is supported:
nacos.core.auth.system.type=nacos
### If turn on auth system:
nacos.core.auth.enabled=true
### The two properties is the white list for auth and used by identity the request from other server.
nacos.core.auth.server.identity.key=nacosKey
nacos.core.auth.server.identity.value=nacosValue
### The default token (Base64 String):
nacos.core.auth.plugin.nacos.token.secret.key=PqxnJL1XLuX4LgN3wUivR23hUpt6zuVCTMM7cpINAEM=
-- 添加nacos用户、角色和权限
INSERT INTO `nacos_cfg`.`users` (`username`, `password`, `enabled`) VALUES ('nacos', '$2a$10$8aPT4SMvJkzR87eylTQene97fwb3GD/xEnY3fnYxbf5x8ShCv4xVK', 1);
INSERT INTO `nacos_cfg`.`roles` (`username`, `role`) VALUES ('nacos', 'ROLE_ADMIN');
INSERT INTO `nacos_cfg`.`permissions` (`role`, `resource`, `action`) VALUES ('ROLE_ADMIN', ':*:*', 'rw');
sh startup.sh -m standalone
# ip:port
200.8.9.16:8848
200.8.9.17:8848
200.8.9.18:8848
# Linux/Unix/Mac
sh startup.sh -p embedded
# Ubuntu
bash startup.sh -p embedded
# Windows
startup.cmd -p embedded
sh shutdown.sh