欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

文件服務(wù)器?File?Browser安裝配置詳解

 更新時(shí)間:2022年11月30日 10:42:23   作者:漠里  
這篇文章主要為大家介紹了文件服務(wù)器?File?Browser安裝配置詳解,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進(jìn)步,早日升職加薪

前言

一直想部署一套文件服務(wù)器,供隊(duì)友之間相互傳輸文件。平時(shí)用微信發(fā)送文件真的太煩了,每發(fā)送或者接收一次都會(huì)有一個(gè)新的文件,造成重復(fù)文件太多了。文件服務(wù)器統(tǒng)一管理,自己需要什么文件再下載。

前面也安裝過(guò),是想使用 ftp ,安裝了 vsftpd,配置也都成功,服務(wù)也啟動(dòng)了,可是訪問(wèn)一直有問(wèn)題,而且查了下,有些使用工具有些是通過(guò)瀏覽器。實(shí)際的效果也并不好。這令天又特意搜索了下文件服務(wù)器的部署問(wèn)題,看到了 File Browser,通過(guò)官網(wǎng)部署了一套,其相比之下有以下優(yōu)點(diǎn):

1、部署簡(jiǎn)單,配置文件、數(shù)據(jù)庫(kù)(單文件數(shù)據(jù)庫(kù) Bolt DB)等都可一鍵配置;

2、可視化操作,界面簡(jiǎn)潔、操作簡(jiǎn)單,適用人群廣(前臺(tái)小姐姐也可快速上手啦);

3、可使用 shell;

File Browser

一、安裝配置

1、一鍵安裝

官方給的有一鍵安裝命令行:

curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash filebrowser -r /path/to/your/files

如果自己的網(wǎng)絡(luò)不好的話,可以自行到官網(wǎng)下載壓縮包文件。

2、下載解壓

到 GitHub 上面下載:下載地址,根據(jù)自己系統(tǒng)等下載對(duì)應(yīng)版本。

下載到對(duì)應(yīng)目錄后,解壓即可。只要一個(gè)二進(jìn)制的文件 filebrowser,可以改名,也可以不改名。后面有些執(zhí)行需要用到這個(gè),不改名直接用 filebrowser。

3、配置

雖然官方給的說(shuō)明是,解壓后就可以直接使用。這里還是介紹下一些基本配置。

創(chuàng)建配置文件,并編輯內(nèi)容:

# 創(chuàng)建日志文件、配置文件
touch /home/WebFile/WebFile.log
touch /home/WebFile/WebFile.json
# 編輯配置文件,下面代碼直接執(zhí)行即可
cat > /home/WebFile/WebFile.json <<EOF
{
"address": "0.0.0.0",
"port": 10001,
"database": "/home/WebFile/WebFile.db",
"log": "/home/WebFile/WebFile.log",
"locale": "zh-cn",
"username": "ADMIN",
"password": "ADMIN@2022",
"root": "/",
"scope": "/"
}
EOF

數(shù)據(jù)庫(kù)初始化和配置

# 創(chuàng)建數(shù)據(jù)庫(kù),并配置,每執(zhí)行一句,會(huì)打印出數(shù)據(jù)庫(kù)配置信息,對(duì)配置的信息會(huì)更新
/home/WebFile/filebrowser -d /home/WebFile/WebFile.db config init
# 設(shè)置地址
/home/WebFile/filebrowser -d /home/WebFile/WebFile.db config set --address 0.0.0.0
# 設(shè)置端口
/home/WebFile/filebrowser -d /home/WebFile/WebFile.db config set --port 10001
# 設(shè)置語(yǔ)言
/home/WebFile/filebrowser -d /home/WebFile/WebFile.db config set --locale zh-cn
# 設(shè)置日志文件路徑
/home/WebFile/filebrowser -d /home/WebFile/WebFile.db config set --log /home/WebFile/WebFile.log
# 添加用戶,并賦管理員權(quán)限,設(shè)置可查看范圍
/home/WebFile/filebrowser -d /home/WebFile/WebFile.db users add zksy zksy@2022 --perm.admin --scope /

到這里全部的配置都完成了,啟動(dòng)服務(wù)后就可以看到可視化界面。

4、創(chuàng)新系統(tǒng)管理服務(wù)

使用命令行可以直接啟動(dòng)服務(wù)(如下命令行)。

filebrowser -c WebFile.json

但是每次啟動(dòng)挺麻煩,下面就從添加到系統(tǒng)服務(wù),并設(shè)置開(kāi)機(jī)自啟動(dòng)。

# 創(chuàng)建 Systemd 系統(tǒng)管理服務(wù),創(chuàng)建服務(wù)文件
cat > /etc/systemd/system/WebFile.service <<EOF
[Unit]
Description=WebFile
Documentation=https://filebrowser.org/
After=network.target
[Service]
ExecStart=/home/WebFile/filebrowser -c /home/WebFile/WebFile.json
[Install]
WantedBy=multi-user.target
EOF

有了系統(tǒng)配置文件,第一步要做的就是下面幾部:

# 有了新的服務(wù)文件,需要重啟 Systemd 服務(wù)
systemctl daemon-reload
# 設(shè)置開(kāi)機(jī)自啟動(dòng)
systemctl enable WebFile

后面就是對(duì)服務(wù)的一些基本操作:?jiǎn)?dòng)、狀態(tài)、停止等

# 啟動(dòng)WebFile服務(wù)
systemctl start WebFile
# 查看WebFile服務(wù)狀態(tài)
systemctl status WebFile
# 停止WebFile服務(wù)
systemctl stop WebFile
# 取消WebFile服務(wù)開(kāi)機(jī)自啟動(dòng)
systemctl disable WebFile

二、使用

啟動(dòng)服務(wù)后,在瀏覽器打開(kāi) File Browser 的界面:

界面比較簡(jiǎn)單,左側(cè)菜單,右上角是工具欄:

“設(shè)置”界面可以對(duì)用戶、目錄等進(jìn)行設(shè)置。下面是管理員的設(shè)置界面,操作都比較簡(jiǎn)單。

以上就是文件服務(wù)器 File Browser安裝配置詳解的詳細(xì)內(nèi)容,更多關(guān)于File Browser文件服務(wù)器的資料請(qǐng)關(guān)注腳本之家其它相關(guān)文章!

相關(guān)文章

最新評(píng)論