当前位置:网站首页>Filebrowser realizes private network disk
Filebrowser realizes private network disk
2022-04-23 05:54:00 【Mu Meiwen】
The content of the company's file server needs to be accessed on the Internet , Originally used for intranet smb For Internet AFP(mac) and webdav(windows I'm going to have to install one RaiDrive To connect ), But sometimes it's a temporary access to server files on a strange computer , So there is still a web The interface is quite good , So in github The server of this private network disk is found on .
github Project address
https://github.com/filebrowser/filebrowser
Its documentation is described in this way :
File Browser is a single binary and can be used as a standalone executable. Although, some might prefer to use it with Docker or Caddy, which is a fantastic web server that enables HTTPS by default. Its installation is quite straightforward independently on which system you want to use.
The file browser is a binary file , Can be used as a stand-alone executable . For all that , Some people may prefer to associate it with Docker or Caddy Use it together , This is a great Web The server , Enabled by default HTTPS. It's very easy to install , Independent of the system you want to use .
install
The quickest way for beginners to start using File Browser is by opening your terminal and executing the following commands:
Beginners start using filebrowser The quickest way is to open the terminal and execute the following command
curl -fsSL https://raw.githubusercontent.com/filebrowser/get/master/get.sh | bash
filebrowser -r /path/to/your/files
Done! It will bootstrap a database in which all the configurations and users are stored. Now, you can see on your command line the address in which your instance is running. You just need to go to that URL and use the following credentials:
complete ! It will boot a database , It stores all configurations and users . Now? , You can see the address of the running instance on the command line . You just need to go to this URL Use the following credentials :
-
Username:
admin
-
Password:
admin
After the first statement is executed successfully, the prompt is as follows :
Downloading File Browser for linux/amd64...
https://github.com/filebrowser/filebrowser/releases/download/v2.17.2/linux-amd64-filebrowser.tar.gz
Extracting...
Putting filemanager in /usr/local/bin (may require password)
Successfully installed
At this time, the installation has been successful , Then it executes its second statement and runs
Pay attention here :
The first point
-r /path/to/your/files
This parameter refers to the file path , The file directory you want to manage with the network disk , Don't use him directly , Use your own directory
Second point
After running, the default is 127.0.0.1:8080
# filebrowser -r /home/share/3D/MAX
2021/09/06 13:59:02 No config file used
2021/09/06 13:59:03 Listening on 127.0.0.1:8080
At this time, I use its lan IP Adding ports is inaccessible , such as http://192.168.1.3:8080
Then you have to give it a -a Parameters , Manually specify its LAN IP, Such as this :
# filebrowser -a 192.168.1.3 -r /home/share/3D/MAX
So visit again http://192.168.1.3 You can open a login interface , Enter the default username and password admin admin You can log in .
The third point
If you still can't log in , Just check the firewall , hold 8080 Ports open , For example, I centos8 System :
# sudo firewall-cmd --add-port=8080/tcp --permanent
success
# sudo firewall-cmd --reload
success
After opening, it looks like this
You can also change its access port -p 8000
# filebrowser -a 192.168.1.3 -r /home/share/3D/MAX -p 8000
2021/09/06 16:21:18 No config file used
2021/09/06 16:21:18 Listening on 192.168.1.3:8000
You can also define its log location
# filebrowser -a 192.168.16.223 -r /home/zero/3D/MAX -l /var/log/filebrowser.log
2021/09/06 16:25:13 No config file used
At this time I found out , I have to execute this startup statement in the current directory , Because its configuration file filebrowser.db The default is generated in the current directory , I realized that I could continue to add parameters , such as
# filebrowser -a 192.168.16.223 -r /home/share/3D/MAX -l /var/log/filebrowser.log -b /home/share/filebrowser.db
2021/09/06 16:25:13 No config file used
But it's too much trouble , Temporary use is OK , If you use it for a long time , You still need to initialize the parameters into the file
This is a Chinese explanation of the parameters found on the Internet
-a, --address string Address to listen on ( The default value is "127.0.0.1"")
-b, --baseurl string Basics url
--cache-dir string File cache directory ( If empty, disable )
-t, --cert string tls certificate
-c, --config string Profile path
-d, --database string Database path ( The default value is "./filebrowser.db")
--disable-exec Disable the command runner function
--disable-preview-resize Disable resizing image previews
--disable-thumbnails Disable image thumbnails
--disable-type-detection-by-header Disable type detection by reading the file header
-h, --help help
--img-processors int Image processor count ( The default value is 4)
-k, --key string tls secret key
-l, --log string Log output ( Default "stdout")
--noauth Use... When using quick settings noauth auther
--password string The name of the first user when using quick configuration Hash password ( The default is "admin")
-p, --port string Listening port ( The default is "8080")
-r, --root string The root is preceded to the relative path ( Default ".")
--socket string Socket to listen on ( Cannot be associated with address 、 port 、 Use with certificate or key parameters )
--socket-perm uint32 unix Socket file permissions ( Default 438)
--username string User name of the first user when using quick configuration ( The default is "admin")
This is the English explanation of the official website
The command to write parameters to the file is
# filebrowser config set
For example, add -h Just check the help
# filebrowser config set -h
Then, according to the logic of this statement, put the path just used 、 Database address 、IP Address 、 Set the log address and so on
$ filebrowser config set -d /home/big/filebrowser.db
$ filebrowser config set -b /home/share/3D
$ filebrowser config set -r /home/share/3D
$ filebrowser config set -l /var/log/filebrowser.log
$ filebrowser config set -a 192.168.1.3
Run under this filebrowser The command will start correctly
$ filebrowser
2021/09/06 17:07:40 No config file used
Now it's running , But the front-end runs , That is, the command window cannot be closed , Turn off the service and stop , If running in the background, add nohub, Write an execution file directly
$ vim filebrowser.sh
#!/bin/bash
nohup filebrowser -d /home/big/filebrowser.db >/dev/null 2>&1 &
Then execute the file
$ sh filebrowser.sh
So the service starts .
Start up and edit rc.local
$ sudo vim /etc/rc.local
sh /home/design/filebrowser.sh
Try restarting
END
版权声明
本文为[Mu Meiwen]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230542192012.html
边栏推荐
- Pyqt5 learning (I): Layout Management + signal and slot association + menu bar and toolbar + packaging resource package
- Treatment of tensorflow sequelae - simple example record torch utils. data. dataset. Picture dimension problem when rewriting dataset
- Object to map
- ValueError: loaded state dict contains a parameter group that doesn‘t match the size of optimizer‘s
- Understand the current commonly used encryption technology system (symmetric, asymmetric, information abstract, digital signature, digital certificate, public key system)
- 深入源码分析Servlet第一个程序
- 数字图像处理基础(冈萨雷斯)二:灰度变换与空间滤波
- 手动删除eureka上已经注册的服务
- Get the value of state in effects in DVA
- Solve the error: importerror: iprogress not found Please update jupyter and ipywidgets
猜你喜欢
Pytoch -- data loading and processing
编程记录——图片旋转函数scipy.ndimage.rotate()的简单使用和效果观察
Pytorch学习记录(十):数据预处理+Batch Normalization批处理(BN)
解决报错:ImportError: IProgress not found. Please update jupyter and ipywidgets
字符串(String)笔记
Solve the error: importerror: iprogress not found Please update jupyter and ipywidgets
Getting started with JDBC \ getting a database connection \ using Preparedstatement
PyQy5学习(四):QAbstractButton+QRadioButton+QCheckBox
Pytorch学习记录(三):神经网络的结构+使用Sequential、Module定义模型
Conda 虚拟环境管理(创建、删除、克隆、重命名、导出和导入)
随机推荐
Pytorch学习记录(五):反向传播+基于梯度的优化器(SGD,Adagrad,RMSporp,Adam)
Gaussian processes of sklearn
Anaconda安装PyQt5 和 pyqt5-tools后没有出现designer.exe的问题解决
PyQy5学习(三):QLineEdit+QTextEdit
Navicate连接oracle(11g)时ORA:28547 Connection to server failed probable Oeacle Net admin error
开发环境 EAS登录 license 许可修改
mysql sql优化之Explain
数字图像处理基础(冈萨雷斯)二:灰度变换与空间滤波
redhat实现目录下特定文本类型内关键字查找及vim模式下关键字查找
创建二叉树
Get the value of state in effects in DVA
Font shape `OMX/cmex/m/n‘ in size <10.53937> not available (Font) size <10.95> substituted.
Anaconda installed pyqt5 and pyqt5 tools without designer Exe problem solving
基于thymeleaf实现数据库图片展示到浏览器表格
mysql-触发器、存储过程、存储函数
mysql实现主从复制/主从同步
Object to map
filebrowser实现私有网盘
PHP处理json_decode()解析JSON.stringify
去噪论文阅读——[RIDNet, ICCV19]Real Image Denoising with Feature Attention