Skip to content

Commit c8937c1

Browse files
author
Chu Fan
committed
docs: 新增文档
1 parent a9261e3 commit c8937c1

5 files changed

Lines changed: 329 additions & 4 deletions

File tree

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,12 @@
11

2-
# SSL证书配置
2+
# SSL证书配置
3+
4+
SSL 证书是一个数字证书,用于认证网站的身份并启用加密连接。
5+
SSL 代表安全套接字层,是一个**安全协议**,可在Web 服务器和Web 浏览器之间创建加密链接。
6+
7+
公司和组织需要在其网站上添加SSL 证书,以保护在线交易并保持客户信息的私密性和安全性
8+
9+
遵守 SSL协议,由受信任的数字证书颁发机构CA,在验证服务器身份后颁发,具有服务器身份验证和数据传输加密功能。
10+
11+
12+
### 申请SSL证书
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11

2-
# ES6
2+
# ES6
3+
Lines changed: 300 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,300 @@
1+
2+
# 包管理工具
3+
4+
5+
### yum
6+
7+
使用yum安装和卸载软件,软件包都是rpm格式的
8+
9+
#### 安装
10+
11+
```bash
12+
## -y:不询问,默认安装
13+
yum install XXX -y
14+
15+
## 升级
16+
yum install/update xxx
17+
```
18+
19+
#### 查询
20+
21+
22+
```bash
23+
## 使用YUM查找软件包
24+
yum search
25+
26+
## 列出所有可安装的软件包
27+
yum list
28+
29+
## 列出所有可更新的软件清单
30+
yum check-update
31+
32+
## 列出所有已安装的软件包
33+
yumlist installed
34+
35+
## 列出所有已安装但不在Yum Repository內的软件包
36+
yumlist extras
37+
38+
## 获取所有软件包信息
39+
yum info
40+
41+
## 列出软件包提供哪些文件
42+
yum provides~
43+
```
44+
45+
#### 清除
46+
47+
```bash
48+
## 卸载
49+
yum erase 安装包名称
50+
yum remove xxx
51+
52+
## 清除缓存目录下的软件包
53+
yum clean packages
54+
55+
## 清除缓存目录下的 headers
56+
yum clean headers
57+
58+
## 清除缓存目录下旧的 headers
59+
yum clean oldheaders
60+
```
61+
62+
63+
#### 更换软件源
64+
65+
```bash
66+
## 1. 安装wget
67+
yum -y install wget
68+
69+
## 2.修改原yum源文件名称,备份
70+
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
71+
72+
## 3.下载阿里yum源或163都可以
73+
# 163的yum源
74+
wget http://mirrors.163.com/.help/CentOS7-Base-163.repo
75+
# 阿里yum源
76+
wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
77+
78+
## 4.清楚缓存
79+
yum makecache
80+
```
81+
82+
83+
### apt-get
84+
85+
apt-get 命令适用于 deb 包管理式的 Linux 操作系统(Debian、Ubuntu等),主要用于自动从互联网软件仓库中搜索、下载、安装、升级、卸载软件或操作系统
86+
87+
#### 安装
88+
89+
```bash
90+
## 普通安装
91+
apt-get install xxxx
92+
#安装指定包的指定版本
93+
apt-get install xxx=version
94+
#重新安装
95+
apt-get --reinstall install xxx
96+
97+
# 安装源码包所需要的编译环境
98+
apt-get build-dep xxx
99+
#修复依赖关系
100+
apt-get -f install
101+
#下载软件包的源码
102+
apt-get source xxx
103+
```
104+
105+
106+
#### 卸载
107+
108+
```bash
109+
#删除软件包, 保留配置文件
110+
apt-get remove xxx
111+
#删除软件包, 同时删除配置文件
112+
apt-get --purge remove xxx
113+
删除软件包, 同时删除配置文件
114+
apt-get purge xxx
115+
116+
删除软件包, 同时删除为满足依赖,而自动安装且不再使用的软件包
117+
apt-get autoremove xxx
118+
#删除软件包, 删除配置文件, 删除不再使用的依赖包
119+
apt-get --purge autoremove xxx
120+
#清除 已下载的软件包 和 旧软件包
121+
apt-get clean && apt-get autoclean
122+
123+
```
124+
125+
126+
#### 更新
127+
128+
```bash
129+
# 更新安装源(Source)
130+
apt-get update
131+
#更新已安装的软件包
132+
apt-get upgrade
133+
#更新已安装的软件包(识别并处理依赖关系的改变)
134+
apt-get dist-upgrade
135+
```
136+
137+
138+
#### 帮助命令
139+
140+
```bash
141+
apt-get --help
142+
```
143+
144+
145+
#### 配置软件源
146+
147+
```bash
148+
149+
## 1. 配置备份
150+
cp /etc/apt/sources.list /etc/apt/sources.list.bak
151+
152+
## 2.新建配置
153+
sudo vim /etc/apt/sources.list
154+
155+
## 3. 配置列表
156+
# 阿里镜像
157+
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
158+
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
159+
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
160+
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
161+
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
162+
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
163+
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
164+
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
165+
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
166+
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
167+
168+
# 中科大
169+
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates main restricted
170+
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates main restricted
171+
deb http://mirrors.ustc.edu.cn/ubuntu/ precise universe
172+
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise universe
173+
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates universe
174+
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates universe
175+
deb http://mirrors.ustc.edu.cn/ubuntu/ precise multiverse
176+
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise multiverse
177+
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-updates multiverse
178+
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-updates multiverse
179+
deb http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
180+
deb-src http://mirrors.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse
181+
182+
# 搜狐源
183+
deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
184+
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted
185+
deb http://mirrors.sohu.com/ubuntu/ precise universe
186+
deb-src http://mirrors.sohu.com/ubuntu/ precise universe
187+
deb http://mirrors.sohu.com/ubuntu/ precise-updates universe
188+
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates universe
189+
deb http://mirrors.sohu.com/ubuntu/ precise multiverse
190+
deb-src http://mirrors.sohu.com/ubuntu/ precise multiverse
191+
deb http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
192+
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates multiverse
193+
deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
194+
deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse
195+
196+
# 网易源
197+
deb http://mirrors.163.com/ubuntu/ precise-updates main restricted
198+
deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted
199+
deb http://mirrors.163.com/ubuntu/ precise universe
200+
deb-src http://mirrors.163.com/ubuntu/ precise universe
201+
deb http://mirrors.163.com/ubuntu/ precise-updates universe
202+
deb-src http://mirrors.163.com/ubuntu/ precise-updates universe
203+
deb http://mirrors.163.com/ubuntu/ precise multiverse
204+
deb-src http://mirrors.163.com/ubuntu/ precise multiverse
205+
deb http://mirrors.163.com/ubuntu/ precise-updates multiverse
206+
deb-src http://mirrors.163.com/ubuntu/ precise-updates multiverse
207+
deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
208+
deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
209+
210+
#ubuntu的源, 最好也加上,避免某些库下载不到
211+
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
212+
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
213+
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
214+
deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
215+
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
216+
217+
218+
### 4. 更新
219+
apt-get update
220+
apt update
221+
sudo apt-get update
222+
sudo apt-get upgrade
223+
224+
```
225+
226+
227+
### apk
228+
229+
Alpine Linux 下的包管理工具
230+
231+
优势:
232+
233+
- Alpine Linux的Docker镜像特点是轻巧(大小只有5M)且有完整的包管理工具(APK)。
234+
- Docker官方镜像可能会用Alpine Linux替换Ubuntu。
235+
236+
劣势:
237+
- Alpine Linux使用了musl,可能和其他Linux发行版使用的glibc实现会有些不同。
238+
- musl实现的DNS服务不会使用resolv.conf文件中的search和domain两个配置,通过DNS来进行服务发现时需要注意
239+
240+
241+
Alpine使用apk进行包管理,通过apk --help命令查看完整的包管理命令
242+
243+
244+
#### 基础使用
245+
246+
```bash
247+
apk install xxx
248+
# 搜索软件包 支持正则
249+
apk search xxx
250+
# 查看包的详细信息
251+
apk info xxx
252+
#显示完整的软件包信息
253+
apk info -a zlib
254+
#显示指定文件属于的包
255+
apk info --who-owns /sbin/lbu
256+
257+
# list local package
258+
apk show
259+
# 卸载并删除 包
260+
apk del openssh openntp vim
261+
262+
$ apk info #列出所有已安装的软件包
263+
264+
```
265+
266+
#### 升级
267+
268+
upgrade命令升级系统已安装的所以软件包(一般包括内核),当然也可指定仅升级部分软件包(通过-u或–upgrade选择指定)。
269+
270+
```bash
271+
# 更新最新本地镜像源
272+
apk update
273+
# 升级软件
274+
apk upgrade
275+
# 指定升级部分软件包
276+
apk add --upgrade busybox
277+
## 指定仓库
278+
apk add docker --update-cache --repository http://mirrors.ustc.edu.cn/alpine/v3.4/main/ --allow-untrusted
279+
```
280+
281+
#### 配置软件源
282+
283+
- <https://mirrors.tuna.tsinghua.edu.cn/help/alpine/>
284+
285+
```bash
286+
vi /etc/apk/repositories
287+
288+
# /media/cdrom/apks
289+
http://mirrors.ustc.edu.cn/alpine/v3.5/main
290+
http://mirrors.ustc.edu.cn/alpine/v3.5/community
291+
292+
## 替换阿里源
293+
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
294+
295+
## 替换中科大源
296+
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
297+
```
298+
299+
300+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
3+
# RxJS
4+
5+
- <https://rxjs.dev/guide/overview>
6+
7+
RxJS 是一个通过使用可观察序列来编写异步和基于事件的程序的库,**将 RxJS 视为事件的 Lodash**
8+
9+
ReactiveX 将观察者模式与迭代器模式以及函数式编程与集合相结合,以满足对管理事件序列的理想方式的需求
10+

docs/manuscript/server-end/server-end.sidebar.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@ export const serverEndSidebar = [
2323
text: 'lodash',
2424
link: 'node-learn/lodash.md'
2525
},
26+
{
27+
text: 'rxjs',
28+
link: 'node-learn/rxjs.md'
29+
},
2630
{
2731
text: 'axios',
2832
link: 'node-learn/axios.md'
@@ -31,7 +35,7 @@ export const serverEndSidebar = [
3135
},
3236
{
3337
text: 'ES6',
34-
collapsible: true,
38+
// collapsible: true,
3539
link: 'es6'
3640
},
3741
{
@@ -170,7 +174,7 @@ export const serverEndSidebar = [
170174
},
171175
{
172176
text: '包管理器',
173-
link: 'linux/package.md'
177+
link: 'linux/package-manage.md'
174178
},
175179
{
176180
text: 'vim',

0 commit comments

Comments
 (0)