linux版. 提取码: mrii
windows版 . 提取码: 4pkx
解压文件
[root@localhost /]# tar -zxvf nacos-server-1.1.3.tar.gz
启动nacos
[root@localhost bin]# sh startup.sh -m standalone
访问:
浏览器输入地址: http://127.0.0.1:8848/nacos/
用户名:nacos
密码;nacos
报错(一)
./startup.sh: 78: ./startup.sh: [[: not found
./startup.sh: 88: ./startup.sh: [[: not found
./startup.sh: 90: ./startup.sh: [[: not found
./startup.sh: 96: ./startup.sh: [[: not found
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/data/soft/nacos/logs/java_heapdump.hprof -XX:-UseLargePages -Djava.ext.dirs=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext:/usr/lib/jvm/java-8-openjdk-amd64/lib/ext:/data/soft/nacos/plugins/cmdb:/data/soft/nacos/plugins/mysql -Xloggc:/data/soft/nacos/logs/nacos_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Dnacos.home=/data/soft/nacos -jar /data/soft/nacos/target/nacos-server.jar --spring.config.location=classpath:/,classpath:/config/,file:./,file:./config/,file:/data/soft/nacos/conf/ --logging.config=/data/soft/nacos/conf/nacos-logback.xml
./startup.sh: 116: ./startup.sh: [[: not found
nacos is starting,you can check the /data/nacos/logs/start.out
解决办法
改用命令bash -f ./startup.sh -m standalone启动
报错(二)
$ bash -f ./startup.sh -m standalone
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xms512m -Xmx512m -Xmn256m -Dnacos.standalone=true -Dnacos.member.list= -Djava.ext.dirs=/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext:/usr/lib/jvm/java-8-openjdk-amd64/lib/ext -Xloggc:/home/dev/afiletest/nacos/logs/nacos_gc.log -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=10 -XX:GCLogFileSize=100M -Dloader.path=/home/dev/afiletest/nacos/plugins/health,/home/dev/afiletest/nacos/plugins/cmdb -Dnacos.home=/home/dev/afiletest/nacos -jar /home/dev/afiletest/nacos/target/nacos-server.jar --spring.config.location=classpath:/,classpath:/config/,file:./,file:./config/,file:/home/dev/afiletest/nacos/conf/ --logging.config=/home/dev/afiletest/nacos/conf/nacos-logback.xml --server.max-http-header-size=524288
nacos is starting with standalone
nacos is starting,you can check the /home/dev/afiletest/nacos/logs/start.out
解决办法
查看防火墙,关闭
firewall-cmd --state
systemctl stop firewalld.service
然后访问正常:
http://localhost:8848/nacos/