Ubuntu use overview

check ip address

c 复制代码
ip a
ls /etc/netplan/
sudo nano /etc/netplan/01-netcfg.yaml

Configure the Static IP

c 复制代码
network:
  version: 2
  renderer: networkd
  ethernets:
    enp0s3:
      dhcp4: no
      addresses:
        - 192.168.1.100/24
      gateway4: 192.168.1.1
      nameservers:
        addresses:
          - 8.8.8.8
          - 8.8.4.4

Apply the Configuration

c 复制代码
sudo netplan apply

check

ip a

Ubuntu config apt mirror on China

c 复制代码
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
vim /etc/apt/sources.list

replace to mirrors.tuna.tsinghua.edu.cn

tls install

c 复制代码
sudo apt update
sudo apt install openssl
sudo apt install nginx
sudo apt install certbot python3-certbot-nginx
sudo certbot --nginx
openssl genpkey -algorithm RSA -out server.key -pkeyopt rsa_keygen_bits:2048
openssl req -new -key server.key -out server.csr
openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
vim /etc/nginx/sites-available/default
server {
    listen 443 ssl;
    server_name your_domain.com;

    ssl_certificate /path/to/server.crt;
    ssl_certificate_key /path/to/server.key;

    # Other configurations...
}
sudo nginx -t
sudo systemctl reload nginx
相关推荐
网硕互联的小客服5 分钟前
Linux服务器磁盘应该如何合理分区?
linux·运维·服务器
楚识科技20 分钟前
合同比对全流程自动化:OCR识别+差异比对+法律风险字段抽取实战指南
运维·自动化·ocr
代码方舟33 分钟前
零信任架构实战:基于天远人企关联构建自动化供应链金融网关
运维·人工智能·架构·自动化
贵沫末1 小时前
Ubuntu——常用软件安装
linux·运维·ubuntu
Doraemomo2 小时前
Linux内核驱动开发——中断与定时器
linux·运维·驱动开发
2301_808414382 小时前
Linux中动静态库的理解
linux·运维·服务器
分布式存储与RustFS3 小时前
模型 checkpoint 放对象存储:分片上传、断点续传与残留清理
运维·云原生·开源·对象存储·分布式存储·s3·性能基准
M78佐菲3 小时前
ARM学习笔记(11)
linux·arm开发·笔记·嵌入式硬件·学习
M78佐菲3 小时前
ARM学习笔记(10)
linux·arm开发·笔记·嵌入式硬件·学习
半仙白桑4 小时前
内核篇第十五讲:system-V共享内存
linux·共享内存·shmget·shmat·shmdt·shmctl