我的编程空间,编程开发者的网络收藏夹
学习永远不晚

seafile云盘的安装-(保姆级教程)

短信预约 -IT技能 免费直播动态提醒
省份

北京

  • 北京
  • 上海
  • 天津
  • 重庆
  • 河北
  • 山东
  • 辽宁
  • 黑龙江
  • 吉林
  • 甘肃
  • 青海
  • 河南
  • 江苏
  • 湖北
  • 湖南
  • 江西
  • 浙江
  • 广东
  • 云南
  • 福建
  • 海南
  • 山西
  • 四川
  • 陕西
  • 贵州
  • 安徽
  • 广西
  • 内蒙
  • 西藏
  • 新疆
  • 宁夏
  • 兵团
手机号立即预约

请填写图片验证码后获取短信验证码

看不清楚,换张图片

免费获取短信验证码

seafile云盘的安装-(保姆级教程)

一、简介

    Seafile 是一款开源的企业云盘,注重可靠性和性能。支持 Windows, Mac, Linux, iOS, Android 平台。支持文件同步或者直接挂载到本地访问

二、安装相关依赖包

系统环境:centos7.6
2.系统所需的环境依赖包

MariaDB 或者 MySQL 服务器 (MariaDB 是 MySQL 的分支)
python 2.7 (从 Seafile 5.1 开始,python 版本最低要求为2.7)
python-setuptools
python-imaging
python-mysqldb
python-ldap
python-urllib3
python-memcache (或者 python-memcached)

yum -y install epel-releaserpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.royum -y install python-imaging MySQL-python python-memcached python-ldap python-urllib3 ffmpeg ffmpeg-develpip install pillow moviepy

三、安装seafile

创建文件目录并下载解压安装包

#seafile会在其安装包同级目录下创建其他多个文件夹,最好是新建一个文件进行存放mkdir /usr/local/seafliecd /usr/local/seafliewget http://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_7.0.2_x86-64.tar.gztar -zxvf seafile-server_7.0.2_x86-64.tar.gzcd seafile-server-7.0.2./setup-seafile-mysql.sh

填写相关服务器的参数

Checking python on this machine ...  Checking python module: python-mysqldb ... Done.-----------------------------------------------------------------This script will guide you to setup your seafile server using MySQL.Make sure you have read seafile server manual at        https://github.com/haiwen/seafile/wikiPress ENTER to continue-----------------------------------------------------------------#填写服务器名字(大小写字母,数字,-,长度3-15位)What is the name of the server? It will be displayed on the client.3 - 15 letters or digits[ server name ] seafile#填写服务器绑定的域名或者服务器ip地址What is the ip or domain of the server?For example: www.mycompany.com, 192.168.1.101[ This server's ip or domain ] 192.168.2.150#填写网盘存放文件的目录,由于里面存放的是文件数据比较大,所以需要找个比较大点的盘Where do you want to put your seafile data?Please use a volume with enough free space[ default "/usr/local/seaflie/seafile-data" ] #ftp传输的端口号,默认是8082,用来上传或者下载文件Which port do you want to use for the seafile fileserver?[ default "8082" ] 

填写数据库参数

