avatar

瓜生花子八宝粥

少壮不努力 老了看浏览器

  • 首页
  • 开源项目
  • Linux
  • Windows
  • Docker
  • 中间件
  • 数据库
主页 Linux Debian系统安装
文章

Linux Debian系统安装

发表于 2024-12-2 更新于 2024-12- 2
作者 jepwei
6~8 分钟 阅读

debian系统

1.系统安装

参考:https://blog.csdn.net/ziqibit/article/details/130060173

2.系统初始化

2.1 打开root权限登录

vi /etc/ssh/sshd_config
#添加如下
PermitRootLogin yes
PasswordAuthentication yes

#重启sshd
/etc/init.d/ssh restart

2.2 配置网络

建议用nmtui配置网络!

如有特殊需求再按照如下方式去配置!
vi /etc/network/interfaces
##以下是配置固定IP的方法
## 开机自启
auto ens33
## 开启配置热生效
allow-hotplug ens33
## static静态,dhcp动态
iface ens33 inet static
## 静态IP地址
address 192.168.0.230
## 子网掩码
netmask 255.255.255.0
## 默认网关
gateway 192.168.0.1

##配置DNS
vi /etc/resolve.conf
nameserver 114.114.114.114

#关闭NetworkManager并重启网卡(建议不关闭NetworkManager,用nmtui配置地址)
systemctl stop NetworkManager
systemctl disable NetworkManager
systemctl restart networking.service

2.3 配置阿里源

cp /etc/apt/sources.list /etc/apt/sources.list.bak
vi /etc/apt/sources.list
##清空并添加如下内容(二选一)
##阿里源
deb https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb-src https://mirrors.aliyun.com/debian-security/ bookworm-security main
deb https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main non-free non-free-firmware contrib

##腾讯源(可选)
deb https://mirrors.tencent.com/debian/ bookworm main non-free non-free-firmware contrib
deb-src https://mirrors.tencent.com/debian/ bookworm main non-free non-free-firmware contrib
deb https://mirrors.tencent.com/debian-security/ bookworm-security main
deb-src https://mirrors.tencent.com/debian-security/ bookworm-security main
deb https://mirrors.tencent.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb-src https://mirrors.tencent.com/debian/ bookworm-updates main non-free non-free-firmware contrib
deb https://mirrors.tencent.com/debian/ bookworm-backports main non-free non-free-firmware contrib
deb-src https://mirrors.tencent.com/debian/ bookworm-backports main non-free non-free-firmware contrib

#保存后更新
sudo apt-get update

#安装常用网络工具
apt install -y net-tools nmap tcpdump iperf curl vim openvpn git wget

2.4 设置ll命令

cd /root/
vim .bashrc
#把下面这行的注释取消掉
alias ll='ls $LS_OPTIONS -l'

#使其生效
source .bashrc

2.5 安装firewalld防火墙

apt install firewalld -y

debian12升级openssh-9.6

Linux
Linux
许可协议: 
分享

相关文章

7月 16, 2025

ubuntu 设置时间显示为24小时制

对ubuntu默认的时间显示格式不太满意,查阅了相关资料进行修改为24小时制度,特此记录和分享给需要设置的网友 查看当前的timezone root@jumpserver:~# timedatectl Local time: Sat 2024-03-23 12:45:5

6月 10, 2025

KVM 虚拟机创建模板

查看--os-type支持的参数 osinfo-query os # 列出所有已知操作系统 win7 virt-install --name=win7_zpcl_ip --vcpu=8,sockets=1,cores=8,threads=1 --ram=16384 --disk path=/home

1月 15, 2025

cpu 内存占用脚本

本文介绍了两个版本的Linux压力测试脚本,分别用于CPU和内存的压力测试。CPU压力测试脚本通过无限循环创建指定数量的进程以占用CPU资源;内存压力测试脚本则通过创建临时内存块来模拟内存占用,支持指定大小和停止运行。用户需根据用法说明参数执行脚本。该文档适合需要进行性能测试的Linux用户。

下一篇

Linux nmap命令

上一篇

Linux iptables防火墙(待学习)

最近更新

  • 1panel 部署
  • jumpserver 堡垒机部署
  • ubuntu 设置时间显示为24小时制
  • pritunl vpn 部署
  • dockovpn 部署

热门标签

nacos openvpnas 资源分享 docker oracle mysql ubuntu 开源项目 虚拟化 Linux

目录

©2025 瓜生花子八宝粥. 保留部分权利。

使用 Halo 主题 Chirpy