From fe9236794d02ab4c1e584591575d2a3eb98dcde4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E7=A7=80=E6=B8=85?= <2189233958@qq.com> Date: Wed, 15 May 2024 23:08:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" | 1 + 1 file changed, 1 insertion(+) create mode 100644 "33 \346\236\227\347\247\200\346\270\205/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" diff --git "a/33 \346\236\227\347\247\200\346\270\205/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" "b/33 \346\236\227\347\247\200\346\270\205/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" new file mode 100644 index 0000000..d4351c9 --- /dev/null +++ "b/33 \346\236\227\347\247\200\346\270\205/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" @@ -0,0 +1 @@ +ht \ No newline at end of file -- Gitee From 3f3917ab04831a7ec5a66c5be7b84d28b0d82768 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=97=E7=A7=80=E6=B8=85?= <2189233958@qq.com> Date: Fri, 17 May 2024 18:24:51 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=AC=94=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...7\346\234\254\346\226\207\346\241\243.txt" | 1 - ...\213\237\346\234\272\344\270\216Debian.md" | 62 +++++++++++++++++++ 2 files changed, 62 insertions(+), 1 deletion(-) delete mode 100644 "33 \346\236\227\347\247\200\346\270\205/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" create mode 100644 "33 \346\236\227\347\247\200\346\270\205/\347\254\224\350\256\260/20240515-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\344\270\216Debian.md" diff --git "a/33 \346\236\227\347\247\200\346\270\205/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" "b/33 \346\236\227\347\247\200\346\270\205/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" deleted file mode 100644 index d4351c9..0000000 --- "a/33 \346\236\227\347\247\200\346\270\205/\346\226\260\345\273\272\346\226\207\346\234\254\346\226\207\346\241\243.txt" +++ /dev/null @@ -1 +0,0 @@ -ht \ No newline at end of file diff --git "a/33 \346\236\227\347\247\200\346\270\205/\347\254\224\350\256\260/20240515-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\344\270\216Debian.md" "b/33 \346\236\227\347\247\200\346\270\205/\347\254\224\350\256\260/20240515-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\344\270\216Debian.md" new file mode 100644 index 0000000..b7ae5e8 --- /dev/null +++ "b/33 \346\236\227\347\247\200\346\270\205/\347\254\224\350\256\260/20240515-\345\256\211\350\243\205\350\231\232\346\213\237\346\234\272\344\270\216Debian.md" @@ -0,0 +1,62 @@ +### 一、Linux + +1. Linux是操作系统的内核以它为基础发行的版本有: + - RedHat:收费版本 + - Centos:RedHat的免费版本,但是现在已经停止维护了 + - Debian :命令行为主 + - Ubantu :Debian+桌面发行的版本 + +### 二、学习Debian的方式 + +1. 安装虚拟机和debian,利用快照功能 + - 虚拟机VM 17版本,安装,新建虚拟机 + - Debian 12.5 64位的ISO文件,在 https://www.debian.org/下载 +2. 阿里云、华为云、腾讯云,利用快照功能对服务器进行存档 + +### 三、Debian安装 + +1. 在 https://www.debian.org/下载Debian 12.5 64位的ISO文件 + +2. 因为虚拟机操作Debian很麻烦,所以利用ssh进行远程操控,但是默认Debian没有安装SSH服务端,需要自己安装 + + ```js + //(1). 在root权限安装ssh服务器 + apt-get install ssh -y + //(2).查看IP地址 + show IP + ``` + + + +3. 修改ssh的服务端配置文件/etc/ssh/sshd_config文件(vim编辑器,编辑文件用) + + ```js + vim /etc/ssh/sshd_config + // (1)开启端口22 + Port 22 + //(2) 允许root登录 + PermitRootLogin yes + //(3) 采用密码验证模式 + PasswordAuthentication yes + // (4)禁用空密码 + PermitEmptyPasswords no + //(5) 重启ssh,让修改后的配置生效 + systemctl restart ssh + // 或者/etc/init.d/ssh restart + ``` + + + +2. 借用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 + //(3)重新登录普通用户就可以使用sudo功能 + ``` \ No newline at end of file -- Gitee