ubuntu 20.04安装docker+宝塔+smb挂载群晖文件到mnt目录
听说centos8今年底停止维护 centos7 2024年停止维护,因此尝试安装ubuntu,并且安装docker,宝塔,
smb挂载群晖目录到ubuntu目录,后续用宝塔建站的时候,默写应用会用到。嘻嘻。
## 安装环境ubuntu 20.04
### 安装docker
### 卸载旧版
### 支持的ubuntu版本
Ubuntu Impish 21.10
Ubuntu Hirsute 21.04
Ubuntu Focal 20.04 (LTS)
Ubuntu Bionic 18.04 (LTS)
卸载旧版docker命令
sudo apt-get remove docker docker-engine docker.io containerd runc
安装
Update the apt package index and install packages to allow apt to use a repository over HTTPS:
sudo apt-get update
sudo apt-get install
ca-certificates
curl
gnupg
lsb-release
Add Docker’s official GPG key:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Use the following command to set up the stable repository. To add the nightly or test repository, add the word nightly or test (or both) after the word stable in the commands below. Learn about nightly and test channels.
echo
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
Install Docker Engine
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io
测试
sudo docker run hello-world
来自docker官方文档点我跳转
安装宝塔官方7.7
试验性Centos/Ubuntu/Debian安装命令 独立运行环境(py3.7) 可能存在少量兼容性问题 不断优化中
curl -sSO http://download.bt.cn/install/install_panel.sh && bash install_panel.sh
Ubuntu/Deepin安装命令
wget -O install.sh http://download.bt.cn/install/install-ubuntu_6.0.sh && sudo bash install.sh
smb挂载群晖文件到mnt目录
临时挂载
mount -t cifs //192.168.1.100/LSZ/ /mnt -o vers=2.0,username=admin,password=87814721
开机自动挂载
修改权限
cd /etc
sudo chmod 666 fstab
sudo pluma fstab
编辑fstab文件
添加代码//192.168.1.100/LSZ/ /mnt cifs defaults,username=admin,password=87814721,iocharset=utf8,vers=1.0
即//远程地址/远程目录/ /本地目录 cifs defaults,username=用户名,password=密码,iocharset=utf8,vers=1.0
重启以后,可以看到开机自动挂载成功
总结
(这里你可以分几点来说说商品的优点、缺点,这样能够更快速明了地帮助到值友们)