在【Cencos7】中安装【Nacos】并适配【PostgreSQL】数据库

在【Cencos7】中安装【Nacos-2.3.0】并适配【PostgreSQL】数据库

安装JDK

wget命令下载:
wget https://repo.huaweicloud.com/java/jdk/8u151-b12/jdk-8u151-linux-x64.tar.gz
解压
tar -xzvf jdk-7u80-linux-x64.tar.gz
将解压后的目录移动到/opt下
sudo mv jdk1.8.0_151 /opt/jdk1.8.0_151
配置环境变量
# 编辑环境变量 下面两个命令二选一即可
vim /etc/profile 
#sudo vim /etc/profile.d/jdk.sh# 输入ins键进行编辑,加入以下内容,jdk目录名记得换成自己的名字
export JAVA_HOME=/opt/jdk1.8.0_151
export CLASSPATH=$:CLASSPATH:$JAVA_HOME/lib/
export PATH=$PATH:$JAVA_HOME/bin# 按下esc,进入命令行模式
# 再输入“:wq!”,强制保存退出# 让环境变量生效
source /etc/profile

安装nacos

下载nacos

下载完成后上传到Linux服务器目录中,例如 /home/nacos

解压nacos 并移动到/opt目录下
#进入nacos所在目录
cd /home/nacos#加压nacos
tar -zxvf nacos-server-2.3.0.tar.gz
#将解压后的目录移动到 /opt下
sudo mv nacos-server-2.3.0 /opt/nacos
启动测试
# 进入nacos bin 目录
cd /opt/nacos/bin#单机模式启动
sudo sh startup.sh -m standalone

访问:http://ip:8848/nacos/index.html 测试

修改配置文件
# 进入配置文件所在目录
cd /opt/nacos/conf#编辑
vim application.properties

在这里插入图片描述

初始化pgsql
/* 创建数据库 */
create database nacos;

初始化所需表

