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
相关推荐
2501_9418008836 分钟前
Python高性能日志分析与Elasticsearch实战分享:海量日志索引、检索与可视化优化经验
运维·jenkins
hlsd#40 分钟前
我把自己的小米ax3000t换成了OpenWRT
linux·iot
不想画图42 分钟前
Linux——web服务介绍和nginx编译安装
linux·nginx
CIANTECH_Heidi1 小时前
精准配置重构光模块成本效能:深圳光特通信1X9、SFP单收/单发光模块
运维·服务器·网络·数据库·光模块
2301_807583231 小时前
ubuntu22.04集群部署clickhouse详细步骤
linux·clickhouse·zookeeper
尹蓝锐1 小时前
Linux解压各种压缩包命令
linux·运维·服务器
叫致寒吧2 小时前
web和Nginx的搭建
运维·nginx
z***I3943 小时前
Docker书籍
运维·docker·容器
小嘟嘟26793 小时前
Linux-奇怪的No such file or directory
linux·运维·服务器
shizhan_cloud3 小时前
iSCSI 服务器
linux·运维