From 26249c74c3c759d19da4cca97ecdc16000729847 Mon Sep 17 00:00:00 2001 From: zqf <520> Date: Wed, 15 May 2024 23:04:35 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...37\346\210\220\347\275\221\347\253\231.md" | 64 +++++++++++++++++++ ...\213\237\346\234\272\345\222\214Debain.md" | 44 +++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 "06\350\265\265\345\272\206\347\254\246/2024-05-14-\345\210\251\347\224\250markdown\346\226\207\346\241\243\347\224\237\346\210\220\347\275\221\347\253\231.md" create mode 100644 "06\350\265\265\345\272\206\347\254\246/2024-05-15-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debain.md" diff --git "a/06\350\265\265\345\272\206\347\254\246/2024-05-14-\345\210\251\347\224\250markdown\346\226\207\346\241\243\347\224\237\346\210\220\347\275\221\347\253\231.md" "b/06\350\265\265\345\272\206\347\254\246/2024-05-14-\345\210\251\347\224\250markdown\346\226\207\346\241\243\347\224\237\346\210\220\347\275\221\347\253\231.md" new file mode 100644 index 0000000..0f621db --- /dev/null +++ "b/06\350\265\265\345\272\206\347\254\246/2024-05-14-\345\210\251\347\224\250markdown\346\226\207\346\241\243\347\224\237\346\210\220\347\275\221\347\253\231.md" @@ -0,0 +1,64 @@ +``` +如何利用自己写好的markdown文档,生成网站 +准备工作: + +1.有md格式文档,(你们的笔记) +2.需要一些可以用md文件生成静态html文档的工具,vitepress,或markdownpro +以用vitepress为例: + +1.在D盘创建一个目录,用vs code打开 + +2.查看打开终端 + +3.npm add -D vitepress // 利用node来安装vitepress + +4.npx vitepress init // 启用vitepress的设置向导 + +Welcome to VitePress! +│ +◇ Where should VitePress initialize the config? +│ ./docs +│ +◇ Site title: +│ 我的笔记我作主 +│ +◇ Site description: +│ 这是一个用markdown生成的笔记网站 +│ +◇ Theme: +│ Default Theme +│ +◇ Use TypeScript for config and theme files? +│ Yes +│ +◇ Add VitePress npm scripts to package.json? +│ Yes +│ +└ Done! Now run npm run docs:dev and start writing. + +5.npm run docs:dev // 本地预览生成的效果 + +6.修改index.md可以修改首页的连接 + +7.修改config可以修改右上角的导航,和左侧的导航 + +8.将笔记的文档复制到docs目录下的对应子目录 + +9.利用cmd的tree /F 命令得到所有笔记的文件名,再将 + +10.items: [ + { text: 'Markdown Examples', link: '/markdown-examples' }, + { text: 'Runtime API Examples', link: '/api-examples' } + ] +这种要配置的格式扔给AI,让它整合文件名到这种格式 +如果你要将笔记放在一个统一的子目录中访问,用在配置文件config中加入一行 + +'base':'/books/', + +11.npm run docs:build // 将md文件生成html到\docs.vitepress\dist 目录,想本地预览就执行npm run docs:preview + +12.登录自己的服务器,使用SSH工具,将dist上传到自己网站的目录 + +13.mv dist books // 将dist改名为books +``` + diff --git "a/06\350\265\265\345\272\206\347\254\246/2024-05-15-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debain.md" "b/06\350\265\265\345\272\206\347\254\246/2024-05-15-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debain.md" new file mode 100644 index 0000000..aeb1042 --- /dev/null +++ "b/06\350\265\265\345\272\206\347\254\246/2024-05-15-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debain.md" @@ -0,0 +1,44 @@ +``` + Linux基础 +1.学习Debian的两种方式 +安装虚拟机,再安装debian,快照 +利用阿里云、华为云、腾讯云,也利用快照功能。对服务器进行存档 + +2.准备好 虚拟机VM 17版本+Debian 12.5 64位的ISO文件 + +3.先安装VM,再创建一个新虚拟机 + +4.如何下载一个Debian的安装镜像 https://www.debian.org/ + +5.直接在虚拟机操作debian很麻烦,所以想办法,用SSH远程登录它 + +6.默认Debian没有安装SSH服务端,需要自己安装 + +apt-get install ssh -y // 需要root权限,安装SSH服务端 +ip addr show // 查看IP地址 +ifconfig // 需要root权限,可以借权sudo +// 以上两步,就可以让我们用普通用户远程登录了,但是默认下root是不可以直接登录的。需对ssh做配置 +// 为了方便我们编辑文件。安装一个vim编辑器,默认是vi + +7.修改ssh的服务端配置文件/etc/ssh/sshd_config文件 +vim /etc/ssh/sshd_config +Port 22// 开启端口22 +PermitRootLogin yes // 允许root登录 +PasswordAuthentication yes // 采用密码验证模式 +PermitEmptyPasswords no // 禁用空密码 +// 重启ssh,让修改后的配置生效 + systemctl restart ssh +// /etc/init.d/ssh restart 同上的效果 + +8.如何借用root权限 +1. 安装sudo +apt-get install sudo -y +2. 将普通用户名加入 +vim /etc/sudoers +## +## Allow root to run any commands anywhere +root ALL=(ALL) ALL +用户名 ALL=(ALL) ALL +3.重新登录普通用户,就可以使用sudo功能 +``` + -- Gitee