Loading... # 安装与初始化 ## 配置root登录 参考:https://zhuanlan.zhihu.com/p/570235764 1. 设置root密码: ``` sudo passwd root ``` 2. 编辑`/etc/pam.d/gdm-password`和`/etc/pam.d/gdm-autologin` 注释如下行: ```bash auth required pam_succeed_if.so user != root quiet_success ``` 3. 编辑`/root/.profile` 注释掉或者删除行: ```bash mesg n 2> /dev/null || true ``` 插入新行: ```bash tty -s && mesg n || true ``` ## 配置root登录ssh-server 1. 安装`openssh` ```bash sudo apt install openssh-server ``` 2. 修改`/etc/ssh/sshd_config` 将: ```bash #PermitRootLogin prohibit-password ``` 改为: ```bash PermitRootLogin yes ``` 3. 重启ssh ```bash sudo systemctl restart ssh ``` ## 通过key登录SSH 参考:https://zhuanlan.zhihu.com/p/615109427 1. 在服务器制作秘钥对 ```bash ssh-keygen ``` 默认保存路径为:`/home/user/.ssh/id_rsa`或`/root/.ssh/id_rsa` 2. 在服务器安装公钥 ```bash cd ~/.ssh cat id_rsa.pub >> authorized_keys chmod 600 authorized_keys chmod 700 ~/.ssh ``` 3. 配置SSH,打开秘钥登录功能 编辑`/etc/ssh/sshd_config`,添加以下内容 ```bash RSAAuthentication yes PubkeyAuthentication yes ``` 重启SSH服务 ```bash service sshd restart ``` 4. 在客户端安装私钥 编辑`~/.ssh/config`文件 ```yaml Host {name} HostName {Remote Address} User {Remote Username} Port {Remote SSH port, default is 22} IdentityFile {private key location on localmachine} ``` ## 挂载磁盘 设置自动挂载 ``` sudo vim /etc/fstab ``` 在最后追加 ``` /dev/sdb1 /mnt/sdb1 ext4 defaults 1 2 ``` ## 安装Docker [Install Docker Desktop on Ubuntu | Docker Documentation](https://docs.docker.com/desktop/install/ubuntu/) # Alist ## Docker部署 ```bash docker run -d --restart=always -v /mnt/sdb1/alist:/opt/alist/data -p 5244:5244 -e PUID=0 -e PGID=0 -e UMASK=022 --name="alist" xhofe/alist:latest ``` # TMM ## Docker部署 ```bash docker run -d --name=tmm -v /mnt/sdb1/alist_mounted/baidu_netdisk:/media -v /mnt/sdb1/tmm/config:/config -p 5800:5800 dzhuang/tinymediamanager ``` 最后修改:2024 年 02 月 02 日 © 允许规范转载 赞 如果觉得我的文章对你有用,请随意赞赏