/** Copyright 1999-2018 Alibaba Group Holding Ltd.** Licensed under the Apache License, Version 2.0 (the "License");* you may not use this file except in compliance with the License.* You may obtain a copy of the License at**      http://www.apache.org/licenses/LICENSE-2.0** Unless required by applicable law or agreed to in writing, software* distributed under the License is distributed on an "AS IS" BASIS,* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.* See the License for the specific language governing permissions and* limitations under the License.*/-- ----------------------------
-- Table structure for config_info
-- ----------------------------
DROP TABLE IF EXISTS "config_info";
CREATE TABLE "config_info" ("id" bigserial NOT NULL,"data_id" varchar(255)  NOT NULL,"group_id" varchar(255) ,"content" text  NOT NULL,"md5" varchar(32) ,"gmt_create" timestamp(6) NOT NULL,"gmt_modified" timestamp(6) NOT NULL,"src_user" text ,"src_ip" varchar(20) ,"app_name" varchar(128) ,"tenant_id" varchar(128) ,"c_desc" varchar(256) ,"c_use" varchar(64) ,"effect" varchar(64) ,"type" varchar(64) ,"c_schema" text ,"encrypted_data_key" text  NOT NULL
)
;COMMENT ON COLUMN "config_info"."id" IS 'id';
COMMENT ON COLUMN "config_info"."data_id" IS 'data_id';
COMMENT ON COLUMN "config_info"."content" IS 'content';
COMMENT ON COLUMN "config_info"."md5" IS 'md5';
COMMENT ON COLUMN "config_info"."gmt_create" IS '创建时间';
COMMENT ON COLUMN "config_info"."gmt_modified" IS '修改时间';
COMMENT ON COLUMN "config_info"."src_user" IS 'source user';
COMMENT ON COLUMN "config_info"."src_ip" IS 'source ip';
COMMENT ON COLUMN "config_info"."tenant_id" IS '租户字段';
COMMENT ON COLUMN "config_info"."encrypted_data_key" IS '秘钥';
COMMENT ON TABLE "config_info" IS 'config_info';-- ----------------------------
-- Table structure for config_info_aggr
-- ----------------------------
DROP TABLE IF EXISTS "config_info_aggr";
CREATE TABLE "config_info_aggr" ("id" bigserial NOT NULL,"data_id" varchar(255)  NOT NULL,"group_id" varchar(255)  NOT NULL,"datum_id" varchar(255)  NOT NULL,"content" text  NOT NULL,"gmt_modified" timestamp(6) NOT NULL,"app_name" varchar(128) ,"tenant_id" varchar(128) 
)
;
COMMENT ON COLUMN "config_info_aggr"."id" IS 'id';
COMMENT ON COLUMN "config_info_aggr"."data_id" IS 'data_id';
COMMENT ON COLUMN "config_info_aggr"."group_id" IS 'group_id';
COMMENT ON COLUMN "config_info_aggr"."datum_id" IS 'datum_id';
COMMENT ON COLUMN "config_info_aggr"."content" IS '内容';
COMMENT ON COLUMN "config_info_aggr"."gmt_modified" IS '修改时间';
COMMENT ON COLUMN "config_info_aggr"."tenant_id" IS '租户字段';
COMMENT ON TABLE "config_info_aggr" IS '增加租户字段';-- ----------------------------
-- Records of config_info_aggr
-- ----------------------------
BEGIN;
COMMIT;-- ----------------------------
-- Table structure for config_info_beta
-- ----------------------------
DROP TABLE IF EXISTS "config_info_beta";
CREATE TABLE "config_info_beta" ("id" bigserial NOT NULL,"data_id" varchar(255)  NOT NULL,"group_id" varchar(128)  NOT NULL,"app_name" varchar(128) ,"content" text  NOT NULL,"beta_ips" varchar(1024) ,"md5" varchar(32) ,"gmt_create" timestamp(6) NOT NULL,"gmt_modified" timestamp(6) NOT NULL,"src_user" text ,"src_ip" varchar(20) ,"tenant_id" varchar(128) ,"encrypted_data_key" text  NOT NULL
)
;
COMMENT ON COLUMN "config_info_beta"."id" IS 'id';
COMMENT ON COLUMN "config_info_beta"."data_id" IS 'data_id';
COMMENT ON COLUMN "config_info_beta"."group_id" IS 'group_id';
COMMENT ON COLUMN "config_info_beta"."app_name" IS 'app_name';
COMMENT ON COLUMN "config_info_beta"."content" IS 'content';
COMMENT ON COLUMN "config_info_beta"."beta_ips" IS 'betaIps';
COMMENT ON COLUMN "config_info_beta"."md5" IS 'md5';
COMMENT ON COLUMN "config_info_beta"."gmt_create" IS '创建时间';
COMMENT ON COLUMN "config_info_beta"."gmt_modified" IS '修改时间';
COMMENT ON COLUMN "config_info_beta"."src_user" IS 'source user';
COMMENT ON COLUMN "config_info_beta"."src_ip" IS 'source ip';
COMMENT ON COLUMN "config_info_beta"."tenant_id" IS '租户字段';
COMMENT ON COLUMN "config_info_beta"."encrypted_data_key" IS '秘钥';
COMMENT ON TABLE "config_info_beta" IS 'config_info_beta';-- ----------------------------
-- Records of config_info_beta
-- ----------------------------
BEGIN;
COMMIT;-- ----------------------------
-- Table structure for config_info_tag
-- ----------------------------
DROP TABLE IF EXISTS "config_info_tag";
CREATE TABLE "config_info_tag" ("id" bigserial NOT NULL,"data_id" varchar(255)  NOT NULL,"group_id" varchar(128)  NOT NULL,"tenant_id" varchar(128) ,"tag_id" varchar(128)  NOT NULL,"app_name" varchar(128) ,"content" text  NOT NULL,"md5" varchar(32) ,"gmt_create" timestamp(6) NOT NULL,"gmt_modified" timestamp(6) NOT NULL,"src_user" text ,"src_ip" varchar(20) 
)
;
COMMENT ON COLUMN "config_info_tag"."id" IS 'id';
COMMENT ON COLUMN "config_info_tag"."data_id" IS 'data_id';
COMMENT ON COLUMN "config_info_tag"."group_id" IS 'group_id';
COMMENT ON COLUMN "config_info_tag"."tenant_id" IS 'tenant_id';
COMMENT ON COLUMN "config_info_tag"."tag_id" IS 'tag_id';
COMMENT ON COLUMN "config_info_tag"."app_name" IS 'app_name';
COMMENT ON COLUMN "config_info_tag"."content" IS 'content';
COMMENT ON COLUMN "config_info_tag"."md5" IS 'md5';
COMMENT ON COLUMN "config_info_tag"."gmt_create" IS '创建时间';
COMMENT ON COLUMN "config_info_tag"."gmt_modified" IS '修改时间';
COMMENT ON COLUMN "config_info_tag"."src_user" IS 'source user';
COMMENT ON COLUMN "config_info_tag"."src_ip" IS 'source ip';
COMMENT ON TABLE "config_info_tag" IS 'config_info_tag';-- ----------------------------
-- Records of config_info_tag
-- ----------------------------
BEGIN;
COMMIT;-- ----------------------------
-- Table structure for config_tags_relation
-- ----------------------------
DROP TABLE IF EXISTS "config_tags_relation";
CREATE TABLE "config_tags_relation" ("id" bigserial NOT NULL,"tag_name" varchar(128)  NOT NULL,"tag_type" varchar(64) ,"data_id" varchar(255)  NOT NULL,"group_id" varchar(128)  NOT NULL,"tenant_id" varchar(128) ,"nid" bigserial NOT NULL
)
;
COMMENT ON COLUMN "config_tags_relation"."id" IS 'id';
COMMENT ON COLUMN "config_tags_relation"."tag_name" IS 'tag_name';
COMMENT ON COLUMN "config_tags_relation"."tag_type" IS 'tag_type';
COMMENT ON COLUMN "config_tags_relation"."data_id" IS 'data_id';
COMMENT ON COLUMN "config_tags_relation"."group_id" IS 'group_id';
COMMENT ON COLUMN "config_tags_relation"."tenant_id" IS 'tenant_id';
COMMENT ON TABLE "config_tags_relation" IS 'config_tag_relation';-- ----------------------------
-- Records of config_tags_relation
-- ----------------------------
BEGIN;
COMMIT;-- ----------------------------
-- Table structure for group_capacity
-- ----------------------------
DROP TABLE IF EXISTS "group_capacity";
CREATE TABLE "group_capacity" ("id" bigserial NOT NULL,"group_id" varchar(128)  NOT NULL,"quota" int4 NOT NULL,"usage" int4 NOT NULL,"max_size" int4 NOT NULL,"max_aggr_count" int4 NOT NULL,"max_aggr_size" int4 NOT NULL,"max_history_count" int4 NOT NULL,"gmt_create" timestamp(6) NOT NULL,"gmt_modified" timestamp(6) NOT NULL
)
;
COMMENT ON COLUMN "group_capacity"."id" IS '主键ID';
COMMENT ON COLUMN "group_capacity"."group_id" IS 'Group ID,空字符表示整个集群';
COMMENT ON COLUMN "group_capacity"."quota" IS '配额,0表示使用默认值';
COMMENT ON COLUMN "group_capacity"."usage" IS '使用量';
COMMENT ON COLUMN "group_capacity"."max_size" IS '单个配置大小上限,单位为字节,0表示使用默认值';
COMMENT ON COLUMN "group_capacity"."max_aggr_count" IS '聚合子配置最大个数,,0表示使用默认值';
COMMENT ON COLUMN "group_capacity"."max_aggr_size" IS '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值';
COMMENT ON COLUMN "group_capacity"."max_history_count" IS '最大变更历史数量';
COMMENT ON COLUMN "group_capacity"."gmt_create" IS '创建时间';
COMMENT ON COLUMN "group_capacity"."gmt_modified" IS '修改时间';
COMMENT ON TABLE "group_capacity" IS '集群、各Group容量信息表';-- ----------------------------
-- Records of group_capacity
-- ----------------------------
BEGIN;
COMMIT;-- ----------------------------
-- Table structure for his_config_info
-- ----------------------------
DROP TABLE IF EXISTS "his_config_info";
CREATE TABLE "his_config_info" ("id" int8 NOT NULL,"nid" bigserial NOT NULL,"data_id" varchar(255)  NOT NULL,"group_id" varchar(128)  NOT NULL,"app_name" varchar(128) ,"content" text  NOT NULL,"md5" varchar(32) ,"gmt_create" timestamp(6) NOT NULL  DEFAULT '2010-05-05 00:00:00',"gmt_modified" timestamp(6) NOT NULL,"src_user" text ,"src_ip" varchar(20) ,"op_type" char(10) ,"tenant_id" varchar(128) ,"encrypted_data_key" text  NOT NULL
)
;
COMMENT ON COLUMN "his_config_info"."app_name" IS 'app_name';
COMMENT ON COLUMN "his_config_info"."tenant_id" IS '租户字段';
COMMENT ON COLUMN "his_config_info"."encrypted_data_key" IS '秘钥';
COMMENT ON TABLE "his_config_info" IS '多租户改造';-- ----------------------------
-- Table structure for permissions
-- ----------------------------
DROP TABLE IF EXISTS "permissions";
CREATE TABLE "permissions" ("role" varchar(50)  NOT NULL,"resource" varchar(512)  NOT NULL,"action" varchar(8)  NOT NULL
)
;-- ----------------------------
-- Records of permissions
-- ----------------------------
BEGIN;
COMMIT;-- ----------------------------
-- Table structure for roles
-- ----------------------------
DROP TABLE IF EXISTS "roles";
CREATE TABLE "roles" ("username" varchar(50)  NOT NULL,"role" varchar(50)  NOT NULL
)
;-- ----------------------------
-- Records of roles
-- ----------------------------
BEGIN;
INSERT INTO "roles" VALUES ('nacos', 'ROLE_ADMIN');
COMMIT;-- ----------------------------
-- Table structure for tenant_capacity
-- ----------------------------
DROP TABLE IF EXISTS "tenant_capacity";
CREATE TABLE "tenant_capacity" ("id" bigserial NOT NULL,"tenant_id" varchar(128)  NOT NULL,"quota" int4 NOT NULL,"usage" int4 NOT NULL,"max_size" int4 NOT NULL,"max_aggr_count" int4 NOT NULL,"max_aggr_size" int4 NOT NULL,"max_history_count" int4 NOT NULL,"gmt_create" timestamp(6) NOT NULL,"gmt_modified" timestamp(6) NOT NULL
)
;
COMMENT ON COLUMN "tenant_capacity"."id" IS '主键ID';
COMMENT ON COLUMN "tenant_capacity"."tenant_id" IS 'Tenant ID';
COMMENT ON COLUMN "tenant_capacity"."quota" IS '配额,0表示使用默认值';
COMMENT ON COLUMN "tenant_capacity"."usage" IS '使用量';
COMMENT ON COLUMN "tenant_capacity"."max_size" IS '单个配置大小上限,单位为字节,0表示使用默认值';
COMMENT ON COLUMN "tenant_capacity"."max_aggr_count" IS '聚合子配置最大个数';
COMMENT ON COLUMN "tenant_capacity"."max_aggr_size" IS '单个聚合数据的子配置大小上限,单位为字节,0表示使用默认值';
COMMENT ON COLUMN "tenant_capacity"."max_history_count" IS '最大变更历史数量';
COMMENT ON COLUMN "tenant_capacity"."gmt_create" IS '创建时间';
COMMENT ON COLUMN "tenant_capacity"."gmt_modified" IS '修改时间';
COMMENT ON TABLE "tenant_capacity" IS '租户容量信息表';-- ----------------------------
-- Records of tenant_capacity
-- ----------------------------
BEGIN;
COMMIT;-- ----------------------------
-- Table structure for tenant_info
-- ----------------------------
DROP TABLE IF EXISTS "tenant_info";
CREATE TABLE "tenant_info" ("id" bigserial NOT NULL,"kp" varchar(128)  NOT NULL,"tenant_id" varchar(128) ,"tenant_name" varchar(128) ,"tenant_desc" varchar(256) ,"create_source" varchar(32) ,"gmt_create" int8 NOT NULL,"gmt_modified" int8 NOT NULL
)
;
COMMENT ON COLUMN "tenant_info"."id" IS 'id';
COMMENT ON COLUMN "tenant_info"."kp" IS 'kp';
COMMENT ON COLUMN "tenant_info"."tenant_id" IS 'tenant_id';
COMMENT ON COLUMN "tenant_info"."tenant_name" IS 'tenant_name';
COMMENT ON COLUMN "tenant_info"."tenant_desc" IS 'tenant_desc';
COMMENT ON COLUMN "tenant_info"."create_source" IS 'create_source';
COMMENT ON COLUMN "tenant_info"."gmt_create" IS '创建时间';
COMMENT ON COLUMN "tenant_info"."gmt_modified" IS '修改时间';
COMMENT ON TABLE "tenant_info" IS 'tenant_info';-- ----------------------------
-- Records of tenant_info
-- ----------------------------
BEGIN;
COMMIT;-- ----------------------------
-- Table structure for users
-- ----------------------------
DROP TABLE IF EXISTS "users";
CREATE TABLE "users" ("username" varchar(50)  NOT NULL,"password" varchar(500)  NOT NULL,"enabled" boolean NOT NULL
)
;-- ----------------------------
-- Records of users
-- ----------------------------
BEGIN;
INSERT INTO "users" VALUES ('nacos', '$2a$10$EuWPZHzz32dJN7jexM34MOeYirDdFAZm2kuWj7VEOJhhZkDrxfvUu', TRUE);
COMMIT;-- ----------------------------
-- Indexes structure for table config_info
-- ----------------------------
CREATE UNIQUE INDEX "uk_configinfo_datagrouptenant" ON "config_info" ("data_id","group_id","tenant_id");-- ----------------------------
-- Primary Key structure for table config_info
-- ----------------------------
ALTER TABLE "config_info" ADD CONSTRAINT "config_info_pkey" PRIMARY KEY ("id");-- ----------------------------
-- Indexes structure for table config_info_aggr
-- ----------------------------
CREATE UNIQUE INDEX "uk_configinfoaggr_datagrouptenantdatum" ON "config_info_aggr" USING btree ("data_id","group_id","tenant_id","datum_id");-- ----------------------------
-- Primary Key structure for table config_info_aggr
-- ----------------------------
ALTER TABLE "config_info_aggr" ADD CONSTRAINT "config_info_aggr_pkey" PRIMARY KEY ("id");-- ----------------------------
-- Indexes structure for table config_info_beta
-- ----------------------------
CREATE UNIQUE INDEX "uk_configinfobeta_datagrouptenant" ON "config_info_beta" USING btree ("data_id","group_id","tenant_id");-- ----------------------------
-- Primary Key structure for table config_info_beta
-- ----------------------------
ALTER TABLE "config_info_beta" ADD CONSTRAINT "config_info_beta_pkey" PRIMARY KEY ("id");-- ----------------------------
-- Indexes structure for table config_info_tag
-- ----------------------------
CREATE UNIQUE INDEX "uk_configinfotag_datagrouptenanttag" ON "config_info_tag" USING btree ("data_id","group_id","tenant_id","tag_id");-- ----------------------------
-- Primary Key structure for table config_info_tag
-- ----------------------------
ALTER TABLE "config_info_tag" ADD CONSTRAINT "config_info_tag_pkey" PRIMARY KEY ("id");-- ----------------------------
-- Indexes structure for table config_tags_relation
-- ----------------------------
CREATE INDEX "idx_tenant_id" ON "config_tags_relation" USING btree ("tenant_id"
);
CREATE UNIQUE INDEX "uk_configtagrelation_configidtag" ON "config_tags_relation" USING btree ("id","tag_name","tag_type"
);-- ----------------------------
-- Primary Key structure for table config_tags_relation
-- ----------------------------
ALTER TABLE "config_tags_relation" ADD CONSTRAINT "config_tags_relation_pkey" PRIMARY KEY ("nid");-- ----------------------------
-- Indexes structure for table group_capacity
-- ----------------------------
CREATE UNIQUE INDEX "uk_group_id" ON "group_capacity" USING btree ("group_id"
);-- ----------------------------
-- Primary Key structure for table group_capacity
-- ----------------------------
ALTER TABLE "group_capacity" ADD CONSTRAINT "group_capacity_pkey" PRIMARY KEY ("id");-- ----------------------------
-- Indexes structure for table his_config_info
-- ----------------------------
CREATE INDEX "idx_did" ON "his_config_info" USING btree ("data_id"
);
CREATE INDEX "idx_gmt_create" ON "his_config_info" USING btree ("gmt_create"
);
CREATE INDEX "idx_gmt_modified" ON "his_config_info" USING btree ("gmt_modified"
);-- ----------------------------
-- Primary Key structure for table his_config_info
-- ----------------------------
ALTER TABLE "his_config_info" ADD CONSTRAINT "his_config_info_pkey" PRIMARY KEY ("nid");-- ----------------------------
-- Indexes structure for table permissions
-- ----------------------------
CREATE UNIQUE INDEX "uk_role_permission" ON "permissions" USING btree ("role","resource","action"
);-- ----------------------------
-- Indexes structure for table roles
-- ----------------------------
CREATE UNIQUE INDEX "uk_username_role" ON "roles" USING btree ("username","role"
);-- ----------------------------
-- Indexes structure for table tenant_capacity
-- ----------------------------
CREATE UNIQUE INDEX "uk_tenant_id" ON "tenant_capacity" USING btree ("tenant_id"
);-- ----------------------------
-- Primary Key structure for table tenant_capacity
-- ----------------------------
ALTER TABLE "tenant_capacity" ADD CONSTRAINT "tenant_capacity_pkey" PRIMARY KEY ("id");-- ----------------------------
-- Indexes structure for table tenant_info
-- ----------------------------
CREATE UNIQUE INDEX "uk_tenant_info_kptenantid" ON "tenant_info" USING btree ("kp","tenant_id"
);
配置启动脚本
groupadd nacos
useradd -g nacos -s /usr/sbin/nologin nacos
chown -R nacos:nacos nacos
chmod +x nacos/bin/*.sh

编辑 nacos.service

vim /etc/systemd/system/nacos.service

写入下面内容:

[Unit]
Description=nacos
After=network.target[Service]
Type=forking
User=nacos
Group=nacosEnvironment='JAVA_HOME=/opt/jdk'ExecStart=sh /opt/nacos/bin/startup.sh -m standalone
ExecStop=sh /opt/nacos/bin/shutdown.sh[Install]
WantedBy=multi-user.target

设置开机启动 nacos

systemctl enable nacos

启动 nacos

systemctl start nacos

查看启动状态

systemctl status nacos

踩坑:

网上提供的修改application.properties文件的方式如下,测试后发现不能用,db.pool.config.driverClassName不识别。且注释db.pool.config.driverClassName,启动时数据库连接异常,启动不了。替换为上文中的方式配置后解决。

### Deprecated configuration property, it is recommended to use `spring.sql.init.platform` replaced.
spring.sql.init.platform=postgresql### Count of DB:
db.num=1### Connect URL of DB:
db.url.0=jdbc:postgresql://localhost:5432/nacos?tcpKeepAlive=true&reWriteBatchedInserts=true&ApplicationName=nacos-server
db.user.0=postgres
db.password.0=123456### Connection pool configuration: hikariCP
db.pool.config.driverClassName=org.postgresql.Driver

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.rhkb.cn/news/303051.html

如若内容造成侵权/违法违规/事实不符,请联系长河编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

stable diffusion的从安装到使用

stable-diffusion,一个免费开源的文生图软件,文章主要讲怎么从源码开始安装,以及使用的方式 git地址:https://github.com/AUTOMATIC1111/stable-diffusion-webui 本人电脑环境win10,软件pycharm,需要提前…

酷开系统表现强劲,酷开科技视频化运营为大内容布局提供更好交互

最近几年,电视屏幕尺寸是越做越大,越做越薄,在追求电视“颜值”的同时,电视内置系统也成了人们选购电视的很重要的原因。酷开科技深耕电视大屏领域多年,酷开系统表现强劲,好评如潮。 有人一度认为多媒体的…

spring Cache的基本使用

一、spring Cache基本介绍(其实是通过代理对象来进行操作的) Spring Cache 是 Spring 框架提供的一个缓存抽象,它能够轻松地集成到 Spring 应用程序中,为方法调用的结果提供缓存支持,从而提高应用程序的性能和响应速度…

关于Ansible模块 ④

转载说明:如果您喜欢这篇文章并打算转载它,请私信作者取得授权。感谢您喜爱本文,请文明转载,谢谢。 继《关于Ansible的模块 ①》、《关于Ansible的模块 ②》与《关于Ansible的模块 ③》之后,继续学习ansible常用模块之…

REST API实战演练之JavaScript使用Rest API

咱们前面讲了一下如何创建REST API 假期别闲着:REST API实战演练之创建Rest API-CSDN博客 又讲了java客户端如何使用REST API 假期别闲着:REST API实战演练之客户端使用Rest API-CSDN博客 接下来咱们看看JavaScript怎么使用REST API。 一、新建一个…

软件杯 深度学习人体跌倒检测 -yolo 机器视觉 opencv python

0 前言 🔥 优质竞赛项目系列,今天要分享的是 🚩 **基于深度学习的人体跌倒检测算法研究与实现 ** 该项目较为新颖,适合作为竞赛课题方向,学长非常推荐! 🥇学长这里给一个题目综合评分(每项满…

(源码+部署+讲解)基于Spring Boot + Vue的车位租赁系统设计与实现

前言 💗博主介绍:✌专注于Java、小程序技术领域和毕业项目实战✌💗 👇🏻 精彩专栏 推荐订阅👇🏻 2024年Java精品实战案例《100套》 🍅文末获取源码联系🍅 🌟…

Angular 使用DomSanitizer

跨站脚本Cross-site scripting 简称XSS,是代码注入的一种,是一种网站应用程序的安全漏洞攻击。它允许恶意用户将代码注入到网页上,其他用户在使用网页时就会收到影响,这类攻击通常包含了HTML和用户端脚本语言(JS&…

PaddleVideo:PP-TSM 视频分类

本文记录:使用Paddle框架训练TSM(Temporal Shift Module) 前提条件:已经安装Paddle和PadleVideo,具体可参考前一篇文章。 1-数据准备: 以UCF101为例:内含13320 个短视频,视频类别&…

ASP.NET Core 标识(Identity)框架系列(一):如何使用 ASP.NET Core 标识(Identity)框架创建用户和角色?

前言 ASP.NET Core 内置的标识(identity)框架,采用的是 RBAC(role-based access control,基于角色的访问控制)策略,是一个用于管理用户身份验证、授权和安全性的框架。 它提供了一套工具和库&…

AI实时换天解决方案:重塑汽车与旅行拍摄新视界

在汽车拍摄与旅行摄影领域,天空作为画面中的重要元素,往往决定着整体视觉效果的成败。美摄科技作为业界领先的AI视觉技术提供商,近日推出了全新的AI实时换天解决方案,为用户带来了前所未有的创意空间与效率提升。 传统的换天技术…

hive-3.1.2分布式搭建与hive的三种交互方式

hive-3.1.2分布式搭建: 一、上传解压配置环境变量 在官网或者镜像站下载驱动包 华为云镜像站地址: hive:Index of apache-local/hive/hive-3.1.2 mysql驱动包:Index of mysql-local/Downloads/Connector-J # 1、解压 tar -zx…

03 Php学习:echo 、 print 、EOF

echo 和 print 在 PHP 中有两个基本的输出方式: echo 和 print。 echo 和 print 区别: echo - 可以输出一个或多个字符串print - 只允许输出一个字符串,返回值总为 1 注意:echo 输出的速度比 print 快, echo 没有返回值&…

【已完成】把Win10右键改回Win7的模样

win11右键设置成原来模样的方法如下: 1、winr打开运行窗口,输入regedit,按下回车键确认即可打开注册表。 2、在路径中输入:HKEY_CURRENT_USER\SOFTWARE\CLASSES\CLSID,或者是依次定位点开到CLSID。 3、右键点击CLSID&…

Nginx反向代理与Tomcat实现ssm项目前后端分离部署

Nginx nginx是一款http和支持反向代理的web服务器,以其优越的性能被广泛使用。以下是百度百科的介绍。 Nginx (engine x) 是一个高性能的HTTP和反向代理web服务器,同时也提供了IMAP/POP3/SMTP服务。Nginx是由伊戈尔赛索耶夫为俄罗斯访问量第二的Rambler.…

基础入门-操作系统名词文件下载反弹shell防火墙绕过

目录 基础入门-操作系统&名词&文件下载&反弹shell&防火墙绕过 知识点 参考: 演示案例 基础案例 1:操作系统-用途&命令&权限&用户&防火墙 实用案例 1:文件上传下载-->解决无图形化&解决数据传输 实用案例 …

Redis中的集群(二)

节点 集群数据结构 redisClient结构和clusterLink结构的相同和不同之处 redisClient结构和clusterLink结构都有自己的套接字描述符和输入、输出缓冲区,这两个结构的区别在于,redisClient结构中的套接字和缓冲区是用于连接客户端的,而clust…

Visual Studio Code 终端为管理员权限

第一部 1、 Visual Studio Code 快捷方式启动选项加上管理员启动 第二步 管理员方式运行 powershell Windows 10的任务栏自带了搜索。或者开始菜单选搜索只需在搜索框中输入powershell。 在出来的搜索结果中右击Windows PowerShell,然后选择以管理员方式运行。 执…

网络安全:重要性与应对措施

1. 网络安全的重要性 随着互联网的普及和信息技术的快速发展,网络安全问题已经变得日益突出。网络攻击者可以通过各种手段窃取个人信息、破坏系统、传播病毒等,给个人和社会带来巨大的损失。因此,网络安全已经成为信息化时代的重要问题之一。…

numpy,matplotilib学习(菜鸟教程)

所有内容均来自于: NumPy 教程 | 菜鸟教程 Matplotlib 教程 | 菜鸟教程 numpy模块 numpy.nditer NumPy 迭代器对象 numpy.nditer 提供了一种灵活访问一个或者多个数组元素的方式。 for x in np.nditer(a, orderF):Fortran order,即是列序优先&#x…