Location>code7788 >text

Nacos 2.3.2 deployment in ubuntu

Popularity:428 ℃/2024-10-17 13:53:48

Nacos 2.3.2 deployment under ubuntu

download address

Release History | Nacos Official Site

/nacos-server/nacos-server-2.3.

Modify File

Open Forensics

### Enable authentication
=true
### The auth system to use, currently only 'nacos' and 'ldap' is supported.
=nacos
### Authentication server identity key
=${Customize to ensure consistency across all nodes}
### Authentication server identity key value
=${Customize to ensure consistency across all nodes}
### The key used to generate the token.
= ${Customize to ensure consistency across all nodes} ### The value of the authentication server's identity key.

Enable token caching

Pros: Since token parsing is time-consuming, in order to improve the performance of the interface, you can consider turning on the feature of caching Token, and using string comparison instead of Token parsing.

=true

Configure mysql address

# Specify mysql, if this attribute is not released, the built-in data source will be used by default.
=mysql
### Count of DB.
=1
### Connect URL of DB.
.0=jdbc:mysql://192.168.99.105:3306/nacos_server?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&. autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
.0=shushan
.0=yourPassword

Turn on monitoring

=*

Deploy and run (monolithic mode)

### Unzip
unzip /root/nacos-server-2.3. -d /usr/share/nacos-server
mv /usr/share/nacos-server/nacos /usr/share/nacos-server/nacos2.3.2
cd /usr/share/nacos-server/nacos2.3.2/bin
bash -m standalone

Pit:

Can't use openjdkOtherwise, logging in will result in an error caused: Invalid key: "Invalid key", or "Invalid key".

But using oracle's jdk is fine, for details see

/alibaba/nacos/issues/12097

cap (a poem)/post/7288624193955315749

compile

vim /etc/systemd/system/

[Unit]
Description=Nacos Server
After=
 
[Service]
Type=forking
ExecStart=/usr/share/nacos-server/nacos2.3.2/bin/ -m standalone
ExecStop=/usr/share/nacos-server/nacos2.3.2/bin/
User=root
Restart=on-failure
 
[Install]
WantedBy=

authorizations

chmod +x /usr/share/nacos-server/nacos2.3.2/bin/
chmod +x /usr/share/nacos-server/nacos2.3.2/bin/

systemctl daemon-reload

systemctl start

# Boot up

systemctl enable