一、debian11.9 安装
1.1、下载镜像,不要选择默认的网络镜像,选择那个3.5-4G的镜像,
debian-11.9.0-amd64
1.2、移除网络
把wifi或者网线断掉
1.3、快速安装
1.4、允许ssh通过root远程操作
vi /etc/ssh/sshd_config
找到#PermitRootLogin prohibit-password 【在33行附近】,添加
PermitRootLogin yes
1.5、插上网线,并配置静态IP
ip addr #查看当前IP
vi /etc/network/interfaces
在文件底部添加:xxxx为的网络号(我的是ens33)
静态ip
auto xxxxxx
iface xxxxxx inet static
address 192.168.239.140
netmask 255.255.255.0
gateway 192.168.239.2
1.6、关机、移除ISO、开机
二、阿里源配置
debian镜像_debian下载地址_debian安装教程-阿里巴巴开源镜像站 (aliyun.com)
三、debian sudo问题
apt install sudo
sudo usermod -aG sudo root
四、时间同步
hwclock --hctosys (将硬件-服务器的时间同步到系统里)
五、ssh工具--复制黏贴选中重影
echo "set enable-bracketed-paste off" >> ~/.inputrc
六、最好做镜像---debian更新
apt-get clean
apt update
apt upgrade -y
# 解决依赖
apt dist-upgrade
apt full-upgrade
reboot
七、postgresql安装时注意要安装下面两个东西
apt-get install -y gnupg
apt-get install -y gnupg2