1. FileBrowser-arm64版本下载
2. 解压
将文件解压到/usr/local/filebrowser
文件夹下
3. 新建配置文件
在filebrowser
文件夹下新建config.json
配置文件,加入以下内容:
{
"port": 8600,
"address": "0.0.0.0",
"root": "/mnt/sda1",
"database": "/usr/local/filebrowser/filebrowser.db",
"log": "/var/log/filebrowser.log",
"username": "admin"
}
4. 设置开机自启并用systemd(systemctl)控制
vi /etc/systemd/system/filebrowser.service
写入以下内容:
[Unit]
Description=The filebrowser Process Manager
After=network.target
[Service]
Type=simple
ExecStart=/usr/local/filebrowser/filebrowser -c /usr/local/filebrowser/config.json
ExecStop=/bin/killall filebrowser
PrivateTmp=true
[Install]
WantedBy=multi-user.target
然后就可以使用systemctl控制filebrowser了
systemctl start filebrowser
systemctl status filebrowser
systemctl enable filebrowser
浏览器访问 ip:8600
网友评论