================================================================= linux部署filebrowser2.31.2 ================================================================= #tar.gz安装包下载:https://github.com/filebrowser/filebrowser/releases/latest cd /usr/local/linux/filebrowser tar -xzvf linux-amd64-filebrowser.tar.gz #修改配置 相同命令可合并 ./filebrowser -d ./database/filebrowser.db config init ./filebrowser -d ./database/filebrowser.db config set --address 192.168.119.129 ./filebrowser -d ./database/filebrowser.db config set --port 8088 ./filebrowser -d ./database/filebrowser.db config set --locale zh-cn ./filebrowser -d ./database/filebrowser.db config set --log ../log/filebrowser.log ./filebrowser -d ./database/filebrowser.db users add admin admin --perm.admin ./filebrowser -d ./database/filebrowser.db config set --root /var/www/share ----------------------------------------------------------------- ------------------------redis开机自启动(方式一 仅参考)--------- ----------------------------------------------------------------- vim /etc/systemd/system/filebrowser.service ----------------------------------------------------------------- [Unit] Description=File Browser After=network.target [Service] ExecStart=/usr/local/linux/filebrowser/filebrowser -d /usr/local/linux/filebrowser/database/filebrowser.db [Install] WantedBy=multi-user.target ----------------------------------------------------------------- systemctl daemon-reload systemctl start filebrowser systemctl status filebrowser systemctl enable filebrowser reboot ----------------------------------------------------------------- ------------------------redis开机自启动(方式二 推荐)------------- ----------------------------------------------------------------- vim /usr/local/shell/filebrowser.sh ----------------------------------------------------------------- echo '正在启动filebrowser..' /usr/local/linux/filebrowser/filebrowser -d /usr/local/linux/filebrowser/database/filebrowser.db ----------------------------------------------------------------- #添加执行权限 chmod +x filebrowser.sh #测试 将执行结果输出到垃圾箱 并返回控制台 nohup /usr/local/shell/filebrowser.sh > /dev/null 2>&1 & ----------------------------------------------------------------- #将上述执行命令添加到/etc/rc.d/rc.local(多说一句/etc/rc.d/rc.local 与 /etc/rc.local是同一个文件) vim /etc/rc.d/rc.local #添加权限 chmod +x /etc/rc.d/rc.local #测试是否生效 sudo /etc/rc.local
标签:filebrowser,database,部署,-------------------------------------------------------- From: https://www.cnblogs.com/huakaiyoushi/p/18644773