Skip to content

Commit

Permalink
fix: fix build error
Browse files Browse the repository at this point in the history
  • Loading branch information
TigerZH committed Mar 23, 2022
1 parent e7de976 commit 711a3d0
Show file tree
Hide file tree
Showing 5 changed files with 51 additions and 48 deletions.
6 changes: 3 additions & 3 deletions .vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,13 @@ export const sidebar = {
{
text: '📚 使用指南',
items: [
{ text: 'liunx 指南', link: '/note/Liunx常用命令' },
{ text: 'Https 配置指南', link: '/note/cert' },
{ text: 'SSH 配置指南', link: '/note/ssh' },
{ text: 'git 指南', link: '/note/git' },
{ text: 'liunx 指南', link: '/note/liunx' },
{ text: 'Nginx 指南', link: '/note/nginx' },
{ text: 'Docker 指南', link: '/note/Docker指南' },
{ text: 'uWSGI 指南', link: '/note/uWSGI指南' },
{ text: 'Https配置指南', link: '/note/cert' },
{ text: 'SSH 配置指南', link: '/note/ssh' },
{ text: 'MacOS 自带VPN链接公司网络', link: '/note/vpn' },
{ text: 'MacOS 邮箱教程', link: '/note/mac-bind-email' },
{ text: 'MacOS 定时任务指南', link: '/note/mac-launchctl-task' },
Expand Down
21 changes: 11 additions & 10 deletions src/note/Docker指南.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

学习本教程前首先我们要安装Docker。菜鸟教程上总结了Docker在各个平台和系统上的安装,大家可以参考。这里总结了下Docker在阿里云Ubuntu系统上的安装过程。步骤看似很多且复杂,但大家只需要一步一步copy和paste命令就行了,整个安装过程很流畅。

```bash
```shell
# 以Ubuntu为例
# Step 1: 移除之前docker版本并更新更新 apt 包索引
sudo apt-get remove docker docker-engine docker.io
Expand Down Expand Up @@ -41,7 +41,7 @@ sudo systemctl restart docker

## Docker镜像操作

```bash
```shell
# 搜索镜像:docker search + 镜像名字
$ docker search nginx

Expand Down Expand Up @@ -81,7 +81,7 @@ $ docker commit

## Docker容器操作

```bash
```shell
# 创建容器: docker create + 选项(-i, -t, -d, -p, -v, -e) + 镜像
$ docker create --name mynginx_1 -it -p 8080:80 mynginx:1.0

Expand Down Expand Up @@ -195,7 +195,7 @@ Docker 的网络驱动程序默认情况下有四个:`bridge`、`host`、`over

### 创建一个network

```bash
```shell
# mysite1-network是局域网的名字,可以自定义。默认bridge模式。
$ docker network create mysite1-network

Expand All @@ -212,7 +212,7 @@ $ docker network inspect mysite1-network

### 将容器连接到network

```bash
```shell
# 运行新的容器,并加入到mysite1-network网络中
# --network 表示这个容器要连接到的网络
# --network-alias 表示这个容器在此网络中的名称,也可以使用--ip来指定容器的ip
Expand All @@ -230,14 +230,14 @@ $ docker network disconnet mysite1-network docker-web
```

### 删除network
```bash
```shell
# 删除mysite1-network网络
$ docker network rm mysite1-network
```

## Docker数据卷操作

```bash
```shell
# 列出所有数据卷
$ docker volume ls
# 使用过滤,列出所有未使用的数据卷
Expand All @@ -251,7 +251,7 @@ $ docker volume rm <volume_name>

安装docker-compose前必需先安装好docker。Docker-compose的下载和安装很简单,网上有很多教程,我就不再详述了。这里只记录下ubuntu系统下docker-compose的安装过程。

```bash
```shell
# Step 1: 以ubuntu为例,下载docker-compose
$ sudo curl -L https://github.com/docker/compose/releases/download/1.17.0/docker-compose-`uname -s`-`uname -m` -o /usr/local/bin/docker-compose
# Step 2: 给予docker-compose可执行权限
Expand All @@ -262,7 +262,7 @@ $ docker-compose --version

## Docker-compose.yml配置文件

```yml
```shell
# 第一部分: Building(构建镜像)
web:
# 使用当前目录下的Dockerfile
Expand Down Expand Up @@ -353,7 +353,7 @@ web:

## Docker-compose指南

```bash
```shell
# 默认使用docker-compose.yml构建镜像
$ docker-compose build
$ docker-compose build --no-cache # 不带缓存的构建
Expand Down Expand Up @@ -401,3 +401,4 @@ $ docker-compose rm web
# 查看各个服务容器内运行的进程
$ docker-compose top
```

24 changes: 12 additions & 12 deletions src/note/Liunx常用命令.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ hjkl —— 效果等同于←↓↑→,用于移动光标

## 文件和目录操作

### 切换工作目录
## 切换工作目录
```bash
cd /home 进入/home目录
cd .. 返回上一级目录
Expand All @@ -33,7 +33,7 @@ cd ~user1 进入user1的主目录
cd - 返回上次所在的目录
pwd 显示当前工作目录
```
### 查看文件及目录
## 查看文件及目录
```bash
ls 查看目录中的文件
ls -F 查看目录中的文件
Expand All @@ -48,7 +48,7 @@ dirname 显示文件或目录路径。
tree 显示文件和目录由根目录开始的树形结构
```

### 文件及目录的创建与删除
## 文件及目录的创建与删除
```bash
touch 创建空文件
echo 创建带有内容的文件
Expand All @@ -60,7 +60,7 @@ rmdir dir1 删除dir1空目录
rm -rf dir1 强制删除dir1目录及其子目录及文件,-r表示递归删除
```

### 文件与目录的移动及复制
## 文件与目录的移动及复制
```bash
mv dir1 new_dir 重命名/移动一个目录
cp file1 file2 复制一个文件
Expand All @@ -70,7 +70,7 @@ ln -s file1 lnk1 创建一个指向文件或目录的软链接
ln file1 lnk1 创建一个指向文件或目录的物理链接
```

### 文件查找与统计
## 文件查找与统计

```bash
# 在/下搜索名为file1的文件和目录
Expand Down Expand Up @@ -112,14 +112,14 @@ wc test.txt

## 用户、群组和权限

### 群组的创建与删除
## 群组的创建与删除
```bash
groupadd group_name 创建一个新用户组
groupdel group_name 删除一个用户组
groupmod -n new_group old_group 重命名一个用户组
newgrp group_name 登陆进一个新的群组以改变新创建文件的预设群组
```
### 用户的管理
## 用户的管理
```bash
useradd user1 创建一个新用户,可结合如下选项使用:
-u 指定用户的UID
Expand All @@ -146,7 +146,7 @@ visudo 编辑/etc/sudoers文件的专属命令。
sudo 以另外一个用户身份(默认root用户)执行事先在sudoers文件允许的命令。
```

### 权限的分配
## 权限的分配

主要有两个命令:`chmod`是用来设置文件夹和文件权限,`chown`是用来设置用户组。

Expand Down Expand Up @@ -182,7 +182,7 @@ chown user1:group1 file1

## 系统管理命令
系统管理命令中最重要的是服务器性能监控命令和进程管理命令,尤其是监控CPU和当前负载信息的`uptime`, 监控内存使用情况的 `free`, 监控磁盘使用情况的 `df`, 以管理进程的`top`, `ps``kill`命令。
### 基础命令
## 基础命令
```bash
who 显示在线登陆用户
whoami 显示当前操作用户
Expand All @@ -194,7 +194,7 @@ ifconfig 查看网络情况
ping 测试网络连通
```

### 性能监控
## 性能监控
```bash
chkconfig 管理Linux系统开机启动项
uptime 获取CPU运行时间和查询Linux系统负载等信息
Expand All @@ -208,7 +208,7 @@ du 查看目录大小 du -h /home带有单位显示目录信息
iostat 统计系统IO
```

### 进程管理
## 进程管理
```bash
top 动态显示当前耗费资源最多进程信息
- P: CPU 占用率大小的顺序排列进程列表
Expand All @@ -220,7 +220,7 @@ kill 杀死进程,可以先用ps 或 top命令查看进程的id,然后再用
killall 通过进程名终止进程
```

### 开机、关机与注销
## 开机、关机与注销
```bash
shutdown -h hours:minutes & 按预定时间关闭系统
shutdown -c 取消按预定时间关闭系统
Expand Down
6 changes: 3 additions & 3 deletions src/note/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ git是世界上最先进的发布式版本控制系统



**git常用命令**
## **git常用命令**

| 代码 | 注释 |
| --------------------------- | ---------------------- |
Expand All @@ -21,7 +21,7 @@ git是世界上最先进的发布式版本控制系统

![image-20191216113953773](../public/images/image-20191216113953773.png)

**git强制拉取远程仓库覆盖本地**
## **git强制拉取远程仓库覆盖本地**

```shell
git fetch --all //从另一个存储库下载对象和引用
Expand All @@ -31,7 +31,7 @@ git pull //开始更新



**git协助流程**
## **git协助流程**

多人协作是强大的功能之一。

Expand Down
Loading

0 comments on commit 711a3d0

Please sign in to comment.