From b0fb2c7455995f3c2c067bca695709b7a2b74bf6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=8B=8F=E8=90=8Cm?= <3279471564@qq.com> Date: Wed, 15 May 2024 14:50:26 +0800 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 --- ...37\346\210\220\347\275\221\347\253\231.md" | 75 +++++++++++++++++++ README.en.md | 36 --------- README.md | 39 ---------- 3 files changed, 75 insertions(+), 75 deletions(-) create mode 100644 "45 \345\210\230\350\213\217\350\220\214/20240514_\347\224\237\346\210\220\347\275\221\347\253\231.md" delete mode 100644 README.en.md delete mode 100644 README.md diff --git "a/45 \345\210\230\350\213\217\350\220\214/20240514_\347\224\237\346\210\220\347\275\221\347\253\231.md" "b/45 \345\210\230\350\213\217\350\220\214/20240514_\347\224\237\346\210\220\347\275\221\347\253\231.md" new file mode 100644 index 0000000..d0007c6 --- /dev/null +++ "b/45 \345\210\230\350\213\217\350\220\214/20240514_\347\224\237\346\210\220\347\275\221\347\253\231.md" @@ -0,0 +1,75 @@ +### 网站生成: + +##### 准备工作: + +1. 有md格式文档 (笔记) +2. 需要一些可以用md文件生成静态html文档的工具,vitepress,或markdownpro +3. 下载note.js到D盘 + + + +##### 以用vitepress为例: + +1. 在D盘创建一个目录,用vs code打开 + +2. 查看打开终端 + +3. npm add -D vitepress // 利用node来安装vitepress + +4. npx vitepress init // 启用vitepress的设置向导 + + 1. ```js + 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 命令得到所有笔记的文件名,再将 + + 1. ```js + items: [ + { text: 'Markdown Examples', link: '/markdown-examples' }, + { text: 'Runtime API Examples', link: '/api-examples' } + ] + 这种要配置的格式扔给AI,让它整合文件名到这种格式 + ``` + + + +10. 如果你要将笔记放在一个统一的子目录中访问,用在配置文件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 \ No newline at end of file diff --git a/README.en.md b/README.en.md deleted file mode 100644 index 7ecb642..0000000 --- a/README.en.md +++ /dev/null @@ -1,36 +0,0 @@ -# Linux基础 - -#### Description -{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**} - -#### Software Architecture -Software architecture description - -#### Installation - -1. xxxx -2. xxxx -3. xxxx - -#### Instructions - -1. xxxx -2. xxxx -3. xxxx - -#### Contribution - -1. Fork the repository -2. Create Feat_xxx branch -3. Commit your code -4. Create Pull Request - - -#### Gitee Feature - -1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md -2. Gitee blog [blog.gitee.com](https://blog.gitee.com) -3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore) -4. The most valuable open source project [GVP](https://gitee.com/gvp) -5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help) -6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) diff --git a/README.md b/README.md deleted file mode 100644 index cda094f..0000000 --- a/README.md +++ /dev/null @@ -1,39 +0,0 @@ -# Linux基础 - -#### 介绍 -{**以下是 Gitee 平台说明,您可以替换此简介** -Gitee 是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台 -无论是个人、团队、或是企业,都能够用 Gitee 实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)} - -#### 软件架构 -软件架构说明 - - -#### 安装教程 - -1. xxxx -2. xxxx -3. xxxx - -#### 使用说明 - -1. xxxx -2. xxxx -3. xxxx - -#### 参与贡献 - -1. Fork 本仓库 -2. 新建 Feat_xxx 分支 -3. 提交代码 -4. 新建 Pull Request - - -#### 特技 - -1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md -2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com) -3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目 -4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目 -5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help) -6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/) -- Gitee From 9e986a905716fd734846dcf122de6a5b19f69953 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=8B=8F=E8=90=8Cm?= <3279471564@qq.com> Date: Wed, 15 May 2024 22:00:42 +0800 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 --- ...\213\237\346\234\272\345\222\214Debian.md" | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 "45 \345\210\230\350\213\217\350\220\214/20240515_\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" diff --git "a/45 \345\210\230\350\213\217\350\220\214/20240515_\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" "b/45 \345\210\230\350\213\217\350\220\214/20240515_\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" new file mode 100644 index 0000000..c316a54 --- /dev/null +++ "b/45 \345\210\230\350\213\217\350\220\214/20240515_\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" @@ -0,0 +1,67 @@ +# Linux基础 + +1. Linux是操作系统的内核,以其为基础会有很多发行版本 + + 1. RedHat 收费商业版本,Centos 是RedHat的社区版本 很流行 + 2. Debian 命令行为主,Ubantu 是以Debian+桌面皮肤的版本 + 3. 类似显卡的核心,N卡A卡相当于内核,不同商家出的具体的型号的显卡,相当于发行版本 + +2. 学习Debian的两种方式 + + 1. 安装虚拟机,再安装debian,快照 + 2. 利用阿里云、华为云、腾讯云,也利用快照功能。对服务器进行存档 + +3. 准备好 虚拟机VM 17版本+Debian 12.5 64位的ISO文件 + +4. 先安装VM,再创建一个新虚拟机 + +5. 如何下载一个Debian的安装镜像 https://www.debian.org/ + +6. 直接在虚拟机操作debian很麻烦,所以想办法,用SSH远程登录它 + +7. 默认Debian没有安装SSH服务端,自己安装一个 + + 1. ```js + apt-get install ssh -y // 需要root权限,安装SSH服务端 + ip addr show // 查看IP地址 + ifconfig // 需要root权限,可以借权sudo + // 以上两步,就可以让我们用普通用户远程登录了,但是默认下root是不可以直接登录的。需对ssh做配置 + + // 为了方便我们编辑文件。安装一个vim编辑器,默认是vi + ``` + + + +8. 修改ssh的服务端配置文件/etc/ssh/sshd_config文件 + + ```js + vim /etc/ssh/sshd_config + Port 22// 开启端口22 + PermitRootLogin yes // 允许root登录 + PasswordAuthentication yes // 采用密码验证模式 + PermitEmptyPasswords no // 禁用空密码 + + + // 重启ssh,让修改后的配置生效 + systemctl restart ssh + // /etc/init.d/ssh restart 同上的效果 + ``` + + + +9. 如何借用root权限 + + 1. ```js + 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 + + ``` + + 2. 重新登录普通用户,就可以使用sudo功能 + -- Gitee From 183f8a6134bf43361b8a1c33246215fdb24c741a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=8B=8F=E8=90=8Cm?= <3279471564@qq.com> Date: Wed, 15 May 2024 23:36:55 +0800 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 --- .../20240514_\347\224\237\346\210\220\347\275\221\347\253\231.md" | 0 ...\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename "45 \345\210\230\350\213\217\350\220\214/20240514_\347\224\237\346\210\220\347\275\221\347\253\231.md" => "42 \345\210\230\350\213\217\350\220\214/20240514_\347\224\237\346\210\220\347\275\221\347\253\231.md" (100%) rename "45 \345\210\230\350\213\217\350\220\214/20240515_\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" => "42 \345\210\230\350\213\217\350\220\214/20240515_\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" (100%) diff --git "a/45 \345\210\230\350\213\217\350\220\214/20240514_\347\224\237\346\210\220\347\275\221\347\253\231.md" "b/42 \345\210\230\350\213\217\350\220\214/20240514_\347\224\237\346\210\220\347\275\221\347\253\231.md" similarity index 100% rename from "45 \345\210\230\350\213\217\350\220\214/20240514_\347\224\237\346\210\220\347\275\221\347\253\231.md" rename to "42 \345\210\230\350\213\217\350\220\214/20240514_\347\224\237\346\210\220\347\275\221\347\253\231.md" diff --git "a/45 \345\210\230\350\213\217\350\220\214/20240515_\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" "b/42 \345\210\230\350\213\217\350\220\214/20240515_\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" similarity index 100% rename from "45 \345\210\230\350\213\217\350\220\214/20240515_\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" rename to "42 \345\210\230\350\213\217\350\220\214/20240515_\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" -- Gitee From 681c923ac102e793acac57499fb6a055a74e033b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E8=8B=8F=E8=90=8Cm?= <3279471564@qq.com> Date: Thu, 16 May 2024 15:13:51 +0800 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 --- ...231\232\346\213\237\346\234\272\345\222\214Debian.md" | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git "a/42 \345\210\230\350\213\217\350\220\214/20240515_\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" "b/42 \345\210\230\350\213\217\350\220\214/20240515_\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" index c316a54..2447225 100644 --- "a/42 \345\210\230\350\213\217\350\220\214/20240515_\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" +++ "b/42 \345\210\230\350\213\217\350\220\214/20240515_\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" @@ -28,8 +28,9 @@ // 以上两步,就可以让我们用普通用户远程登录了,但是默认下root是不可以直接登录的。需对ssh做配置 // 为了方便我们编辑文件。安装一个vim编辑器,默认是vi + apt-get install vim -y ``` - + 8. 修改ssh的服务端配置文件/etc/ssh/sshd_config文件 @@ -65,3 +66,9 @@ 2. 重新登录普通用户,就可以使用sudo功能 +```js +//去普通用户模式下载net-tools +sudo apt-get install net-tools +//输入普通用户密码,就可以使用了 +``` + -- Gitee