今天重新安装了NAS,其实就是一台DEBIAN 9的机器吧。
之所以不用OMV,一个是原因安装OMV后就没办法安装图形界面GUI(所以在安装OMV之前尽量不要安装诸如GNOME之类的GUI);另一方面就是没办法使用lnmp搭建vhost;此外,我的NAS并不是经常开机状态,开一段关一段一半一半吧。
我在OMV中使用较多的功能就是SAMBA以及ftp,transmission。实际上,sftp在Debian上可以直接安装,不需要借用OMV这个软介。
如何安装samba这个功能?
samba可以实现linux与windows之间的文件和多媒体共享。其实还是很简单的在百度或者google搜索一下就有了;主要是编辑一个参数文件”/etc/samba/smb.conf”
[global]
   workgroup = WORKGROUP
   dns proxy = no
   log file = /var/log/samba/log.%m
   max log size = 1000
   syslog = 0
   panic action = /usr/share/samba/panic-action %d
   server role = standalone server
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *Enter\snew\s*\spassword:* %n\n *Retype\snew\s*\spassword:* %n\n *password\supdated\ssuccessfully* .
   pam password change = yes
   map to guest = bad user
   usershare allow guests = yes
[homes]
   comment = Home Directories
   browseable = no
   read only = yes
   create mask = 0700
   directory mask = 0700
   valid users = %S
[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700
[public]
  comment = public anonymous access
  path = /mnt/3tb0/SHARE
  browsable =yes
  create mask = 0660
  directory mask = 0771
  writable = yes
  guest ok = yes
Transmission最好的办法是安装transmission daemon版本,这个带有webUI,可以方便上传种子文件;还有需要注意的一点settings.json白名单最好关闭掉或者将IP放入白名单进行操作;umask最好设置为0;否则会自动更新“rpc-password”;用户名和密码分贝对应“rpc-user”、“rpc-password”
nano /etc/transmission-daemon/settings.json
{
    "alt-speed-down": 50,
    "alt-speed-enabled": false,
    "alt-speed-time-begin": 540,
    "alt-speed-time-day": 127,
    "alt-speed-time-enabled": false,
    "alt-speed-time-end": 1020,
    "alt-speed-up": 50,
    "bind-address-ipv4": "0.0.0.0",
    "bind-address-ipv6": "::",
    "blocklist-enabled": false,
    "blocklist-url": "http://www.example.com/blocklist",
    "cache-size-mb": 4,
    "dht-enabled": true,
    "download-dir": "/mnt/3tb0/SHARE/nas-3tb/TDownloads",
    "download-limit": 100,
    "download-limit-enabled": 0,
    "download-queue-enabled": true,
    "download-queue-size": 5,
    "encryption": 1,
    "idle-seeding-limit": 30,
    "idle-seeding-limit-enabled": false,
    "incomplete-dir": "/mnt/3tb0/SHARE/nas-3tb/TDownloads",
    "incomplete-dir-enabled": false,
    "lpd-enabled": false,
    "max-peers-global": 200,
    "message-level": 1,
    "peer-congestion-algorithm": "",
    "peer-id-ttl-hours": 6,
    "peer-limit-global": 200,
    "peer-limit-per-torrent": 50,
    "peer-port": 51413,
    "peer-port-random-high": 65535,
    "peer-port-random-low": 49152,
    "peer-port-random-on-start": false,
    "peer-socket-tos": "default",
    "pex-enabled": true,
    "port-forwarding-enabled": false,
    "preallocation": 1,
    "prefetch-enabled": true,
    "queue-stalled-enabled": true,
    "queue-stalled-minutes": 30,
    "ratio-limit": 2,
    "ratio-limit-enabled": false,
    "rename-partial-files": true,
    "rpc-authentication-required": true,
    "rpc-bind-address": "0.0.0.0",
    "rpc-enabled": true,
    "rpc-host-whitelist": "",
    "rpc-host-whitelist-enabled": true,
    "rpc-password": "{9eff444a9d738c021c6c98f650a421eeeeea166dhV1S1qir",
    "rpc-port": 9091,
    "rpc-url": "/transmission/",
    "rpc-username": "mtsky",
    "rpc-whitelist": "127.0.0.1",
    "rpc-whitelist-enabled": false,
    "scrape-paused-torrents-enabled": true,
    "script-torrent-done-enabled": false,
    "script-torrent-done-filename": "",
    "seed-queue-enabled": false,
    "seed-queue-size": 10,
    "speed-limit-down": 100,
    "speed-limit-down-enabled": false,
    "speed-limit-up": 100,
    "speed-limit-up-enabled": false,
    "start-added-torrents": true,
    "trash-original-torrent-files": false,
    "umask": 0,
    "upload-limit": 100,
    "upload-limit-enabled": 0,
    "upload-slots-per-torrent": 14,
    "utp-enabled": true
}