From 5ccfad7fce7af0b75645c1ac457a17b787b0cde6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E6=B6=B5?= <11764442+biblebuild@user.noreply.gitee.com> Date: Tue, 21 May 2024 14:09:38 +0000 Subject: [PATCH 1/4] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王子涵 <11764442+biblebuild@user.noreply.gitee.com> --- ...0\267\257\347\224\261\351\205\215\347\275\256.md" | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 "\347\216\213\345\255\220\346\266\265/2024.0508-\350\267\257\347\224\261OSPF\345\212\250\346\200\201\350\267\257\347\224\261\351\205\215\347\275\256.md" diff --git "a/\347\216\213\345\255\220\346\266\265/2024.0508-\350\267\257\347\224\261OSPF\345\212\250\346\200\201\350\267\257\347\224\261\351\205\215\347\275\256.md" "b/\347\216\213\345\255\220\346\266\265/2024.0508-\350\267\257\347\224\261OSPF\345\212\250\346\200\201\350\267\257\347\224\261\351\205\215\347\275\256.md" new file mode 100644 index 0000000..e528ab6 --- /dev/null +++ "b/\347\216\213\345\255\220\346\266\265/2024.0508-\350\267\257\347\224\261OSPF\345\212\250\346\200\201\350\267\257\347\224\261\351\205\215\347\275\256.md" @@ -0,0 +1,12 @@ +### OSPF +- 开放式最短路径优先协议(Open Shortest Path First,即OSPF),是目前网络中应用最广泛的路由协议之一 +- 通过向全网扩散本设备的链路状态信息,使网络中每台设备最终同步一个具有全网链路状态的数据库,然后采用 SPF 算法,以自身为根,计算到达其他网络的最短路径,最终形成全网路由信息 +### OSPF基本配置 +启用并运行OSPF进程,在该进程下配置路由器所属的区域、区域范围和区域内参与OSPF路由的网络地址 +### 关键配置步骤 +``` +Switch(config)#router ospf 1 //启用OSPF协议,从属OSPF进程ID=1 +//指定通告网络,并归属OSPF区域ID=0 +Switch(config-router)#network 192.168.1.0 0.0.0.255 area 0 +Switch(config-router)#network 192.168.3.0 0.0.0.255 area 0 +``` \ No newline at end of file -- Gitee From ea382c653d40a292f7236cd33ef2219bb83f8d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E6=B6=B5?= <11764442+biblebuild@user.noreply.gitee.com> Date: Tue, 21 May 2024 14:09:54 +0000 Subject: [PATCH 2/4] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王子涵 <11764442+biblebuild@user.noreply.gitee.com> --- ...47\224\261OSPF\351\205\215\347\275\256.md" | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 "\347\216\213\345\255\220\346\266\265/2024.0509-\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272\345\222\214\350\267\257\347\224\261OSPF\351\205\215\347\275\256.md" diff --git "a/\347\216\213\345\255\220\346\266\265/2024.0509-\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272\345\222\214\350\267\257\347\224\261OSPF\351\205\215\347\275\256.md" "b/\347\216\213\345\255\220\346\266\265/2024.0509-\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272\345\222\214\350\267\257\347\224\261OSPF\351\205\215\347\275\256.md" new file mode 100644 index 0000000..877e96b --- /dev/null +++ "b/\347\216\213\345\255\220\346\266\265/2024.0509-\344\270\211\345\261\202\344\272\244\346\215\242\346\234\272\345\222\214\350\267\257\347\224\261OSPF\351\205\215\347\275\256.md" @@ -0,0 +1,26 @@ +### 步骤 +#### 第一步 配置pc机的IP地址和网关 +#### 第二步 对三层交换机进行相关配置(VLAN、SVI及路由等) +关键步骤: +```bash +ip routing //开启路由功能,默认关闭 +interface vlan 2 //进入SVI接口模式,接口自动开启 +ip address 192.168.3.1 255.255.255.0 //配置SVI接口IP +exit +interface vlan 3 +ip address 192.168.1.1 255.255.255.0 +exit +router ospf 1 //启用OSPF协议,从属OSPF进程ID=1 +//指定通告网络,并归属OSPF区域ID=0 +network 192.168.1.0 0.0.0.255 area 0 +network 192.168.3.0 0.0.0.255 area 0 +``` +#### 第四步 在路由上配置OSPF动态路由 +关键步骤: +```bash +router ospf 1 //启用OSPF协议,从属OSPF进程ID=1 +//指定通告网络,并归属OSPF区域ID=0 + network 192.168.2.0 0.0.0.255 area 0 + network 10.254.10.0 0.0.0.255 area 0 +``` +#### 注意:给路由和三层交换机配置IP地址后,一定要no shutdown(开启端口) -- Gitee From 0fdcb166e410b9f3425f5e4224c8d69223d7fa83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E6=B6=B5?= <11764442+biblebuild@user.noreply.gitee.com> Date: Tue, 21 May 2024 14:10:11 +0000 Subject: [PATCH 3/4] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王子涵 <11764442+biblebuild@user.noreply.gitee.com> --- ...4\270\252\344\272\272\345\215\232\345\256\242.md" | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 "\347\216\213\345\255\220\346\266\265/2024.0510-\347\224\250Markdown\346\220\255\345\273\272\344\270\252\344\272\272\345\215\232\345\256\242.md" diff --git "a/\347\216\213\345\255\220\346\266\265/2024.0510-\347\224\250Markdown\346\220\255\345\273\272\344\270\252\344\272\272\345\215\232\345\256\242.md" "b/\347\216\213\345\255\220\346\266\265/2024.0510-\347\224\250Markdown\346\220\255\345\273\272\344\270\252\344\272\272\345\215\232\345\256\242.md" new file mode 100644 index 0000000..9586c9e --- /dev/null +++ "b/\347\216\213\345\255\220\346\266\265/2024.0510-\347\224\250Markdown\346\220\255\345\273\272\344\270\252\344\272\272\345\215\232\345\256\242.md" @@ -0,0 +1,12 @@ +### 搭建步骤 +1. 安装Node +2. 安装Git +3. 新建Gitee仓库 +4. 安装VuePress +5. 内容编辑 +6. 部署之前你需要先生成静态文件,在命令行中输入: + vuepress build docs +7. 接着使用 git 命令,先暂存所有文件,再提交暂存命令,最后上传到 Gitee: +git add . git commit -m '部署' git push https://gitee.com/<用户名>/<仓库名> +8. 最后,我们在服务中选择 Gitee Pages,选择部署分支为 master,选择部署目录为 /docs/.vuepress/dist,点击更新 +9. 等待更新完成,会出现网站地址,我们点击进入,如果访问成功,则说明部署成功。 -- Gitee From 0b50e9c4a79efd78216e5b5b2fd93ba4514e992e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E6=B6=B5?= <11764442+biblebuild@user.noreply.gitee.com> Date: Tue, 21 May 2024 14:10:27 +0000 Subject: [PATCH 4/4] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 王子涵 <11764442+biblebuild@user.noreply.gitee.com> --- ...60\346\234\215\345\212\241\345\231\250.md" | 99 +++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 "\347\216\213\345\255\220\346\266\265/2024.0513-\344\270\252\344\272\272\347\254\224\350\256\260\351\203\250\347\275\262\345\210\260\346\234\215\345\212\241\345\231\250.md" diff --git "a/\347\216\213\345\255\220\346\266\265/2024.0513-\344\270\252\344\272\272\347\254\224\350\256\260\351\203\250\347\275\262\345\210\260\346\234\215\345\212\241\345\231\250.md" "b/\347\216\213\345\255\220\346\266\265/2024.0513-\344\270\252\344\272\272\347\254\224\350\256\260\351\203\250\347\275\262\345\210\260\346\234\215\345\212\241\345\231\250.md" new file mode 100644 index 0000000..41588af --- /dev/null +++ "b/\347\216\213\345\255\220\346\266\265/2024.0513-\344\270\252\344\272\272\347\254\224\350\256\260\351\203\250\347\275\262\345\210\260\346\234\215\345\212\241\345\231\250.md" @@ -0,0 +1,99 @@ +### 步骤 + +#### 1.安装node + +下载node.js(LTS)https://nodejs.org/en + +用cmd下载 :npm install -g yarn + +#### 2.D盘创建vitepress文件夹,用VsCode打开 + +打开终端输入 yarn init 会出现一个package.json (出现: 一直回车) + +在VScode下终端输入:yarn add -D vitepress + +在VScode下终端输入:yarn vitepress init + +- 路径选择:./docs +- 名字和描述: +- 选择Default Theme +- NO +- NO + +#### 3.内容编辑 + +把自己笔记拖进去docs文件夹里面去 + +打开.vitepress文件夹里面的config.mjs 编辑它 + +``` + 这个是个人博客右上角的修改 + nav: [ + text后填写名称 + link后跟自己文档的路径 + {text:' ',link:'/'}, + { + text:' ', + items: [ + { text:' ',link:'/XXX/XXXXXX.md'}, + { text:' ',link:'/XXX/XXXXXX.md'}, + + +sidebar: [ + { + text: '文件夹名字', + items: [ + { text: 'XXX', link: '/XXX/XXXXXX.md' }, + { text: 'XXXX', link: '/XXX/XXXXXX-笔记.md' }, +``` + +#### 4.上传 + +VScode终端:运行 yarn vitepress dev docs + +VScode终端:打包 yarn vitepress build docs + +打包后会出现一个dist文件夹 + +1. 打开终端: + + 安装Nginx(如以安装请忽略此步骤) + + ``` + apt install nginx -y --- 安装 + systemctl status nignx ---确认nginx有安装并且正在运行命令: + ``` + + 远程登录自己的服务器 + + ``` + ssh root@XXX.top 远程登录服务器 + ``` + + 创建目录 + + ``` + cd /var/www mkdir www.XXX.top (如果已创建请忽略,看下一步) + cd www.xxx.top/ 进入目录 + cd /etc/nginx//conf.d/ + vim www.xxx.top.conf 打开nginx配置页面(如果里面没有东西,请复制下面,如果有直接删除再粘贴上去) + server { + listen 80; + server_name www.XXX.top; + + location / { + root /var/www/XXX.top/dist; + try_files $uri $uri/ /index.html; + index index.html; + } + } + ``` + + 上传dist文件: + + ``` + scp -r D:\viteprees\docs\.vitepress\dist root@XXX.top:/var/www/www.XXX.top/ + --- 把打包好的dist文件夹存放在相应的路径里 + ``` + + \ No newline at end of file -- Gitee