From 75c92de52de3646e2276ba86467ce0d4440fcf43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E8=89=B3zy?= <3599630858@qq.com> Date: Thu, 16 May 2024 13:23:56 +0800 Subject: [PATCH 1/2] =?UTF-8?q?20240511-=E4=B8=89=E5=B1=82=E4=BA=A4?= =?UTF-8?q?=E6=8D=A2=E6=9C=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\213\237\346\234\272\345\222\214Debian.md" | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 "39 \345\221\250\350\211\263/note/20240515-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" diff --git "a/39 \345\221\250\350\211\263/note/20240515-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" "b/39 \345\221\250\350\211\263/note/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..349de78 --- /dev/null +++ "b/39 \345\221\250\350\211\263/note/20240515-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" @@ -0,0 +1,68 @@ +#### 💕安装虚拟机和Debian💕 + +1. Linux是操作系统的内核,以其为基础会有很多发行的版本,RedHat,Centos,Ubantu,Debian + + * RedHat:收费商业版本 + * Centos:是RedHat的社区版本 + * Ubantu:是以Debian+桌面皮肤的版本 + * Debian:以命令行为主 + +2. 学习Debian的两种方式 + + * 安装虚拟机 + * 利用阿里云,华为云,腾讯云,也可以利用快照功能,对服务器进行存档 + +3. 虚拟机 + + * 虚拟机VM 17版本+Debian 12.5 64位的ISO文件 + + * 先安装VM,再创建一个虚拟机 + + * 下载镜像文件:(https://www.debian.org/) + + * 直接再虚拟机操作Debian 很麻烦,要用ssh远程登录 + + * ```js + ip adde show //查IP + ssh -l 用户名 用户IP//ssh远程登录(管理员cmd) + ``` + + * 默认Debian 没有俺煮给你吃ssh服务端 + + * ```js + apt-get install ssh -y//在超级用户下写root(普通用户可以登录) + ``` + + * 远程登录root需要对ssh进行配置 + + * ```js + apt-get install vim -y + wherein ssh //查看配置文件 + ``` + + * 修改ssh的服务端配置文件/etc/ssh/sshd_config文件 + + * ```js + vim /etc/ssh/sshd_config + port 22 //开启端口22 + PermiRootLogin yes//允许root登录 + PasswordAutentication yes //采用密码验证模式 + PermitEmptyPasswords no//禁用空密码 + systemctl restart ssh//重启ssh,让遂改后的配置生效 + letc/init.d/ssh restart + ``` + + * 如何借用root权限 + + * ```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 + ``` + + \ No newline at end of file -- Gitee From ee50c3bd59caf92506b6898f405b47f1ad89f677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E8=89=B3zy?= <3599630858@qq.com> Date: Thu, 16 May 2024 13:26:25 +0800 Subject: [PATCH 2/2] =?UTF-8?q?20240515-=E5=AE=89=E8=A3=85=E8=99=9A?= =?UTF-8?q?=E6=8B=9F=E6=9C=BA=E5=92=8CDebian?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...05\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git "a/39 \345\221\250\350\211\263/note/20240515-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" "b/39 \345\221\250\350\211\263/note/20240515-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" index 349de78..56e0e96 100644 --- "a/39 \345\221\250\350\211\263/note/20240515-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" +++ "b/39 \345\221\250\350\211\263/note/20240515-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\345\222\214Debian.md" @@ -52,7 +52,7 @@ letc/init.d/ssh restart ``` - * 如何借用root权限 + * 如何借用root权限💕 * ```js 1. 安装sudo -- Gitee