?而以集群模式启动需要数据库持久化,我们修改这个启动脚本将它修改为单机模式。我们编辑启动脚本startup.sh,找到standalone复制,然后再把MODE修改为standalone即可。
?已经很明显了,它告诉我们是以单机模式启动难的,即standalone。如果你想查看日志,它也告诉你了,即:/home/fangdake/software/nacos/logs/start.out。我们也可以打开看看日志启动情况:
/usr/lib/jvm/java-17-openjdk-17.0.1.0.12-2.el8_5.x86_64/bin/java ? -Xms512m -Xmx512m -Xmn256m -Dnacos.standalone=true -Dnacos.member.list= -Xlog:gc*:file=/home/fangdake/software/nacos/logs/nacos_gc.log:time,tags:filecount=10,filesize=102400 -Dloader.path=/home/fangdake/software/nacos/plugins/health,/home/fangdake/software/nacos/plugins/cmdb,/home/fangdake/software/nacos/plugins/selector -Dnacos.home=/home/fangdake/software/nacos -jar /home/fangdake/software/nacos/target/nacos-server.jar ?--spring.config.additional-location=file:/home/fangdake/software/nacos/conf/ --logging.config=/home/fangdake/software/nacos/conf/nacos-logback.xml --server.max-http-header-size=524288
? ? ? ? ?,--.
? ? ? ?,--.'|
? ?,--,: ?: | ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? ? Nacos 2.0.4
,`--.'`| ?' : ? ? ? ? ? ? ? ? ? ? ? ,---. ? ? ? ? ? ? ? Running in stand alone mode, All function modules
| ? : ?: ?| | ? ? ? ? ? ? ? ? ? ? ?' ? ,'\ ? .--.--. ? ?Port: 8848
: ? | ? \ | : ?,--.--. ? ? ,---. ?/ ? / ? | / ?/ ? ?' ? Pid: 181226
| ? : ' ?'; | / ? ? ? \ ? / ? ? \. ? ; ,. :| ?: ?/`./ ? Console: http://192.168.1.6:8848/nacos/index.html
' ? ' ;. ? ?;.--. ?.-. | / ? ?/ '' ? | |: :| ?: ?;_
| ? | | \ ? | \__\/: . .. ? ?' / ' ? | .; : \ ?\ ? ?`. ? ? ?https://nacos.io
' ? : | ?; .' ," .--.; |' ? ; :__| ? : ? ?| ?`----. ? \
| ? | '`--' ?/ ?/ ?,. ?|' ? | '.'|\ ? \ ?/ ?/ ?/`--' ?/
' ? : | ? ? ; ?: ? .' ? \ ? : ? ?: `----' ?'--'. ? ? /
; ? |.' ? ? | ?, ? ? .-./\ ? \ ?/ ? ? ? ? ? ?`--'---'
'---' ? ? ? ?`--`---' ? ? `----'
2022-03-20 20:00:26,226 INFO Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@3fae596' of type [org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-03-20 20:00:26,232 INFO Bean 'methodSecurityMetadataSource' of type [org.springframework.security.access.method.DelegatingMethodSecurityMetadataSource] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)
2022-03-20 20:00:26,547 INFO Tomcat initialized with port(s): 8848 (http)
2022-03-20 20:00:26,948 INFO Root WebApplicationContext: initialization completed in 3467 ms
2022-03-20 20:00:31,451 INFO Initializing ExecutorService 'applicationTaskExecutor'
2022-03-20 20:00:31,598 INFO Adding welcome page: class path resource [static/index.html]
2022-03-20 20:00:31,952 INFO Creating filter chain: Ant [pattern='/**'], []
2022-03-20 20:00:31,986 INFO Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@61853c7e, org.springframework.security.web.context.SecurityContextPersistenceFilter@d6b532f, org.springframework.security.web.header.HeaderWriterFilter@34aa8b61, org.springframework.security.web.csrf.CsrfFilter@ee96866, org.springframework.security.web.authentication.logout.LogoutFilter@2bfc2f8b, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@112c2930, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@1f758e4f, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@32e5af53, org.springframework.security.web.session.SessionManagementFilter@660b1a9d, org.springframework.security.web.access.ExceptionTranslationFilter@3a209918]
2022-03-20 20:00:32,069 INFO Initializing ExecutorService 'taskScheduler'
2022-03-20 20:00:32,098 INFO Exposing 16 endpoint(s) beneath base path '/actuator'
2022-03-20 20:00:32,223 INFO Tomcat started on port(s): 8848 (http) with context path '/nacos'
2022-03-20 20:00:32,229 INFO Nacos started successfully in stand alone mode. use embedded storage