Skip to content

Commit

Permalink
go
Browse files Browse the repository at this point in the history
  • Loading branch information
YiRanCN committed Jul 3, 2024
1 parent 942f458 commit fc44dad
Show file tree
Hide file tree
Showing 5 changed files with 108 additions and 39 deletions.
108 changes: 69 additions & 39 deletions docs/study/db/SQL/PostgreSQL.md
Original file line number Diff line number Diff line change
@@ -1,39 +1,69 @@
### 简介

**PostgreSQL** (也叫 Postgres)是一个自由的**对象-关系数据库**服务器(数据库管理系统),它在灵活的 BSD-风格许可证下发行。它提供了相对其他开放源代码数据库系统(比如 MySQL 和 Firebird),和对专有系统比如 Oracle、Sybase、IBM 的 DB2 和 Microsoft SQL Server的一种选择。

PostgreSQL 的 Slogan(口号) 是 "世界上最先进的开源关系型数据库"。

### PostGIS

PostGIS在对象关系型数据库PostgreSQL上增加了存储管理空间数据的能力,相当于Oracle的spatial部分。PostGIS最大的特点是符合并且实现了OpenGIS的一些规范,是最著名的开源GIS数据库。

PostGIS通过向PostgreSQL添加对空间数据类型、空间索引和空间函数的支持,将PostgreSQL数据库管理系统转换为空间数据库。

因为PostGIS是建立在PostgreSQL之上的,所以PostGIS自动继承了重要的"企业级"特性以及开放源代码的标准。

可以说PostGIS仅仅只是PostgreSQL的一个插件,但是它将PostgreSQL变成了一个强大的空间数据库!

问题描述:

对车辆的位置信息进行存储,查询车辆的行驶轨迹和里程。

### 安装postgres

```shell
#
docker pull postgres:11.19-bullseye
#
docker run \
--privileged=true \
--restart=always \
--name postgres \
-e POSTGRES_PASSWORD=Aa0123 \
-p 5432:5432 \
-v /mnt/docker/postgresql/data:/var/lib/postgresql/data \
-d postgres:11.19-bullseye
# 发现使用DBeaver连接不上,需要修改/mnt/docker/postgresql/data/pg_hba.conf
# 增加一行host all all 192.168.41.69/32 trust
# 192.168.41.69是我自己的ip

```
### 简介

**PostgreSQL** (也叫 Postgres)是一个自由的**对象-关系数据库**服务器(数据库管理系统),它在灵活的 BSD-风格许可证下发行。它提供了相对其他开放源代码数据库系统(比如 MySQL 和 Firebird),和对专有系统比如 Oracle、Sybase、IBM 的 DB2 和 Microsoft SQL Server的一种选择。

PostgreSQL 的 Slogan(口号) 是 "世界上最先进的开源关系型数据库"。

### PostGIS

PostGIS在对象关系型数据库PostgreSQL上增加了存储管理空间数据的能力,相当于Oracle的spatial部分。PostGIS最大的特点是符合并且实现了OpenGIS的一些规范,是最著名的开源GIS数据库。

PostGIS通过向PostgreSQL添加对空间数据类型、空间索引和空间函数的支持,将PostgreSQL数据库管理系统转换为空间数据库。

因为PostGIS是建立在PostgreSQL之上的,所以PostGIS自动继承了重要的"企业级"特性以及开放源代码的标准。

可以说PostGIS仅仅只是PostgreSQL的一个插件,但是它将PostgreSQL变成了一个强大的空间数据库!

问题描述:

对车辆的位置信息进行存储,查询车辆的行驶轨迹和里程。

### 安装postgres

```shell
#
docker pull postgres:11.19-bullseye
#
docker run \
--privileged=true \
--restart=always \
--name postgres \
-e POSTGRES_PASSWORD=Aa0123 \
-p 5432:5432 \
-v /mnt/docker/postgresql/data:/var/lib/postgresql/data \
-d postgres:11.19-bullseye
# 发现使用DBeaver连接不上,需要修改/mnt/docker/postgresql/data/pg_hba.conf
# 增加一行host all all 192.168.41.69/32 trust
# 192.168.41.69是我自己的ip

```

```shell
# 在ubuntu上安装
sudo apt-get install postgresql -y
sudo systemctl status postgresql
#
passwd postgres
#
su - postgres
#
pgsql
#
\password postgres
# 查看所有数据库
\l
# 创建数据库
create database xxx with owner=postgres encoding='UTF-8';
```

### mysql迁移到postgres

```shell
# 在ubuntu上安装
sudo apt-get install pgloader -y
# 注意密码的使用,如果携带特殊字符@,可以用两个@标识
pgloader mysql://root:[email protected]:3306/ccsp_common pgsql://postgres:[email protected]:5432/class
```

参考文档 https://pgloader.readthedocs.io/en/latest/ref/mysql.html#using-default-settings

7 changes: 7 additions & 0 deletions docs/study/encryption/HSM.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# HSM

HSM 加密机原理

硬件安全模块(HSM)是一种物理设备,设计用于安全地管理、处理和存储加密密钥和数字证书。HSM广泛应用于需要高安全性的场景,如金融服务、数据保护、企业安全以及政府和军事领域。HSM提供了一种比软件存储密钥更安全的方式,因为密钥材料从不以未加密形式离开模块。

VSM 虚拟密码机
9 changes: 9 additions & 0 deletions docs/study/encryption/等保_密评.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 等保和密评

“等保”即网络安全等级保护,旨在通过不同安全等级的管理和技术措施,确保信息系统的安全稳定运行。我国于2017年颁布的《网络安全法》中第二十一条规定“国家实行网络安全等级保护制度”。法律要求网络运营者需按照网络安全等级保护制度要求,履行制定安全管理制度、采取防范技术措施、监测记录网络状态、保护数据安全等多项义务,确保网络安全稳定。

“密评”即商用密码应用安全性评估,是对网络信息系统中所使用的商用密码产品和应用进行的安全性评估。《密码法》于2020年开始实施,其中第二十七条要求关键信息基础设施的运营者需依法使用商用密码进行保护,并自行或委托专业机构开展安全性评估,确保与其他安全检测评估制度相衔接,避免重复工作。

### 参考

- [一文get等保测评与密评的差异](https://mp.weixin.qq.com/s?__biz=MzU0Mzk0NDQyOA==&mid=2247515893&idx=1&sn=088c3013acddde2d3ab6e351bb92e1ed&chksm=fb014576cc76cc60c06d893c53fdb30b089aff0f9dd2c60ccca06333596131c024cbd862d0be&scene=27)
6 changes: 6 additions & 0 deletions docs/study/encryption/行业分析.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# 行业分析

### 公司

- [上海安当](https://www.andang.cn/)
- [北京三未信安](https://www.sansec.com.cn/) 研发在济南
17 changes: 17 additions & 0 deletions docs/study/program/GIT/GitHubDesktop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# GitHub Desktop

我一般是使用这个工具,但是有一次更新之后,报错如下

```shell
ERROR: Couldn't connect to 127.0.0.1:49196 - Please make sure you don't have an antivirus or firewall blocking this connection. (10013): fatal: could not read Username for 'http://10.0.8.45': terminal prompts disabled
```

解决方式:

找到.git文件夹,下面有个config文件,找到如下,增加用户名和密码

```shell
[remote "origin"]
url = http://{用户名}:{增加}@10.0.8.45/ccsp/vuemanagementplatform.git
fetch = +refs/heads/*:refs/remotes/origin/*
```

0 comments on commit fc44dad

Please sign in to comment.