Deploying the Nacos Sync Component
Procedure
- Obtain the Nacos Sync deployment package.
Download nacos-sync-0.4.8.tar.gz.
- Create the database and table required by Nacos Sync.
- Create a database instance. For details, see Buying an RDS for MySQL DB Instance.
- Connect to the MySQL instance. For details, see Instance Connection.
- Create a database. Set the name to nacos_sync and the character set to utf8mb4. For details, see Creating a Database.
- Decompress the nacos-sync-0.4.8.tar.gz package to obtain the nacosSync.sql file in the nacos-sync/bin/ directory and execute the file. For details, see Executing SQL Statements. After the execution, three tables are generated.
cluster #Cluster information task #Synchronization task information system_config #System configuration information
- Deploy Nacos Sync on the ECS.
- Log in to the ECS. For details, see Logging In to a Linux ECS.
- Upload the obtained package to the /tmp/ directory on the ECS.
- In the directory where the compressed package is stored, decompress the package to the current folder.
tar -zxvf nacos-sync-0.4.8.tar.gz
- Modify the database information in the application.properties configuration file.
cd nacos-sync/conf
vi application.properties
Change the database connection information in the file to the database information created in 2 and save the file.spring.datasource.url=jdbc:mysql://127.0.0.1:3306/nacos_sync?characterEncoding=utf8 # Change the value to the IP address of the requested database and the information about the self-created database. spring.datasource.username=root # Database username. spring.datasource.password=xxxxxx # Database password.
- Start the Nacos Sync service.
cd bin/
sh startup.sh start
The log path is nacos-sync/logs. You can check whether any exception information exists.
You can modify the JAVA_OPT parameter in the startup.sh file to customize the JVM heap memory size.
- Access the Nacos Sync service address.
The access link is in the format of IP address+port number. The IP address is the EIP bound to the ECS, and the port number is the port number configured in the application.properties file.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot