JDK1.8安装
1.下载地址jdk1.8
https://www.oracle.com/java/technologies/downloads/
2.ftp上传
## /usr/local/software/jdk-8u391-linux-x64.tar.gz
cd /usr/local/software/
tar -zxvf jdk-8u391-linux-x64.tar.gz
## 重命名
mv /usr/local/software/jdk1.8.0_391 /usr/local/jdk1.8
## 配置环境变量(也可以在/etc/profile.d目录下新建 java.sh,把变量配置进去)
cp /etc/profile /etc/profile_bak
vi /etc/profile
## 在最下面添加
export JAVA_HOME=/usr/local/jdk1.8
export PATH=$JAVA_HOME/bin:$PATH
# Esc后wq保存退出
source /etc/profile
## 测试
java -version
Nacos-server 2.2.3 安装配置
网址:https://github.com/alibaba/nacos/releases
下载链接 https://github.com/alibaba/nacos/releases/download/2.2.3/nacos-server-2.2.3.tar.gz
下载建议使用迅雷下载(p2p),使用网页下载会经常失败
1.ftp上传,启动nacos,关闭nacos
# /usr/local/software/nacos-server-2.2.3.tar.gz
# 解压
tar -zxvf nacos-server-2.2.3.tar.gz
# 解压后同级目录下有nacos
cd /usr/local/software/nacos/bin
# 下面有四个脚本 shutdown.cmd shutdown.sh startup.cmd startup.sh # *.cmd为window执行,*.sh为linux
./startup.sh -m standalone
# ps 也可以直接修改vi startup.sh 修改MODE="standalone"
./shutdown.sh # 关闭退出
2.开启nacos auth
数据库安装配置(省略),创建数据库nacos并运行sql文件
/usr/local/software/nacos/conf/mysql-schema.sql
vi /usr/local/software/nacos/conf/application.properties
# 修改如下内容
db.url.0=jdbc:mysql://127.0.0.1:3306/nacos?characterEncoding=utf8&connectTimeout=1000&socketTimeout=3000&autoReconnect=true&useUnicode=true&useSSL=false&serverTimezone=UTC
db.user.0=root
db.password.0=root
### If turn on auth system:
nacos.core.auth.enabled=true
# authkey authvalue secret.key 自定义
nacos.core.auth.server.identity.key=authkey
nacos.core.auth.server.identity.value=authvalue
nacos.core.auth.plugin.nacos.token.secret.key=axjsoijkxo()_@(!#*(@&#(*!&$#&)!*(@)#*)sxaxs*)#!*@_
# 保存退出,并启动nacos
# PS:登陆 http://IP:8848/nacos(初始化密码/账户nacos/nacos),记得修改密码
标签:jdk1.8,nacos,server,usr,2.2,local,software
From: https://www.cnblogs.com/paylove/p/17853575.html