惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Tailwind CSS Blog
The GitHub Blog
The GitHub Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog
Microsoft Security Blog
Microsoft Security Blog
Stack Overflow Blog
Stack Overflow Blog
量子位
Martin Fowler
Martin Fowler
月光博客
月光博客
P
Proofpoint News Feed
博客园_首页
Y
Y Combinator Blog
I
InfoQ
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
V
Visual Studio Blog
H
Help Net Security
U
Unit 42
GbyAI
GbyAI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 司徒正美
MongoDB | Blog
MongoDB | Blog
F
Fortinet All Blogs
罗磊的独立博客
酷 壳 – CoolShell
酷 壳 – CoolShell

青木的博客

重庆泼水事件,思想和拳头 – 青木的博客 硬盘内存涨价涨的厉害 – 青木的博客 cloudflare的证书,IIS,webdav和宝塔 – 青木的博客 战争和爱国者 – 青木的博客 折腾openclaw – 青木的博客 关于wordpress的REST API故障问题 – 青木的博客 毒读物 – 青木的博客 关于wordpress搬迁后无法修改和新增文章 – 青木的博客 豆包、元宝、deepseek,chatgpt,关于时事新闻的查询 – 青木的博客 回来坐坐 – 青木的博客 狗日的黑产狗 – 青木的博客 好玩的百度网盘盲盒 – 青木的博客 Win10映射Webdav – 青木的博客 香港 – 青木的博客 珲春 – 青木的博客 我的第一个邮箱被冻结了 – 青木的博客 前有墨茶,后有胖猫,总有傻子用命来刺痛我的心 – 青木的博客 帝国备份王不好用了 – 青木的博客 网站优化、新的nas、手机同步软件 – 青木的博客 在伊朗出差的第22天 – 青木的博客 关于服务器 – 青木的博客 MacPro的5GWiFi问题 – 青木的博客 伊朗 – 青木的博客 妞妞3岁时的梦想 – 青木的博客 11月伊朗 – 青木的博客 疫情之后第一次出国 – 青木的博客 俄罗斯之行 – 青木的博客 那个缓慢的,快乐的日子 – 青木的博客 心猿意马 – 青木的博客 现实与傲慢与偏见 – 青木的博客
centos7失去支持,改用debian12 – 青木的博客
Posted by 青木 于 · 2025-09-10 · via 青木的博客

技术

centos7失去支持,

想要找能够支持时间久一点的系统,

本来想尝试alibaba cloud linux3, 在尝试的过程中,感觉相关的支持太少,放弃,

随换成debian12

debian现在的版本是13,但是宝塔推荐的还是12,并且没有关于13的兼容情况说明,

所以还是使用12

腾讯云镜像有12的安装包  https://mirrors.cloud.tencent.com/debian-cd/

最小安装(无图形面板和其他所有附加件)

开启网络

sudo nano /etc/network/interfaces

添加下面内容(自动获取)

auto eth0

iface eth0 inet dhcp

如果要使用静态的添加下面文件

auto eth0

iface eth0 inet static

address 192.168.1.100 # 你的静态IP地址

netmask 255.255.255.0 # 子网掩码

gateway 192.168.1.1 # 网关地址

dns-nameservers 8.8.8.8 114.114.114.114 # DNS服务器地址,可设置多个

按Ctrl+X,然后按Y确认保存,然后按回车保存为原来的文件名

重启网络服务

sudo systemctl restart networking

测试一下看OK了么

ping www.baidu.com

安装ssh用来方便使用putty操作,可以比较方便的进行指令复制

检测有没有ssh(应该是没有的)

dpkg -l | grep openssh-server

安装ssh(要从安装盘里安装,第一个升级指令大概是没用)

sudo apt update

sudo apt install openssh-server

启动ssh

sudo systemctl start ssh

如果要设置开机启动的话(最好别这样)

sudo systemctl enable ssh

然后我们来变更源,之前的源的文件里就写了从安装盘更新

先打开源的列表文件

sudo nano /etc/apt/sources.list

把里面从安装盘更新的东西删掉换成中科大的

deb https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware
deb https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware
deb-src https://mirrors.ustc.edu.cn/debian-security/ bookworm-security main contrib non-free non-free-firmware

按Ctrl+X,然后按Y确认保存,然后按回车保存为原来的文件名

再来试下看可以使用了不

sudo apt update

让我们来安装宝塔使用ssh连接服务器

查看ip使用

ip addr

我们就不开启root的ssh了,先用普通用户的进去后  su root

然后粘贴宝塔的debian安装命令

修改访问地址,用户名和密码