新装debian常用操作

时间ntp

bash 复制代码
apt-get update
apt-get install ntp
#编辑配置
nano /etc/ntp.conf

填写内容如下:

bash 复制代码
server your-ntp-server
#(可选)如果您的网络中有本地的 NTP 服务器,您可以添加以下行以使用本地服务器
server your-local-ntp-server iburst
#重启
systemctl restart ntp
#检查 NTP 服务器的状态
systemctl status ntp
#检查系统时间和同步状态
date

安装 OpenSSH 服务器

bash 复制代码
sudo apt update
sudo apt install openssh-server
sudo systemctl status ssh

#要确保 SSH 服务器在系统启动时自动启动,可以运行以下命令:
sudo systemctl enable ssh

设置固定ip

bash 复制代码
sudo nano /etc/network/interfaces

配置如下 eht1更具需要修改

iface eth1 inet static

address your_static_ip

netmask your_subnet_mask

gateway your_gateway_ip

dns-nameservers your_dns_server_ip

重启网卡

bash 复制代码
sudo systemctl restart networking
相关推荐
甲鱼9297 小时前
MySQL 实战手记:日志管理与主从复制搭建全指南
运维
碳基沙盒2 天前
OpenClaw 多 Agent 配置实战指南
运维
蝎子莱莱爱打怪5 天前
Centos7中一键安装K8s集群以及Rancher安装记录
运维·后端·kubernetes
DianSan_ERP6 天前
电商API接口全链路监控:构建坚不可摧的线上运维防线
大数据·运维·网络·人工智能·git·servlet
呉師傅6 天前
火狐浏览器报错配置文件缺失如何解决#操作技巧#
运维·网络·windows·电脑
不是二师兄的八戒6 天前
Linux服务器挂载OSS存储的完整实践指南
linux·运维·服务器
欧云服务器6 天前
怎么让脚本命令可以同时在centos、debian、ubuntu执行?
ubuntu·centos·debian
zhangfeng11336 天前
趋动云 如何ssh登录 服务区 项目server
运维·人工智能·ssh
ZeroNews内网穿透6 天前
谷歌封杀OpenClaw背后:本地部署或是出路
运维·服务器·数据库·安全
失重外太空啦6 天前
nginx
运维·nginx