First download the compressed package of nacos from github: https://github.com/alibaba/nacos/releases After the download is complete, transfer the file to the Linux server via WinSCP and then decompress the compressed package using the tar -zxvf command. After decompression is complete, enter the conf directory Open the clusmter.conf file and add Save and exit through the :wq command, then enter startup.sh through the vim command After the modification here is completed, find the bottom position of this file Add the relevant configuration in the red box, save and exit, and then enter the conf file of nginx Find the nginx.conf file and enter vim to modify the relevant ports of nginx load The port number added in the upstream cluster is the three ports added in the nacos conf file before. The default port of nginx is 80, which I changed to 1111 I started three nacos services here and then changed the nacos path in the application.yml in the previous springcloud to the path and port number of nginx Check whether the service is registered in nacos on Linux through the URL Finally, because nacos integrates an embedded database by default, if you want to read the configuration of nacos into mysql, you can enter the conf directory of nacos, there is a nacos-mysql.sql open it, there are some tables and data needed by nacos, copy them out, put them in mysql and execute the following, then open application.properties spring.datasource.platform=mysql db.num=1 db.url.0=jdbc:mysql://127.0.0.1:3306/nacos_config?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC db.user=root db.password=123456 Add the above code and modify it to your own mysql url, user and password. In the future, the configuration on nacos will be saved in mysql instead of the embedded database that comes with nacos. This is the end of this article about the detailed tutorial of springcloud alibaba nacos linux configuration. For more related springcloud alibaba content, please search 123WORDPRESS.COM's previous articles or continue to browse the following related articles. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: How to operate json fields in MySQL
>>: How to encapsulate the carousel component in Vue3
Occasionally you'll see characters such as ...
1. First, let's review the relevant knowledge...
Table of contents Preface Local storage usage sce...
Tables once played a very important role in web p...
This article lists the most commonly used image c...
Cluster Deployment Overview 172.22.12.20 172.22.1...
This article example shares the specific code of ...
This article uses examples to illustrate the prin...
It is provided in the form of WeChat components. ...
When I was interviewing for a BI position at a ce...
CSS CodeCopy content to clipboard .bottomTable{ b...
Get the current date + time (date + time) functio...
usemap is an attribute of the <img> tag, use...
1. Command Introduction The ln command is used to...
When making forms, we often encounter the situati...