1,下载编译后压缩包
2,修改配置,启动服务
2.1 standalone模式
在单机模式时nacos使用嵌入式数据库:derby 实现数据的存储
- 方式1:
sh bin/startup.sh -m standalone - 方式2:修改bin/start.sh的MODE参数, 然后执行启动脚本
2.2 cluster 模式
[root@c7 nacos]
192.168.56.7:8848
[root@c7 nacos]
server.servlet.contextPath=/nacos
server.port=8848
nacos.inetutils.ip-address=192.168.56.7
nacos.inetutils.ignored-interfaces[0]=eth0
spring.datasource.platform=mysql
db.num=1
db.url.0=jdbc:mysql://192.168.56.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
db.user.0=root
db.password.0=root
db.pool.config.connectionTimeout=30000
db.pool.config.validationTimeout=10000
db.pool.config.maximumPoolSize=20
db.pool.config.minimumIdle=2
nacos.naming.empty-service.auto-clean=true
nacos.naming.empty-service.clean.initial-delay-ms=50000
nacos.naming.empty-service.clean.period-time-ms=30000
management.metrics.export.elastic.enabled=false
management.metrics.export.influx.enabled=false
server.tomcat.accesslog.enabled=true
server.tomcat.accesslog.pattern=%h %l %u %t "%r" %s %b %D %{User-Agent}i %{Request-Source}i
server.tomcat.basedir=
nacos.security.ignore.urls=/,/error,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-ui/public/**,/v1/auth/**,/v1/console/health/**,/actuator/**,/v1/console/server/**
nacos.core.auth.system.type=nacos
nacos.core.auth.enabled=false
nacos.core.auth.default.token.expire.seconds=18000
nacos.core.auth.default.token.secret.key=SecretKey012345678901234567890123456789012345678901234567890123456789
nacos.core.auth.caching.enabled=true
nacos.core.auth.enable.userAgentAuthWhite=false
nacos.core.auth.server.identity.key=serverIdentity
nacos.core.auth.server.identity.value=security
nacos.istio.mcp.server.enabled=false
[root@c7 nacos]
[root@c7 nacos]
[root@c7 nacos]
[root@c7 nacos]
3,访问web控制台: http://c7:8848/nacos/
用户名密码:nacos nacos
|