首页 > 其他分享 >debian12 系统初始化

debian12 系统初始化

时间:2023-07-28 22:44:50浏览次数:36  
标签:初始化 non 系统 free vim etc tencent debian12 main

更改apt源

根据自己的实际情况进行修改,腾讯/阿里云/华为云/中科大/清华源都可以

vi /etc/apt/sources.list ,清除原来的内容,写入下面内容

deb https://mirrors.cloud.tencent.com/debian/ bookworm main contrib non-free non-free-firmware
deb-src https://mirrors.cloud.tencent.com/debian/ bookworm main contrib non-free non-free-firmware
deb https://mirrors.cloud.tencent.com/debian/ bookworm-updates main contrib non-free non-free-firmware
deb-src https://mirrors.cloud.tencent.com/debian/ bookworm-updates main contrib non-free non-free-firmware
deb https://mirrors.cloud.tencent.com/debian/ bookworm-backports main contrib non-free non-free-firmware
deb-src https://mirrors.cloud.tencent.com/debian/ bookworm-backports main contrib non-free non-free-firmware
deb https://mirrors.cloud.tencent.com/debian-security bookworm-security main contrib non-free non-free-firmware
deb-src https://mirrors.cloud.tencent.com/debian-security bookworm-security main contrib non-free non-free-firmware

安装基础包

apt install vim curl wget tar unzip zip htop lsof iotop iftop nload net-tools telnet chrony sudo resolvconf -y

配置时间同步

cat > /etc/chrony/sources.d/public-ntp-server.sources  <<EOF
server ntp.tencent.com iburst
server ntp.aliyun.com   iburst
EOF
systemctl restart chrony && systemctl enable chrony

调整vim

  • 启用鼠标复制粘贴
cat > /etc/vim/vimrc.local <<EOF
source \$VIMRUNTIME/defaults.vim
let skip_defaults_vim = 1
if has('mouse')
    set mouse=r
endif
EOF
  • 修改vim编辑方式, vim /etc/vim/vimrc.tiny
set nocompatible
set backspace=2
  • 关闭vim编辑自动缩进,vim /usr/share/vim/vim90/defaults.vim, 使用"注释如下行
" filetype plugin indent on

调整内核参数和limit参数

cat > /etc/sysctl.conf <<EOF
net.core.netdev_max_backlog = 32768
net.core.rmem_default = 8388608
net.core.somaxconn = 32768
net.core.wmem_default = 8388608
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1
net.ipv4.ip_forward = 1
net.ipv4.conf.all.arp_ignore = 0
net.ipv4.conf.lo.arp_announce = 0
net.ipv4.conf.lo.arp_ignore = 0
net.ipv4.ip_local_port_range = 5000 65000
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_keepalive_probes = 3
net.ipv4.tcp_keepalive_time = 300
net.ipv4.tcp_max_orphans = 3276800
net.ipv4.tcp_max_syn_backlog = 65536
net.ipv4.tcp_max_tw_buckets = 5000
net.ipv4.tcp_mem = 94500000 915000000 927000000
net.ipv4.tcp_syn_retries = 2
net.ipv4.tcp_synack_retries = 2
net.ipv4.tcp_syncookies = 1
net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_tw_reuse = 1
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.default.send_redirects = 0
net.ipv4.conf.all.secure_redirects = 0
net.ipv4.conf.default.secure_redirects = 0
net.ipv4.conf.all.accept_redirects = 0
net.ipv4.conf.default.accept_redirects = 0
net.ipv4.neigh.default.gc_thresh1 = 2048
net.ipv4.neigh.default.gc_thresh2 = 4096
net.ipv4.neigh.default.gc_thresh3 = 8192
net.core.wmem_max = 327679
net.core.rmem_max = 327679
fs.file-max = 1000000
fs.inotify.max_queued_events = 327679
fs.inotify.max_user_watches = 10000000
kernel.unknown_nmi_panic = 0
kernel.shmmax = 68719476736
kernel.shmall = 4294967296
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.sysrq = 1
vm.swappiness = 10
vm.max_map_count = 655360
vm.overcommit_memory = 1

EOF

调整limit参数

cat >> /etc/security/limits.conf <<EOF
*          hard    core      0
*          soft    nproc     65535
*          hard    nproc     65535
*          soft    nofile    65535
*          hard    nofile    65535
root       soft    nproc     unlimited
EOF

修改网卡序号

