惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

T
Threatpost
aimingoo的专栏
aimingoo的专栏
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
T
Tailwind CSS Blog
J
Java Code Geeks
博客园_首页
Google Online Security Blog
Google Online Security Blog
Hugging Face - Blog
Hugging Face - Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
I
Intezer
P
Palo Alto Networks Blog
V
Vulnerabilities – Threatpost
雷峰网
雷峰网
O
OpenAI News
SecWiki News
SecWiki News
小众软件
小众软件
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
N
News | PayPal Newsroom
Project Zero
Project Zero
Forbes - Security
Forbes - Security
IT之家
IT之家
A
Arctic Wolf
WordPress大学
WordPress大学
Jina AI
Jina AI
T
Tor Project blog
博客园 - 三生石上(FineUI控件)
S
Secure Thoughts
Google DeepMind News
Google DeepMind News
Attack and Defense Labs
Attack and Defense Labs
博客园 - 聂微东
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Privacy International News Feed
Cloudbric
Cloudbric
G
GRAHAM CLULEY
博客园 - 叶小钗
H
Hacker News: Front Page
腾讯CDC
量子位
Help Net Security
Help Net Security
人人都是产品经理
人人都是产品经理
C
Cyber Attacks, Cyber Crime and Cyber Security
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
宝玉的分享
宝玉的分享
爱范儿
爱范儿
L
Lohrmann on Cybersecurity
Hacker News - Newest:
Hacker News - Newest: "LLM"
Recorded Future
Recorded Future
C
CERT Recently Published Vulnerability Notes

夜行人

回家路上 第一期的直播演示项目 震动检测器 正能量 在线参观CodeLab Neverland 发布 CodeLab Adapter 3.3.1 DynamicTable 之 纸糊方向盘 CodeLab DynamicTable: 一个可实施的技术方案 CodeLab Insight 发布 Alpha 版 情人节 Home Assistant 周报 && IoT 周报 (02) Joplin: 关注隐私的 Evernote 开源替代软件 浏览器的未来与 Web 传感器 Home Assistant 周报 && IoT 周报 (01) 百宝箱(01) 论自由 介绍 WebThings Home Assistant 周报 && iot 周报 (00) 百宝箱(00) 毛姆读书心得 传世之作 周末徒步 CodeLab Adapter ❤️ Jupyter/Python 航班 躲雨 夏令营途中 [译]思想--作为一种技术 The future of coding 美国之行 三门问题的程序模拟 从Python转向Pharo https://blog.just4fun.site/post/iot/iot-open-source-projects/ Python异步编程笔记 https://blog.just4fun.site/post/iot/iot-open-source-hardware-community/ 万物积木化开发者社区 CodeLab ❤️ Blender Scratch3技术分析之云变量 API(第7篇) [译]对管道(Pipes)的偏爱 [译]提出正确的问题比得到正确答案更重要 蓝牙设备与Scratch3.0 创建你的第一个Scratch3.0 Extension Scratch3技术分析之项目内部数据(第6篇) Scratch3技术分析之社区 API(第5篇) Scratch3技术分析之User API(第4篇) Scratch3技术分析之项目主页API(第3篇) Scratch3技术分析之静态资源API(第2篇) Scratch3.0、micro:bit与Windows7 https://blog.just4fun.site/post/iot/zerynth-vs-micropython/ 核聚变、方所与半宅空间 可视化编程为何是个糟糕的主意 codelab.club周末聚会 关于codelab.club '下一件大事'是一个房间 Hungry Robot - Eat everything 编程作为一种思考方式 今日简史 史蒂夫·乔布斯传 罗素自选文集 https://blog.just4fun.site/post/edx/tianjin-scratch-ai/ https://blog.just4fun.site/post/edx/richie-cms-openedx/ 徒步武功山 WebUSB与micro:bit 积木化编程与3D场景 夜宿武功山顶 scratch3-adapter接入优必选Alpha系列机器人 https://blog.just4fun.site/post/edx/video-migration-note/ scratch3-adapter重构笔记 https://blog.just4fun.site/post/edx/edx-community-members/ 两种硬件编程风格的比较 使用micro:bit自制PPT翻页笔 柏拉图对话集 scratch3.0 + micro:bit 七月电影放映计划 非营利组织的管理 Screenly--用树莓派让任何屏幕变为可编程的数字标牌 以最佳实践开始你的Django项目 micro:bit与事件驱动 为Scratch3.0设计的插件系统(上篇) OCR应用一例 近两年读过的一些好书 blockly开发之使用python驱动浏览器中的turtle(2) 牛顿新传 文学理论入门 逻辑的引擎 人生的意义 blockly开发之生成并运行js代码(1) blockly开发之hello world(0) micro:bit使用笔记 神器之Termux https://blog.just4fun.site/post/iot/micropython-notes/ Cozmo what is this Scratch的前世今生 下段旅程 我行在远方 爆裂 途中杂记 https://blog.just4fun.site/post/edx/open-edx-startup/ cozmo系列之入门 - 有性格且可编程的机器人 PaperWeekly开发笔记 创业二三事
搭建私有文件存储服务
2015-09-08 · via 夜行人