-------------------------------------------------------Please choose a way to initialize seafile databases:-------------------------------------------------------#1.创建新的数据库,2.使用现有的数据库[1] Create new ccnet/seafile/seahub databases[2] Use existing ccnet/seafile/seahub databases[ 1 or 2 ] 1#2.填写数据库服务器的地址What is the host of mysql server?[ default "localhost" ] 127.0.0.1#3.设置哪台主机有权访问这个数据库,默认是都可以访问From which hosts could the mysql account be used?[ default "%" ] #4.mysql的端口号,默认是3306What is the port of mysql server?[ default "3306" ] #5.输入数据库root管理员的密码,用来创建先关的数据库信息What is the password of the mysql root user?[ root password ] verifying password of user root ...  done#6.新建seafile数据库的普通用户,并给新建的数据库用户设置密码Enter the name for mysql user of seafile. It would be created if not exists.[ default "seafile" ] seafileEnter the password for mysql user "seafile":[ password for seafile ] #7.创建相关的3个数据库Enter the database name for ccnet-server:[ default "ccnet-db" ] ccnet-serverEnter the database name for seafile-server:[ default "seafile-db" ] seafile-serverEnter the database name for seahub:[ default "seahub-db" ] seahub---------------------------------This is your configuration---------------------------------    server name:            seafile    server ip/domain:       192.168.2.150    seafile data dir:       /usr/local/seaflie/seafile-data    fileserver port:        8082    database:               create new    ccnet database:         ccnet-server    seafile database:       seafile-server    seahub database:        seahub    database user:          seafile8.他会让你确认下安装信息,同意按enter,要修改则按ctrl+c---------------------------------Press ENTER to continue, or Ctrl-C to abort---------------------------------Generating ccnet configuration ...doneSuccessly create configuration dir /usr/local/seaflie/ccnet.Generating seafile configuration ...Done.doneGenerating seahub configuration ...----------------------------------------Now creating ccnet database tables ...--------------------------------------------------------------------------------Now creating seafile database tables ...--------------------------------------------------------------------------------Now creating seahub database tables ...----------------------------------------creating seafile-server-latest symbolic link ...  done-----------------------------------------------------------------Your seafile server configuration has been finished successfully.-----------------------------------------------------------------run seafile server:     ./seafile.sh { start | stop | restart }run seahub  server:     ./seahub.sh  { start  | stop | restart  }-----------------------------------------------------------------If you are behind a firewall, remember to allow input/output of these tcp ports:-----------------------------------------------------------------port of seafile fileserver:   8082port of seahub:               8000When problems occur, Refer to        https://github.com/haiwen/seafile/wikifor information.

启动和关闭seafile

[root@localhost localhost seafile-server-7.0.2]# ./seafile.sh start[03/22/23 10:46:02] ../common/session.c(132): using config file /usr/local/seaflie/conf/ccnet.confStarting seafile server, please wait ...** Message: seafile-controller.c(718): No seafevents.Seafile server startedDone.
[root@localhost localhost seafile-server-7.0.2]# ./seahub.sh startLC_ALL is not set in ENV, set to en_US.UTF-8Starting seahub at port 8000 ...----------------------------------------It's the first time you start the seafile server. Now let's create the admin account----------------------------------------#输入管理员邮箱What is the email for the admin account?[ admin email ] 1912856773@qq.com#输入密码What is the password for the admin account?[ admin password ] Enter the password again:[ admin password again ] ----------------------------------------Successfully created seafile admin----------------------------------------Seahub is startedDone.
./seahub.sh start|stop./seafile.sh start|stop

注意:

[root@localhost localhost seafile-server-7.0.2]# cd /usr/local/seaflie/conf[root@localhost localhost conf]# vi gunicorn.conf

 

 

开启防火墙的相关端口(如果用nginx等反向代理则不用)

firewall-cmd --zone=public --add-port=8082/tcp --permanentfirewall-cmd --zone=public --add-port=8000/tcp --permanent

四:用nginx做反向代理

