Linux(Ubuntu) Nacos环境的搭建
Linux(Ubuntu) Nacos环境的搭建
1) 下载
去官网下载:https://github.com/alibaba/nacos/releases/tag/1.1.4
下载: 第一个即:nacos-server-1.1.4.tar.gz
2 ) 解压
3) 进nacos根目录的bin目录下。
root@nt:/usr/local/nacos/nacos-server-1.1.4/nacos/bin# pwd /usr/local/nacos/nacos-server-1.1.4/nacos/bin root@nt:/usr/local/nacos/nacos-server-1.1.4/nacos/bin# ll 总用量 40 drwxr-xr-x 4 root root 4096 5月 17 16:19 ./ drwxr-xr-x 7 root root 4096 5月 17 16:19 ../ -rw-r--r-- 1 root root 767 5月 17 16:19 derby.log drwxr-xr-x 2 root root 4096 5月 17 16:19 logs/ -rwxr-xr-x 1 root root 954 5月 17 16:19 shutdown.cmd* -rwxr-xr-x 1 root root 949 5月 17 16:19 shutdown.sh* -rwxr-xr-x 1 root root 2854 5月 17 16:19 startup.cmd* -rwxr-xr-x 1 root root 4801 5月 17 16:19 startup.sh* drwxr-xr-x 3 root root 4096 5月 17 16:19 work/
4) 启动,这里非常关键。
bash ./startup.sh -m standalone 或
sh ./startup.sh -m standalone
(-m standalone代表单机版启动)
执行后需要等儿。。
root@nt:/usr/local/nacos/nacos-server-1.1.4/nacos/bin# bash startup.sh -m standalone /usr/local/java/jdk-11.0.11/bin/java -Xms512m -Xmx512m -Xmn256m -Dnacos.standalone=true -cp .:/usr/local/nacos/nacos-server-1.1.4/nacos/plugins/cmdb/*.jar:/usr/local/nacos/nacos-server-1.1.4/nacos/plugins/mysql/*.jar -Xlog:gc*:file=/usr/local/nacos/nacos-server-1.1.4/nacos/logs/nacos_gc.log:time,tags:filecount=10,filesize=102400 -Dnacos.home=/usr/local/nacos/nacos-server-1.1.4/nacos -Dloader.path=/usr/local/nacos/nacos-server-1.1.4/nacos/plugins/health -jar /usr/local/nacos/nacos-server-1.1.4/nacos/target/nacos-server.jar --spring.config.location=classpath:/,classpath:/config/,file:./,file:./config/,file:/usr/local/nacos/nacos-server-1.1.4/nacos/conf/ --logging.config=/usr/local/nacos/nacos-server-1.1.4/nacos/conf/nacos-logback.xml --server.max-http-header-size=524288 nacos is starting with standalone nacos is starting,you can check the /usr/local/nacos/nacos-server-1.1.4/nacos/logs/start.out
5)测试,访问 http:127.0.0.1:8848/nacos
登录: nacos nacos