公司最近准备搭建私有文件存储服务,主要的需求点在团队协作,文件共享和权限控制,我又有机会冒充系统管理员啦。

一直对seafile很感兴趣,给L演示后,他也觉得不错,于是开始搭建。

首选方案当然是用docker。一搜github找到它:docker-seafile

剩下的就是细节啦。

#安装seafile

1
2
3
4
5
6
7
8
9
:::text  
  sudo docker run -t -i \
  -p 10001:10001 \
  -p 12001:12001 \
  -p 8001:8000 \
  -p 8080:8080 \
  -p 8082:8082 \
  -v /srv/seafile:/opt/seafile \
  jenserat/seafile -- /bin/bash
  • mkdir seafile&cd seafilegit clone https://github.com/JensErat/docker-seafile.git
  • 在宿主机里 cd docker-seafile,./download-seafile.sh , sudo cp . /srv/seafile -R
  • 进入容器:/opt/seafile/seafile-server-4.3.2/setup-seafile.sh,回答相应问题
  • /opt/seafile/seafile-server-latest/seafile.sh start
  • /opt/seafile/seafile-server-latest/seahub.sh start
  • exit

#运行seafile

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
docker run -d \
  --name seafile \
  -p 10001:10001 \
  -p 12001:12001 \
  -p 8001:8000 \
  -p 8080:8080 \
  -p 8082:8082 \
  -v /srv/seafile:/opt/seafile \
  -e autostart=true \
  jenserat/seafile

#开机自启 加上--restart=no

#使用 访问ip:8001

#重新配置

1
2
3
4
5
6
进入到容器中
rm -rf /opt/seafile/ccnet
rm -rf  /opt/seafile/seafile-data
/opt/seafile/seafile-server-4.3.2/setup-seafile.sh
/opt/seafile/seafile-server-latest/seafile.sh restart
/opt/seafile/seafile-server-latest/seahub.sh restart

#定制开发(将其作为文件服务)

#桌面端以及移动端下载 https://www.seafile.com/download/

#接口调试 试了下缩略图功能:http://manual-cn.seafile.com/develop/web_api.html#get-thumbnail-image

  • 获取token:curl -d "username=MYUSERNAME&password=MYPASSWORD" http://MYSERVER/api2/auth-token/
  • 获取缩略图:curl -H "Authorization: Token MYTOKEN" http://MYSERVER/api2/repos/{repo_id}/thumbnail/?p=echarts5.jpeg&size=123 > thumbnail.png

其中repo_id进入具体资料库,从url中可以看到

#坑记录 由于文件服务器搭建在内网,偶尔也有外部访问的需求(主要是文件分类之类的工作,技术负责人/规范制定者们得经常出门在外,这个需求还是挺常见的),所以使用ngrok映射出去,由于文件相关的服务在8082端口,而ngrok只映射web server服务,所以外部可以操作网站,却无法查看/上传/下载文件。这与需求不矛盾: )

文章作者 种瓜

上次更新 2015-09-08