Linux(centos)部署Nacos


这里使用的是Linux(centos7)版本中,部署1.4.2的nacos


一、先去官网下载需要的安装包

这是1.4.2版本的
https://github.com/alibaba/nacos/releases/tag/1.4.2
其它的直接去
https://github.com/alibaba/nacos/releases
即可

二、解压安装包

1.先把安装包上传至服务器

在这里插入图片描述

2.解压

在这里插入图片描述
使用tar -zxvf命令解压

tar -zxvf nacos-server-1.4.2.tar.gz

在这里插入图片描述

三、配置Nacos的数据库

此处需注意,1.3.1版本之下的是不支持mysql8.0的数据库的
///nacos/nacos/conf目录下,有个mysql.sql
手动创建数据库,然后执行sql脚本(1.4.2版本是自己有的)
在这里插入图片描述

四、修改Nacos的配置文件

配置文件在:
/****/*****/nacos/nacos/conf下的application.properties
在这里插入图片描述

#修改nacos的对应数据库
vim //****/*****/nacos/nacos/conf下的application.properties

在这里插入图片描述

根据自己的情况做修正

五、启动Nacos

1.启动指令

./startup.sh -m standalone

在这里插入图片描述

2.查看日志

/usr/local/nacos/nacos/logs的nacos.log文件
在这里插入图片描述

2021-05-26 10:29:30,992 INFO Starting Nacos v1.4.2 on feiw-nacos-test with PID 8661 (/usr/local/nacos/nacos/target/nacos-server.jar started by root in /usr/local/nacos/nacos/bin)

2021-05-26 10:29:30,993 INFO The following profiles are active: standalone

2021-05-26 10:29:39,522 INFO Bean 'org.springframework.security.access.expression.method.DefaultMethodSecurityExpressionHandler@18e36d14' 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)

2021-05-26 10:29:39,533 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)

2021-05-26 10:29:40,582 INFO Tomcat initialized with port(s): 8848 (http)

2021-05-26 10:29:40,683 INFO Starting service [Tomcat]

2021-05-26 10:29:40,684 INFO Starting Servlet engine: [Apache Tomcat/9.0.38]

2021-05-26 10:29:41,812 INFO At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.

2021-05-26 10:29:41,942 INFO Initializing Spring embedded WebApplicationContext

2021-05-26 10:29:41,942 INFO Root WebApplicationContext: initialization completed in 10733 ms

2021-05-26 10:29:42,793 INFO HikariPool-1 - Starting...

2021-05-26 10:29:43,490 INFO HikariPool-1 - Start completed.

2021-05-26 10:29:44,381 INFO Nacos-related cluster resource initialization

2021-05-26 10:29:44,405 INFO The cluster resource is initialized

2021-05-26 10:29:45,613 INFO Reflections took 229 ms to scan 1 urls, producing 4 keys and 6 values 

2021-05-26 10:29:45,728 INFO Reflections took 14 ms to scan 1 urls, producing 6 keys and 26 values 

2021-05-26 10:29:45,772 INFO Reflections took 12 ms to scan 1 urls, producing 3 keys and 15 values 

2021-05-26 10:29:45,801 INFO Reflections took 6 ms to scan 1 urls, producing 2 keys and 12 values 

2021-05-26 10:29:47,569 INFO Initializing ExecutorService 'applicationTaskExecutor'

2021-05-26 10:29:48,171 INFO Adding welcome page: class path resource [static/index.html]

2021-05-26 10:29:49,153 INFO Creating filter chain: Ant [pattern='/**'], []

2021-05-26 10:29:49,281 INFO Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@f713686, org.springframework.security.web.context.SecurityContextPersistenceFilter@76b74e9c, org.springframework.security.web.header.HeaderWriterFilter@22c01ab0, org.springframework.security.web.csrf.CsrfFilter@76318a7d, org.springframework.security.web.authentication.logout.LogoutFilter@23c388c2, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@8ab78bc, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@2c5d601e, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@74f7d1d2, org.springframework.security.web.session.SessionManagementFilter@4c4d362a, org.springframework.security.web.access.ExceptionTranslationFilter@3277e499]

2021-05-26 10:29:49,493 INFO Initializing ExecutorService 'taskScheduler'

2021-05-26 10:29:49,540 INFO Exposing 2 endpoint(s) beneath base path '/actuator'

2021-05-26 10:29:50,192 INFO Tomcat started on port(s): 8848 (http) with context path '/nacos'

2021-05-26 10:29:50,198 INFO Started Nacos in 21.852 seconds (JVM running for 23.388)

2021-05-26 10:29:50,199 INFO Nacos started successfully in stand alone mode. use external storage

六、网页访问Nacos

http://你的ip:8848/nacos
在这里插入图片描述
账户,密码均为nacos
在这里插入图片描述
登录成功
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值