首页 > 系统相关 >Vmware 17 创建 Debian 11 服务器

Vmware 17 创建 Debian 11 服务器

时间:2023-05-18 11:14:25浏览次数:29  
标签:11 non cn 17 free debian edu main Debian

第一步 宿主机断网

创建Debian虚拟服务器时,首先断开宿主机的网络,避免创建时自动更新软件导致长时间等待,无法进行后续操作

第二步 自定义创建虚拟服务器(最小化安装,之后缺什么安装什么,以便明确知道目标软件是否需要额外的依赖项)

详细过程略。注意点:安装流程中倒数第二步,选择安装软件时,取消全部已选中的,然后选择ssh,最后回车确定。

第三步 使用超级管理员root登入系统,修改ssh配置文件sshd_config的属性值PermitRootLogin,允许root用户登录。最后使用Xshell登录进行操作

vi /etc/ssh/sshd_config
#PermitRootLogin prohibit-password
PermitRootLogin yes

第四步 更换apt源为国内源

(1)清空apt配置文件内容,粘贴国内源地址至配置文件
vi /etc/apt/sources.list

debian 11 国内源

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-backports main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
deb-src https://mirrors.tuna.tsinghua.edu.cn/debian-security bullseye-security main contrib non-free
(2)更新apt索引及系统软件包
apt update && apt upgrade -y

第五步 安装基础软件vim、ufw

(1)安装软件
apt install vim ufw -y
(2)修改vim配置文件
vim /usr/share/vim/vim82/defaults.vim
set mouse=a   -->   set mouse-=a
(3)启用ufw
ufw enable
(3)修改防火墙策略,禁用所有的流入流量,并开放ssh端口
ufw default deny && ufw allow 22/tcp
(4)查看防火墙策略
ufw status verbose

第六步 修改grub引导等待时间为0

(1)修改grub配置文件中的GRUB_TIMEOUT属性值
vim /etc/default/grub
GRUB_TIMEOUT=5   -->   GRUB_TIMEOUT=0
(2)更新grub配置

如果提示找不到该命令,则查看系统环境变量是否包含路径 /usr/sbin

update-grub2

第七步 删除创建虚拟服务器时引导创建的系统管理员world(可能是其他名称,根据你创建的管理员角色来操作)

(1)删除world主目录及角色
rm -rf /home/world && userdel world
(2)查看是否已被删除
id world

第八步 配置静态IP地址

  • (1)编辑配置文件 /etc/network/interfaces

    vi /etc/network/interfaces
    
  • (2)修改后的配置如下所示

    # This file describes the network interfaces available on your system
    # and how to activate them. For more information, see interfaces(5).
    
    source /etc/network/interfaces.d/*
    
    # The loopback network interface
    auto lo
    iface lo inet loopback
    
    # The primary network interface
    # 配置的网卡名称需要与实际的网卡名称一致
    # ip address 查看网卡名称及属性
    # 修改完成后重启系统,以便配置生效
    allow-hotplug ens32
    iface ens32 inet static #dhcp #注释掉动态分配,修改为静态
    address 192.168.108.100 #IP地址
    netmask 255.255.255.0   #子网掩码
    gateway 192.168.108.2   #网关
    
    #注意:复制粘贴内容至配置文件时应该删除中文注释内容
    

标签:11,non,cn,17,free,debian,edu,main,Debian
From: https://www.cnblogs.com/flowersinthesky/p/17411344.html

相关文章

  • 「解题报告」P3703 [SDOI2017]树点涂色
    有趣题,代码超好写,而且思路超有趣!!!首先发现操作1的操作都是某个点到根,不难发现这样每种颜色一定对应着树上的一条链。那么操作2可以直接树上查分求答案,这样我们只需要考虑维护每个点到根的链的数量了。怎么维护链的数量?发现这个操作1长得和LCT的Access操作一模一样啊,所......
  • SSO2.0 7-20230517
                ......
  • [转]Debian系与 RedHat 系的主要区别
    原文地址:与RedHat系的主要区别-Chinaskills如果你有使用过 RedHat 一类的Linux发行版的经验话(包括 CentOS 等),实际上 Debian 与 RedHat 并无非常巨大的区别,毕竟他们都只是一种普通的Linux发行版而已。多数时候,我们使用Linux是希望使用这个生态环境下的......
  • 11-Request&Response
    1,Request和Response的概述Request是请求对象,Response是响应对象。这两个对象在我们使用Servlet的时候有看到:此时,我们就需要思考一个问题request和response这两个参数的作用是什么?request:获取请求数据浏览器会发送HTTP请求到后台服务器[Tomcat]HTTP的请......
  • 2023.5.17
    1题目描述:定义一个时间类,小时和分钟是其两个私有成员数据。输入一个起始时间和一个结束时间(起始时间早于结束时间),通过运算符重载-(减号),计算这两个时间相隔多少分钟。说明:这两个时间在同一天之内,且采用24小时计时分式,即从00:00-23:59。23输入格式:测试输入包含若干......
  • SpringBoot(11) -- Logging
    SpringBoot默认使用的日志框架是logback,所以引入Web依赖后直接使用Logger.引入SpringBoot的Web依赖<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-web</artifactId></dependency>demo的目录结构......
  • Weblogic < 10.3.6 'wls-wsat' XMLDecoder 反序列化漏洞(CVE-2017-10271)
    参考:https://github.com/vulhub/vulhub/blob/master/weblogic/CVE-2017-10271/README.md反弹shellEXP:POST/wls-wsat/CoordinatorPortTypeHTTP/1.1Host:172.31.14.123:7001Accept-Encoding:gzip,deflateAccept:*/*Accept-Language:enUser-Agent:Mozilla/5.0(com......
  • 5.17
    #include<iostream>usingnamespacestd;intmain(){      intx,y;      cin>>x>>y;      if(x<y)      {             inttmp=y;             y=x;             x=tmp;     ......
  • 5.17
    以圆类Circle及立体图形类Solid为基础设计圆锥类Cone Point类结构说明: Point类的数据成员包括:①私有数据成员:X坐标x(double型),Y坐标y(double型)。Point类成员函数包括:①有参构造函数Point(double,double)和拷贝构造函数Point(constPoint&),其中有参构造函数参数默认......
  • 2023-05-17:一个正整数如果能被 a 或 b 整除,那么它是神奇的。 给定三个整数 n , a , b
    2023-05-17:一个正整数如果能被a或b整除,那么它是神奇的。给定三个整数n,a,b,返回第n个神奇的数字。因为答案可能很大,所以返回答案对10^9+7取模后的值。输入:n=4,a=2,b=3。输出:6。答案2023-05-17:过程描述:1.计算a和b的最小公倍数lcm。2.初始化......