修改网卡序号为 eth0

vim /etc/default/grub 修改GRUB_CMDLINE_LINUX

GRUB_CMDLINE_LINUX="net.ifnames=0 biosdevname=0"

更新grub

update-grub

vim /etc/network/interfaces 修改文件内容中的网卡名称,全部改为eth0

标签:初始化,non,系统,free,vim,etc,tencent,debian12,main
From: https://www.cnblogs.com/zhaojli/p/17589051.html

相关文章

  • 系统设计蓝图指南
    系统设计蓝图指南    我们有时敏捷软件开发过程,系统设计采用一张纸,如下图供参考图例DNS接上面,APP或用户请求与响应,分页,过期头,Gzip,幂等性设计负载均衡,API网关,访问日志,CDN,服务伸缩,通用扇出服务《系统设计蓝图指南》源文件PDF在:链接:https://pan.baidu.com/s/1sNcvVKb05Y75yL-......
  • [回馈]ASP.NET Core MVC开发实战之商城系统(三)
    经过一段时间的准备,新的一期【ASP.NETCoreMVC开发实战之商城系统】已经开始,在之前的文章中,讲解了商城系统的整体功能设计,页面布局设计,环境搭建,系统配置,及首页【商品类型,banner条,友情链接,降价促销,新品爆款】等功能的开发,今天继续讲解商品列表页面功能开发,仅供学习分享使用,如有不......
  • 开源了一套wms系统,支持lodop和网页打印入库单、出库单。
    若依wms简介若依wms是一套基于若依的wms仓库管理系统,支持lodop和网页打印入库单、出库单。毫无保留给个人及企业免费使用。前端采用Vue、ElementUI(antdesign正在开发中)。后端采用SpringBoot、SpringSecurity、Redis&Jwt。权限认证使用Jwt,支持多终端认证系统。支持加载动态权......
  • Centos 系统开通后修改数据盘挂载目录 /home 改到 /www
    1. df-h 查看数据盘挂载信息/dev/mapper/cs_s210981-home 345G 2.5G 343G  1%/home 2、umount/home->取消当前数据盘/dev/vdb1挂载,使用命令umount/home 3,将/dev/vdb1挂载到/www目录,使用命令mount/dev/vdb1/wwwmount/dev/mapper/cs_s210981-h......
  • 互联网医院申办|线上问诊系统|互联网医院系统
    随着互联网的快速发展,各行各业都在积极探索如何将互联网与自身服务相结合,实现数字化转型。互联网医院建设分院内与院外建设,院内建设是业务流程的优化过程,是系统改造的过程,是医院精细化运营的一部分,也是实现医院管理智慧化和现代化的关键,下面小编就给大家介绍下互联网医院系统。1、......
  • Android图形系统之Surface、Surfac…
    1、SurfaceSurfaceextendsObjectimplementsParcelableClassOverviewHandleontoarawbufferthatisbeingmanagedbythescreencompositor.简单翻译:Surface是原始图像缓冲区(rawbuffer)的一个句柄,而原始图像缓冲区是由屏幕图像合成器(screencompositor)管理的。java.lan......
  • 多功能表校验仪TD1850多用表校准系统
    参考标准分类标准名称国家标准GB/T13978-2008数字多用表GB/T15637-2012数字多用表校准仪通用规范计量法规JJF1075-2015钳形电流表校准规范JJF1284-2011交直流电表校验仪校准规范JJF1587-2016数字多用表校准规范JJG124-2005电流表、电压表、功率表及电阻表检......
  • 宝塔部署 node 修改系统环境变量 路径
     yum-yupdateyum-yinstallgccgcc-c++epel-releasevimtarwgetzipunziplrzsznet-toolsyuminstall-ywget&&wget-Oinstall.shhttps://download.bt.cn/install/install_6.0.sh&&shinstall.shed8484bec【php】安装fileninfo、mcrypt【......
  • 三用表校准仪TD1850多用表校准系统
    三用表校准仪TD1850适用于校准三位半数字多用表,0.2级及以下的交直流电压表、交直流电流表、电阻表,0.01级及以下的频率表。直流电压标准源(DCV)输出范围:20mV~1100V直流电流标准源(DCI)输出范围:2μA~22A或33A交流电压标准源(ACV)输出范围:20mV~1100V、45Hz~1100......
  • 电子病历归档管理系统标准化实施
     总体设计   01404......