{"id":258222,"date":"2022-12-19T09:09:33","date_gmt":"2022-12-19T01:09:33","guid":{"rendered":"https:\/\/gulass.cn\/?p=258222"},"modified":"2022-11-29T10:11:51","modified_gmt":"2022-11-29T02:11:51","slug":"nacos-easy-linux","status":"publish","type":"post","link":"https:\/\/gulass.cn\/nacos-easy-linux.html","title":{"rendered":"\u7b80\u5355\u4ecb\u7ecdnacos\u5355\u673a\u672c\u5730\u914d\u7f6e\u6587\u4ef6\u5b58\u50a8\u4f4d\u7f6e\u65b9\u5f0f"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u8fd9\u7bc7\u6587\u7ae0\u4e3b\u8981\u4ecb\u7ecd\u4e86nacos\u5355\u673a\u672c\u5730\u914d\u7f6e\u6587\u4ef6\u5b58\u50a8\u4f4d\u7f6e\u65b9\u5f0f\uff0c\u5177\u6709\u5f88\u597d\u7684\u53c2\u8003\u4ef7\u503c\uff0c\u5e0c\u671b\u5bf9\u5927\u5bb6\u6709\u6240\u5e2e\u52a9\u3002\u5982\u6709\u9519\u8bef\u6216\u672a\u8003\u8651\u5b8c\u5168\u7684\u5730\u65b9\uff0c\u671b\u4e0d\u541d\u8d50\u6559<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n nacos\u5355\u673a\u672c\u5730\u914d\u7f6e\u6587\u4ef6\u5b58\u50a8\u4f4d\u7f6e<\/strong><\/div>\n C:\\Users***\\nacos\\config\\config_rpc_client_nacos\\<\/p>\n <\/p>\n \u5355\u673a\u7248Nacos\u6587\u4ef6\u914d\u7f6e\u95ee\u9898<\/strong><\/div>\n Nacos\u670d\u52a1\u81ea\u52a8\u5173\u95ed<\/strong><\/span><\/div>\n \u5728\u4f7f\u7528Nacos\u65f6\uff0c\u6709\u65f6\u5019\u4f1a\u9047\u5230\u670d\u52a1\u81ea\u52a8\u5173\u95ed\u7684\u60c5\u51b5\u3002<\/p>\n \u8fd9\u901a\u5e38\u6d89\u53ca\u5230\u4e09\u65b9\u9762\u7684\u539f\u56e0\uff1a<\/p>\n \u4e0b\u9762\u9010\u4e00\u8bf4\u660e\u3002<\/p>\n \u5185\u5b58\u914d\u7f6e\u5bfc\u81f4Nacos\u5173\u95ed<\/strong><\/span><\/div>\n Nacos\u6700\u65b0\u7248\u672c\u9ed8\u8ba4\u7684JVM\u914d\u7f6e\u662f2G\uff0c\u5982\u679c\u4f60\u7684\u670d\u52a1\u5668\u914d\u7f6e\u6bd4\u8f83\u4f4e\uff0c\u5728\u8fd9\u6837\u7684\u9ed8\u8ba4\u914d\u7f6e\u4e0b\u4f1a\u5bfc\u81f4OOM\u60c5\u51b5\u7684\u53d1\u751f\u3002<\/p>\n startup.sh\u4e2d\u914d\u7f6e\u9879\uff1a<\/p>\n if [[ \"${MODE}\" == \"standalone\" ]]; then\r\n JAVA_OPT=\"${JAVA_OPT} -Xms512m -Xmx512m -Xmn256m\"\r\n JAVA_OPT=\"${JAVA_OPT} -Dnacos.standalone=true\"\r\nelse\r\n if [[ \"${EMBEDDED_STORAGE}\" == \"embedded\" ]]; then\r\n JAVA_OPT=\"${JAVA_OPT} -DembeddedStorage=true\"\r\n fi\r\n JAVA_OPT=\"${JAVA_OPT} -server -Xms2g -Xmx2g -Xmn1g -XX:MetaspaceSize=128m -XX:MaxMetaspaceSize=320m\"\r\n JAVA_OPT=\"${JAVA_OPT} -XX:-OmitStackTraceInFastThrow -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${BASE_DIR}\/logs\/java_heapdump.hprof\"\r\n JAVA_OPT=\"${JAVA_OPT} -XX:-UseLargePages\"\r\n \r\nfi<\/pre>\n |