From c1029f86b97c6b71c1f446955a82e0cd6d729f32 Mon Sep 17 00:00:00 2001 From: 123 <123@qq.com> Date: Sat, 18 May 2024 13:29:46 +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 --- 20240514.md | 33 +++++++++++++++++++++++++++++++++ 20240515.md | 38 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 20240514.md create mode 100644 20240515.md diff --git a/20240514.md b/20240514.md new file mode 100644 index 0000000..288f918 --- /dev/null +++ b/20240514.md @@ -0,0 +1,33 @@ +1.创建一个新文件夹,用vs code打开 + +2.在VS Code查看 打开终端 + +3.npm add -D vitepress // 利用node来安装vitepress + +4.npx vitepress init // 启用vitepress的设置向导 + ◇ Where should VitePress initialize the config? + │ ./docs + +在./后面写入docs,其余全部回车 + +5.npm run docs:dev // 本地预览生成的效果 +点入生成效果的网站并进行编辑 + +6.利用cmd的tree /F 命令得到所有笔记的文件名,再将 + + + items: [ + { text: 'Markdown Examples', link: '/markdown-examples' }, + { text: 'Runtime API Examples', link: '/api-examples' } + ] + 这种要配置的格式扔给AI,让它整合文件名到这种格式 + +7.如果你要将笔记放在一个统一的子目录中访问,用在配置文件config中加入一行 + + 'base':'/books/', + +8.npm run docs:build // 将md文件生成html到\docs\.vitepress\dist 目录,想本地预览就执行npm run docs:preview + +9.登录自己的服务器,使用SSH工具,将dist上传到自己网站的目录 + +10.mv dist books // 将dist改名为books \ No newline at end of file diff --git a/20240515.md b/20240515.md new file mode 100644 index 0000000..ebf42f0 --- /dev/null +++ b/20240515.md @@ -0,0 +1,38 @@ +准备好 虚拟机VM 17版本+Debian 12.5 64位的ISO文件 + +先安装VM,再创建一个新虚拟机 + +3.如何下载一个Debian的安装镜像 https://www.debian.org/ + +默认Debian没有安装SSH服务端,自己安装一个 + +apt-get install ssh -y // 需要root权限,安装SSH服务端 +ip addr show // 查看IP地址 +ifconfig // 需要root权限,可以借权sudo +// 以上两步,就可以让我们用普通用户远程登录了,但是默认下root是不可以直接登录的。需对ssh做配置 + +// 为了方便我们编辑文件。安装一个vim编辑器,默认是vi +5.修改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 同上的效果 +6.如何借用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功能 \ No newline at end of file -- Gitee