修改网络设置
cd /etc/netplan
network:
version: 2
renderer: networkd
ethernets:
eth0:
dhcp4: no
addresses:
- 192.168.3.100/24
routes:
- to: default
via: 192.168.3.99
nameservers:
addresses: [192.168.3.99]
更换源
路径: /etc/apt/sources.list
deb https://mirrors.aliyun.com/ubuntu-ports/ noble main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu-ports/ noble main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu-ports/ noble-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu-ports/ noble-security main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu-ports/ noble-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu-ports/ noble-updates main restricted universe multiverse
# deb https://mirrors.aliyun.com/ubuntu-ports/ noble-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu-ports/ noble-proposed main restricted universe multiverse
deb https://mirrors.aliyun.com/ubuntu-ports/ noble-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu-ports/ noble-backports main restricted universe multiverse
更新
sudo apt-get update
sudo apt-get dist-upgrade
安装docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
安装docker-compose
下载Docker Compose的可执行文件。可以使用以下命令下载最新版本:
sudo curl -L "https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
下载缓慢可以使用国内代理服务下载:
sudo curl -L "https://ghproxy.com/https://github.com/docker/compose/releases/latest/download/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
如果要安装特定版本的Docker Compose,请将上述命令中的
latest
替换为所需的版本号。赋予可执行权限给下载的二进制文件:
sudo chmod +x /usr/local/bin/docker-compose
创建一个符号链接,将
docker-compose
命令链接到/usr/bin
目录,以便可以全局访问:sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
验证安装是否成功。运行以下命令,查看Docker Compose版本信息:
docker-compose --version
安装samba
samba无法访问检查
检查配置
开放共享目录权限
防火墙
关闭防火墙: systemctl stop firewalld.service 开启防火墙: systemctl start firewalld.service 关闭开机启动: systemctl disable firewalld.service 开启开机启动: systemctl enable firewalld.service
确保setlinux关闭
临时关闭
setenforce 0
彻底禁用
在 /etc/sysconfig/selinux 或者 /etc/grub.conf 中添加selinux=0