Debian常用配置
发表于|更新于|基础运维
|浏览量:
这里以 Debian12 为例
修改国内源
1 | sed -i 's@//.*debian.org@//mirrors.ustc.edu.cn@g' /etc/apt/sources.list |
配置网络
vim /etc/network/interfaces
固定 ip 配置
1 | auto enp0s3 |
DHCP 配置
1 | iface enp0s3 inet dhcp |
重启网络服务
1 | sudo systemctl restart networking.service |
文章作者: 张理坤
版权声明: 本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来源 杂烩饭!
相关推荐
2026-04-29
安卓终端工具termux常用操作记录
termux 是安卓平台模拟 linux 环境的工具,可以运行常用的 linux 工具 常用配置12345678# 修改软件源termux-change-repo# home目录添加storage, 可以访问手机里的文件termux-setup-storage# 修复shebangtermux-fix-shebang 修改用户环境变量1234cat > ~/.profile <<-'EOF'alias ll='ls -al'alias l='ls -l'EOF 虚拟根目录1cd $PREFIX 安装 zsh 暂时有 bug, 导致 nodejs 程序运行提示 找不到 env, 可以执行 termux-fix-shebang 临时解决 1sh -c "$(curl -fsSL https://github.com/Cabbagec/termux-ohmyzsh/raw/master/install.sh)" 登录提示语1vim $PREFIX/etc/motd 可以配...
2025-12-20
git常用操作记录
配置文件查看 GIT 本地配置1git config --list 编辑 git 配置文件1git config --global --edit 设置 GIT 用户信息12git config --global user.name "zhanglikun"git config --global user.email "iuxt@qq.com" git 记住密码1git config --global credential.helper store 配置文件 ~/.gitconfig 内容12345[user] name = zhanglikun email = iuxt@qq.com[credential] helper = store 忽略追踪文件权限 建议 windows 代码使用 1git config core.filemode false 分支管理 命令 作用 git branch -a 查看所有分支 git branch -r 查看远程分支 git fet...
2025-08-10
使用kubeadm部署一套高可用k8s集群1.21 for Ubuntu
基于 ubuntu 使用 kubeadm 搭建集群, centos部署文档, 有疑问的地方可以看 官方文档 准备机器 我的机器详情如下, 配置至少为 4C4G hostname IP 作用 public 10.0.0.3 ingress、apiserver 负载均衡,nfs 存储 master1 10.0.0.11 k8s master 节点 master2 10.0.0.12 k8s master 节点 master3 10.0.0.13 k8s master 节点 worker1 10.0.0.21 k8s worker 节点 worker2 10.0.0.22 k8s worker 节点 每台机器都做域名解析,或者绑定 hosts(可选但建议) 123456vim /etc/hosts10.0.0.3 public kube-apiserver10.0.0.11 master110.0.0.12 master210.0.0.13 master3 基础环境配置 基础环境是不管 master 还是 worker 都需要的环境 禁...
2026-04-29
Linux里安装crontab并运行
常见的 linux 发行版都自带了 crontab 服务, 但是我们常用的容器镜像是没有的, 不要问我为什么要在容器里运行 crontab…Linux定时执行任务crontabLinux的crontab无法执行的一些问题 CentOS/RedHat 系列安装1yum install -y cronie 配置文件位置后面的 root 是用户名 1/var/spool/cron/root 启动命令12345# 后台运行crond# 前台运行crond -f Ubuntu/Debian 系列安装1sudo apt-get install -y cron 配置文件位置后面的 root 是用户名 1/var/spool/cron/crontabs/root 启动命令12345# 后台运行cron# 前台运行cron -f Alpine安装官方镜像自带了 配置文件位置后面的 root 是用户名 1/etc/crontabs/root 启动命令12345# 前台运行crond -f# 后台运行crond
2026-04-29
WSL2 - Ubuntu配置记录
WSL 防火墙规则123Get-NetAdapterNew-NetFirewallRule -DisplayName "WSL" -Direction Inbound -InterfaceAlias "vEthernet (WSL)" -Action Allow 基础环境配置更换源使用中科大的源: https://mirrors.ustc.edu.cn/help/ubuntu.html 12345# 老版本Ubuntu# sudo sed -i 's@//.*.ubuntu.com@//mirrors.ustc.edu.cn@g' /etc/apt/sources.list# Ubuntu 24 及以上sudo sed -i 's@//.*.ubuntu.com@//mirrors.ustc.edu.cn@g' /etc/apt/sources.list.d/ubuntu.sources 安装常用的包12sudo apt update && sudo apt upgrade -...
2026-04-29
Linux的ulimit限制
临时设置 命令 说明 ulimit -a 查看所有限制值 ulimit -n 65535 临时调整 open files 限制值 永久设置配置文件:/etc/security/limits.conf Ubuntu和DebianCentOS和Fedora12345678* soft nofile 65535* hard nofile 65535* hard nproc 65535* soft nproc 65535root soft nofile 65535root hard nofile 65535root hard nproc 65535root soft ...
评论
公告
此博客为我记录运维工作总结所用,供网友阅读参考,如有侵权,请通知我,我会核实后进行处理。
欢迎加入技术交流群:
