找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 5024|回复: 20

玩客云搭配nginx和filerun几乎无敌。

[复制链接]
nginx的webdav模块无敌了,比chfs快多了。
filerun用来生成缩略图。
这俩不建议用docker搭建,docker官方源用的apache2前端,有点卡。

简单版安装教程:
1、首先安装nginx和php,这里用sury的源,不然软件库不是最新的。
  1. if [ "$(whoami)" != "root" ]; then
  2. SUDO=sudo
  3. fi

  4. ${SUDO} apt-get update
  5. ${SUDO} apt-get -y install apt-transport-https lsb-release ca-certificates curl
  6. ${SUDO} curl -sSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sury.org/php/apt.gpg
  7. ${SUDO} sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-php.gpg] https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
  8. ${SUDO} curl -sSLo /usr/share/keyrings/deb.sury.org-nginx.gpg https://packages.sury.org/nginx/apt.gpg
  9. ${SUDO} sh -c 'echo "deb [signed-by=/usr/share/keyrings/deb.sury.org-nginx.gpg] https://packages.sury.org/nginx/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/nginx.list'
  10. ${SUDO} apt-get update

  11. ${SUDO} apt install nginx-full php7.4 php7.4-fpm php7.4-mysql php7.4-cli php7.4-common php7.4-json php7.4-opcache  php7.4-mbstring php7.4-xml php7.4-zip php7.4-gd php7.4-curl php7.4-gd php7.4-ldap php7.4-imagick
复制代码
2、接下来按照下面这个教程来

http://blog.filerun.com/how-to-i ... untu-20-with-nginx/
教程里有一个问题,nginx配置里有一行,这个你会发现重复了,直接删掉这一行。
include snippets/fastcgi-php.conf;
3、如何编译安装vips我也不知道,所以这是一点遗憾。我直接用的apt安装。
  1. apt install libvips-tools ffmpeg
复制代码

