侧边栏壁纸
  • 累计撰写 4 篇文章
  • 累计收到 3 条评论

Debian笔记

debian12 阿里源

cat /etc/apt/sources.list

#deb cdrom:[Debian GNU/Linux 12.2.0 _Bookworm_ - Official amd64 DVD Binary-1 with firmware 20231007-10:29]/ bookworm main non-free-firmware

deb https://mirrors.aliyun.com/debian/ bookworm main contrib non-free non-free-firmware
# deb-src https://mirrors.aliyun.com/debian/ bookworm main contrib non-free non-free-firmware

deb https://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free non-free-firmware
# deb-src https://mirrors.aliyun.com/debian/ bookworm-updates main contrib non-free non-free-firmware

deb https://mirrors.aliyun.com/debian/ bookworm-backports main contrib non-free non-free-firmware
# deb-src https://mirrors.aliyun.com/debian/ bookworm-backports main contrib non-free non-free-firmware

deb https://mirrors.aliyun.com/debian-security bookworm-security main contrib non-free non-free-firmware
# deb-src https://mirrors.aliyun.com/debian-security bookworm-security main contrib non-free non-free-firmware

# deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware
# # deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware

改控制台终端字体

debian12默认纯命令行终端很难看,改字体

dpkg-reconfigure -plow console-setup
1、选择UTF-8
2、Guess optimal character set
3、Do not change the boot/kernel font
回车,然后重启系统,校验。

必装软件

apt update
#apt upgrade
apt install command-not-found  sudo -y
apt install vim htop  -y 
apt install netcat-openbsd htop wget curl mtr nmap tcpdump bind9-utils lrzsz rsync -y
apt install sysstat iftop  iotop lsof strace -y
apt install  unzip unrar-free dos2unix tree tmux screen -y
apt install nginx php php-fpm nodejs python3-pip redis-server -y
apt install composer  docker-compose -y 
apt install inotify-tools -y
apt install fail2ban  -y
apt install php-mysql  php-curl php-zip php-xml php-gd php-mbstring php-bcmath php-soap php-ldap php-oauth php-redis php-yaml -y 
apt install python3-certbot-nginx  certbot

cd /usr/local/src/
wget -S "https://repo.mysql.com//mysql-apt-config_0.8.28-1_all.deb"
dpkg -i  mysql-apt-config_0.8.28-1_all.deb
apt update

安装docker-ce

# Add Docker's official GPG key:
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg

# Add the repository to Apt sources:
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin  -y
 apt install docker-compose -y

移除无用的旧ssh主机指纹记录
ssh-keygen -f "/root/.ssh/known_hosts" -R "192.168.137.3"

Debian12安装mysql5.7

1、
wget https://dev.mysql.com/get/mysql-apt-config_0.8.18-1_all.deb
2、
sudo dpkg -i mysql-apt-config_0.8.18-1_all.deb
3、

4、sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29
5、apt update
6、apt install -y mysql-community-server
弹出框中输入密码即可
systemctl restart mysql 
systemctl enable mysql
0

评论 (1)

  1. 头像
    清阳 作者
    Windows 10 · Google Chrome
    @

    表情表情表情表情

    回复
取消

本站由提供CDN加速/云存储服务