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
相关推荐
心随_风动20 分钟前
SUSE Linux 发行版全面解析:从开源先驱到企业级支柱
linux·运维·开源
christine-rr43 分钟前
征文投稿:如何写一份实用的技术文档?——以软件配置为例
运维·前端·网络·数据库·软件构建
Altairr1 小时前
Docker基础(二)
运维·docker·容器
笑醉踏歌行1 小时前
NVM,Node.Js 管理工具
运维·ubuntu·node.js
西北大程序猿2 小时前
单例模式与锁(死锁)
linux·开发语言·c++·单例模式
酷爱码2 小时前
在 Linux 中修改 Apache HTTP Server(httpd)默认端口的完整指南
linux·http·apache
happyh h h h p p p p2 小时前
部署DNS从服务器
运维·服务器·网络
jiunian_cn2 小时前
【Linux】Linux权限
linux·服务器·mysql
betazhou2 小时前
有没有 MariaDB 5.5.56 对应 MySQL CONNECTION_CONTROL 插件
linux·数据库·mysql·oracle·mariadb
烟雨书信3 小时前
Linux中MySQL的逻辑备份与恢复
linux·运维·mysql