标签:set work sudo load code ethernet systemd usr uname
sudo curl -L "https://github.com/docker/compose/releases/download/1.25.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
docker-compose --version
vi /etc/netplan/50-cloud-init.yaml
#
network:
ethernets:
ens33:
address: [192.168.255.132/24]
gateway4: 192.168.255.2
nameservers:
address: [192.168.255.2]
version: 2
#生效
netplan apply
vi /etc/cloud/cloud.cfg
#允许更改主机名生效
preserve_hostname: true
# 设置hostname
hostnamectl set-hostname deployment
#查看
hostnamectl
#配置hosts
cat >> /etc/hosts <<EOF
192.168.255.132 deployment
EOF
vi /etc/systemd/resolved.conf
#
[Resolve]
DNS=114.114.114.114
#创建/usr/local/docker/tomcat
#创建docker-compose.yml
version: '3.1'
services:
tomacat:
restart: always
image: tomcat
container_name: tomcat
ports:
- 8080:8080
标签:set work sudo load code ethernet systemd usr uname
原文地址:https://www.cnblogs.com/zhouyu0-0/p/12043522.html