剩下的怎么设置自己来把
4、关于nginx的webdav如何设置,我这里发出一个完整的配置。
  1. user www-data;
  2. worker_processes auto;
  3. worker_cpu_affinity auto;
  4. pid /run/nginx.pid;
  5. include /etc/nginx/modules-enabled/*.conf;

  6. events {
  7.         worker_connections 76800;
  8.         multi_accept on;
  9.   use epoll;
  10. }

  11. http {

  12.         ##
  13.         # Basic Settings
  14.         ##

  15.         sendfile on;
  16.         tcp_nopush on;
  17.         types_hash_max_size 20480;
  18.         # server_tokens off;
  19.   
  20.         # server_names_hash_bucket_size 64;
  21.         # server_name_in_redirect off;
  22.   client_header_buffer_size 32k;
  23.   large_client_header_buffers 4 32k;
  24.   client_max_body_size 10240m;
  25.   client_body_buffer_size 100m;
  26.         include /etc/nginx/mime.types;
  27.         default_type application/octet-stream;

  28.         ##
  29.         # SSL Settings
  30.         ##

  31.         ssl_protocols TLSv1 TLSv1.1 TLSv1.2 TLSv1.3; # Dropping SSLv3, ref: POODLE
  32.         ssl_prefer_server_ciphers on;

  33.         ##
  34.         # Logging Settings
  35.         ##

  36.         access_log /var/log/nginx/access.log;
  37.         error_log /var/log/nginx/error.log;

  38.         ##
  39.         # Gzip Settings
  40.         ##

  41.         gzip on;

  42.         # gzip_vary on;
  43.         # gzip_proxied any;
  44.         # gzip_comp_level 6;
  45.         # gzip_buffers 16 8k;
  46.         # gzip_http_version 1.1;
  47.         # gzip_types text/plain text/css application/json application/javascript text/xml application/xml application/xml+rss text/javascript;

  48.         ##
  49.         # Virtual Host Configs
  50.         ##

  51.         include /etc/nginx/conf.d/*.conf;
  52.         include /etc/nginx/sites-enabled/*;
  53. }


  54. #mail {
  55. #        # See sample authentication script at:
  56. #        # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
  57. #
  58. #        # auth_http localhost/auth.php;
  59. #        # pop3_capabilities "TOP" "USER";
  60. #        # imap_capabilities "IMAP4rev1" "UIDPLUS";
  61. #
  62. #        server {
  63. #                listen     localhost:110;
  64. #                protocol   pop3;
  65. #                proxy      on;
  66. #        }
  67. #
  68. #        server {
  69. #                listen     localhost:143;
  70. #                protocol   imap;
  71. #                proxy      on;
  72. #        }
  73. #}
复制代码
  1. server {
  2.     listen 80;
  3.     listen [::]:80;
  4.     listen 31011;
  5.     listen [::]:31011;
  6.     server_name name2;
  7.     root /filerun/filerun/;
  8.     index index.php index.html;

  9.     location / {
  10.         try_files $uri $uri/ /index.php;
  11.     }

  12.     location ~ [^/]\.php(/|$) {
  13.         fastcgi_split_path_info ^(.+?\.php)(/.*)$;
  14.         if (!-f $document_root$fastcgi_script_name) {
  15.             return 404;
  16.         }


  17.         include fastcgi_params;
  18.         # include snippets/fastcgi-php.conf;

  19.         fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  20.         fastcgi_param PATH_INFO $fastcgi_path_info;
  21.         fastcgi_pass unix:/run/php/php7.4-fpm.sock;
  22.     }

  23.     # A long browser cache lifetime can speed up repeat visits to your page
  24.     location ~* \.(jpg|jpeg|gif|png|webp|svg|woff|woff2|ttf|css|js|ico|xml)$ {
  25.         access_log off;
  26.         log_not_found off;
  27.         expires 360d;
  28.     }

  29.     # disable access to hidden files
  30.     location ~ /\.ht {
  31.         access_log off;
  32.         log_not_found off;
  33.         deny all;
  34.     }
  35.    

  36. }

  37. server{
  38.     listen 80;
  39.     listen [::]:80;
  40.     server_name name1;
  41.     location /
  42.     {
  43.         # auth_basic "authentication";
  44.         auth_basic_user_file /etc/nginx/httpd;
  45.         client_max_body_size 10G;
  46.         root /filerun/filerun/userfiles;
  47.         dav_access user:rw group:rw all:rw;
  48.         index index.html index.htm;
  49.         autoindex on;
  50.         autoindex_localtime on;
  51.         client_body_temp_path /tmp;
  52.          
  53.         # ngx_http_dav_module 模块支持
  54.         dav_methods PUT DELETE MKCOL COPY MOVE;
  55.         create_full_put_path on;
  56.         # nginx-dav-ext-module 模块支持
  57.         dav_ext_methods PROPFIND OPTIONS LOCK UNLOCK;   
  58.     }
  59. }
复制代码




我的恩山、我的无线 The best wifi forum is right here.
路过~~看看~~~
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

哈,找到队友了。我也是用的filerun但我没用nginx我用的是caddy2.0速度也没得说,也开webdav了解析用dyn6套ssl只是我这电信封80和443没办法只能用其他端口,filerun还是用的docker方式,没用官方源。把阿里云和天翼云都用docker方式拉到本地目录,让后再用caddy反出去,这样个人网盘容量和体验非常爽,任何地点和终端都无缝了!

点评

确实,感觉webdav已经几乎所有的终端都支持了,电视上可以用kodi. 最后filerun是目前我所知唯一免费支持手机端缩略图显示的软件. seafile电脑端可以,但是手机端不可以.  详情 回复 发表于 2022-3-20 13:57
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
hehh2001 发表于 2022-3-20 08:50
哈,找到队友了。我也是用的filerun但我没用nginx我用的是caddy2.0速度也没得说,也开webdav了解析用dyn6套 ...

确实,感觉webdav已经几乎所有的终端都支持了,电视上可以用kodi.
最后filerun是目前我所知唯一免费支持手机端缩略图显示的软件. seafile电脑端可以,但是手机端不可以.
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

用来干什么的?

点评

搭建网盘同步的,filerun负责管理,nginx负责高速同步。  详情 回复 发表于 2022-3-26 22:01
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

本帖最后由 editdoc2000 于 2022-3-23 21:58 编辑

换了armbian版本软件正常安装了,请问第4步的配置文件要修改哪里。

点评

都是nginx的配置文件,一个是主文件,用于全局配置,在原基础上修改,还有一个是次文件,用于filerun的一些设置。 "/etc/nginx/nginx.conf" "/etc/nginx/sites-enabled/filerun.conf"  详情 回复 发表于 2022-3-26 22:00
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
editdoc2000 发表于 2022-3-22 16:26
换了armbian版本软件正常安装了,请问第4步的配置文件要修改哪里。

都是nginx的配置文件,一个是主文件,用于全局配置,在原基础上修改,还有一个是次文件,用于filerun的一些设置。
"/etc/nginx/nginx.conf"
"/etc/nginx/sites-enabled/filerun.conf"
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层

搭建网盘同步的,filerun负责管理,nginx负责高速同步。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

小白一脸朦呀呀
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

有没有谁能弄个详细的教程啊
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

谢谢分享宝贵经验~  请问这个filerun只是用来生成缩略图吗 ? 如果不装这个 filerun , 会有什么后果 ?

点评

没后果。。。。。单纯的用webdav的话,nginx效率真的高  详情 回复 发表于 2022-5-2 22:12
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

今天刚装完,然后就给他删了。浪费空间 没有汉化 而且很多设置要高级版。。。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| | 显示全部楼层
hanguofu 发表于 2022-4-19 05:09
谢谢分享宝贵经验~  请问这个filerun只是用来生成缩略图吗 ? 如果不装这个 filerun , 会有什么后果 ?

没后果。。。。。单纯的用webdav的话,nginx效率真的高
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

装casaos吧
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

学习chfs
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-4-27 02:14

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表