新装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
相关推荐
春生野草41 分钟前
腾讯云部署gitlab
运维·centos·gitlab
dessler1 小时前
MYSQL-数据库介绍
linux·运维·mysql
Garc1 小时前
linux Debian 12 安装 Docker(手动)
linux·docker·debian
苦逼IT运维1 小时前
Kubernetes 双层 Nginx 容器环境下的 CORS 问题及解决方案(极端情况)
运维·nginx·容器·kubernetes·jenkins·运维开发·ci
kaoa0002 小时前
Linux入门攻坚——52、drbd - Distribute Replicated Block Device,分布式复制块设备-1
linux·运维·服务器
林九生2 小时前
【Debian】离线 Debian 系统如何正确设置东八区(Asia/Shanghai)时间
运维·debian
啊略略wxx2 小时前
嵌入式Linux面试题目
linux·运维·服务器
半桔2 小时前
【IO多路转接】深入解析 poll:从接口到服务器实现
linux·运维·服务器·php
xx.ii2 小时前
k8s:service资源详解
运维·网络·容器·kubernetes
hello_2502 小时前
Shell脚本高效编写技巧
运维·shell