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
相关推荐
hsjcjh10 分钟前
Nodemailer使用教程:在Node.js中发送电子邮件
linux·运维·node.js
没有梦想的咸鱼185-1037-16631 小时前
北斗高精度数据解算:破解城市峡谷/长基线/无网区难题,从毫米级定位到自动化交付——(GAMIT/GLOBK底层核心解算技术方法)
运维·arcgis·数据分析·自动化
不怕犯错,就怕不做1 小时前
linux 如何查看自己的帐号密码及samba的帐号和密码
linux·运维·服务器
实在智能RPA1 小时前
Agent 在物流行业能实现哪些自动化?——深度拆解 AI Agent 驱动的智慧物流新范式
运维·人工智能·ai·自动化
地下核武1 小时前
Ubuntu 24.04 在线安装 Qt 6.10.2 后 Qt Creator 无法启动问题记录与解决
linux·qt·ubuntu
张3232 小时前
Linux 启动过程
linux·运维
三万棵雪松2 小时前
【Linux 物联网网关主控系统-Linux主控部分(二)】
linux·嵌入式linux
chinesegf2 小时前
ubuntu建虚拟环境制作docker容器
linux·ubuntu·docker
Stack Overflow?Tan902 小时前
标注软件labelImg在linux下鼠标滚轮闪退解决办法
linux·labelimg