server {    listen 80;    server_name seafile.example.com;    proxy_set_header X-Forwarded-For $remote_addr;    location / {         proxy_pass         http://127.0.0.1:8000;         proxy_set_header   Host $host;         proxy_set_header   X-Real-IP $remote_addr;         proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;         proxy_set_header   X-Forwarded-Host $server_name;         proxy_read_timeout  1200s;         client_max_body_size 0;        access_log      /var/log/nginx/seahub.access.log;         error_log       /var/log/nginx/seahub.error.log;    }    location /seafhttp {        rewrite ^/seafhttp(.*)$ $1 break;#注意,这个地址最好用netstat -nlpt确认下,填错可能会导致文件无法正常上传或者下载        proxy_pass http://127.0.0.1:8082;#Nginx 默认设置 "client_max_body_size" 为 1M。如果上传文件大于这个值的话,会报错,相关 HTTP 状态码为 423 ("Request Entity Too Large"). 你可以将值设为 0 以禁用此功能.        client_max_body_size 0;        proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;        proxy_connect_timeout  36000s;        proxy_read_timeout  36000s;        proxy_send_timeout  36000s;        send_timeout  36000s;#如果要上传大于 4GB 的文件,默认情况下 Nginx 会把整个文件存在一个临时文件中,然后发给上游服务器 (seaf-server),这样容易出错。使用 1.8.0 以上版本同时在 Nginx 配置文件中设置以下内容能解决这个问题:        proxy_request_buffering off;    }    location /media {#seafile的安装目录        root /home/user/haiwen/seafile-server-latest/seahub;    }}

五:seafile系统配置

浏览器访问:ip+8000

  这里面根据实际情况进行配置,不然可能会导致文件无法上传或者下载

六:游览器后自动结束cookie

默认情况下,关闭游览器是不会自动借宿会话请求的,此时可以更改seahub_settings.py的参数,添加
SESSION_EXPIRE_AT_BROWSER_CLOSE = True
注意:可能需要清理缓存seahub_settings.pyc,并重启服务才会生效

七:onlyoffice集成

# Enable Only OfficeENABLE_ONLYOFFICE = TrueVERIFY_ONLYOFFICE_CERTIFICATE = FalseONLYOFFICE_APIJS_URL = 'http{s}://{your OnlyOffice server's domain or IP}/web-apps/apps/api/documents/api.js'ONLYOFFICE_FILE_EXTENSION = ('doc', 'docx', 'ppt', 'pptx', 'xls', 'xlsx', 'odt', 'fodt', 'odp', 'fodp', 'ods', 'fods')ONLYOFFICE_EDIT_FILE_EXTENSION = ('docx', 'pptx', 'xlsx')

来源地址:https://blog.csdn.net/qq_50660509/article/details/129706671

免责声明:

① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。

② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341

seafile云盘的安装-(保姆级教程)

下载Word文档到电脑,方便收藏和打印~

下载Word文档

猜你喜欢

MySQL+Navicat安装配置保姆级教程

目录mysql+Navicat安装配置教程(超级详细、保姆级)一、 下载MySQL1. 选择想要安装的版本,点击Download下载二、安装MySQL1. 选择设置类型2. 选择安装的产品和功能3. 先选中“MySQL Serv
2023-05-06

tomcat安装及配置教程(保姆级)

Tomcat安装教程 (以tomcat-9.0.62为例:) 1.下载安装包 可以从官网下载安装包: (1)从官网下载 输入网址进入官网 选择版本10,版本9,或者版本8,都可以,这里下载的版本9 不想去官网的直接百度网盘自提: 链接:h
2023-08-21

Android Studio 2022.1.1版本 保姆级安装教程

Android Studio 2022.1.1版本 保姆级安装教程 一、安装步骤介绍二、卸载Android Studio(第一次安装的小伙伴可跳过)三、下载JDK并进行环境配置1. JDK8下载2. 配置环境变量3. 验证安装
2023-08-19

保姆级Oracle 19c rac安装详细教程

以下是Oracle 19c RAC安装的详细步骤:1. 准备工作a. 确保服务器符合Oracle 19c RAC的最低硬件要求,并安装相应的操作系统和补丁。b. 下载Oracle 19c的安装介质并解压缩。c. 确保网络环境正常,每个节点都
2023-09-08

Anaconda超详细保姆级安装配置教程

这篇文章主要介绍了Anaconda超详细保姆级安装配置教程,本篇教程对于新手很友好强烈推荐,看完这篇文章相信你对如何安装配置Anaconda一定了然于胸,我们一起来看看吧
2023-03-23

编程热搜

目录