建设网站一定要会代码吗,重庆短视频行业,网站搭建课程标准,页面模板怎么修改目录 一、Nacos持久化
1.持久化说明 2.安装mysql数据库5.6.5以上版本(略) 3.修改配置文件 二、nacos高可用
1.集群说明
2.nacos集群架构图 2.集群搭建注意事项
3.集群规划 4.搭建nacos集群
5.安装Nginx
6.配置nginx conf配置文件 7.启动nginx进行测试即可 一、Nacos持久…目录 一、Nacos持久化
1.持久化说明 2.安装mysql数据库5.6.5以上版本(略) 3.修改配置文件 二、nacos高可用
1.集群说明
2.nacos集群架构图 2.集群搭建注意事项
3.集群规划 4.搭建nacos集群
5.安装Nginx
6.配置nginx conf配置文件 7.启动nginx进行测试即可 一、Nacos持久化
1.持久化说明 在0.7版本之前在单机模式时nacos使用嵌入式数据库(derby)实现数据的存储不方便观察数据存储的基本情况。 0.7版本增加了支持mysql数据源能力具体的操作步骤 1.安装数据库版本要求5.6.5 2.初始化mysql数据库数据库初始化文件nacos-mysql.sql 3.修改conf/application.properties文件增加支持mysql数据源配置目前只支持mysql添加mysql数据源的url、用户名和密码。 2.安装mysql数据库5.6.5以上版本(略) - 添加官方的yum源创建并编辑mysql-community.repo文件 vi /etc/yum.repos.d/mysql-community.repo - 粘贴以下内容到源文件中 [mysql57-community] nameMySQL 5.7 Community Server baseurlhttp://repo.mysql.com/yum/mysql-5.7-community/el/7/$basearch/ enabled1 gpgcheck0 gpgkeyfile:///etc/pki/rpm-gpg/RPM-GPG-KEY-mysql - 安装mysql yum install mysql-community-server -y - 启动mysql数据库 systemctl start mysqld - 修改mysql数据库密码 grep temporary password /var/log/mysqld.log mysqladmin -u root -p password 回车 输入原始密码 在输入新的密码 - 登录mysql mysql -uroot -pyourPwd - 修改远程连接 grant all privileges on *.* to root% identified by yourPwd with grant option; flush privileges; 3.修改配置文件 spring.datasource.platformmysql db.num1 db.url.0jdbc:mysql://127.0.0.1:3306/nacos_config? characterEncodingutf8connectTimeout1000socketTimeout3000autoReconnecttrue useUnicodetrueuseSSLfalseserverTimezoneUTC db.userroot db.passwordyourPwd 二、nacos高可用
1.集群说明 集群 cluster : 统一种软件服务的多个节点对一个系统提供服务称之为这个软件服务集群 tomcat集群 mysql集群 redis集群 es集群... 集群解决问题: 1.并发访问压力 2.单节点故障问题 2.nacos集群架构图 集群部署说明 2.集群搭建注意事项 注意: a.3个或3个以上Nacos节点才能构成集群。 b.要求虚拟机内存分配必须大于2G以上 3.集群规划 node cluster: ip 8845 nacos01 ip 8846 nacos02 ip 8847 nacos03 ip 9090 nginx ip 3306 mysql 4.搭建nacos集群 1).将nacos安装包从新解压缩 2).开启nacos mysql持久化 注意:数据库中不能存在原始数据 3).修改nacos conf目录中cluster.conf文件添加所有集群节点 ip:8845 ip:8846 ip:8847 4).将修改后nacos复制三份 注意:修改为不同端口信息 5).分别启动三台机器 ./startup.sh 5.安装Nginx - 0.安装必要依赖 yum install -y gcc pcre-devel zlib-devel - 1.下载Nginx http://nginx.org/en/download.html - 2.将Nginx上传到linux中,并解压缩 tar -zxvf nginx-1.11.1.tar.gz - 3.查看Nginx安装目录 [rootlocalhost nginx-1.11.1]# ls auto CHANGES CHANGES.ru conf configure contrib html LICENSE man README src - 4.在Nginx安装目录中执行如下命令:(指定安装位置) ./configure --prefix/usr/nginx - 5.执行上述命令后,执行如下命令: make make install -6. 启动 1.进入sbin目录 启动命令:./nginx 查看nginx 是否启动成功 : ps aux|grep nginx 默认监听端口为80:端口 http://主机:80 2.关闭 Nginx 服务 ./nginx -s stop 3.加载配置启动 ./nginx -c /usr/nginx/conf/nginx.conf 6.配置nginx conf配置文件 a.加入如下配置: upstream nacos-servers { server ip:8845; server ip:8846; server ip:8847; } b.修改 location / { proxy_pass http://nacos-servers/; } 7.启动nginx进行测试即可