关注微信公众号:CodingTechWork,一起学习进步。
引言
由于本地需自测,又没有公网机器共用,只能本地安装nacos
先玩起来。
安装
安装地址
安装包下载地址:nacos git hub官网
版本选择
选择最新版本或开发所需版本
下载
下载安装包tar或者tar.gz
解压
操作
进入nacos
的bin
目录进行操作
运行
通过sh startup.sh -m standalone
命令单机启动nacos
hugh@bogon bin % sh startup.sh -m standalone
/Library/Java/JavaVirtualMachines/jdk1.8.0_301.jdk/Contents/Home/bin/java -Djava.ext.dirs=/Library/Java/JavaVirtualMachines/jdk1.8.0_301.jdk/Contents/Home/jre/lib/ext:/Library/Java/JavaVirtualMachines/jdk1.8.0_301.jdk/Contents/Home/lib/ext -Xms512m -Xmx512m -Xmn256m -Dnacos.standalone=true -Dnacos.member.list= -Xloggc:/Users/hugh/devApps/nacos/logs/nacos_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Dloader.path=/Users/hugh/devApps/nacos/plugins/health,/Users/hugh/devApps/nacos/plugins/cmdb,/Users/hugh/devApps/nacos/plugins/selector -Dnacos.home=/Users/hugh/devApps/nacos -jar /Users/hugh/devApps/nacos/target/nacos-server.jar --spring.config.additional-location=file:/Users/v/devApps/nacos/conf/ --logging.config=/Users/hugh/devApps/nacos/conf/nacos-logback.xml --server.max-http-header-size=524288
nacos is starting with standalone
nacos is starting,you can check the /Users/liaojianya/devApps/nacos/logs/start.out
hugh@bogon bin %
验证
访问链接http://127.0.0.1:8848/nacos
,输入密码,默认nacos:nacos
停止
通过命令sh shutdown.sh
hugh@bogon bin % sh shutdown.sh
The nacosServer(88785) is running...
Send shutdown request to nacosServer(88785) OK