Seafile 是一个开源的文件云存储平台,解决文件集中存储、同步、多平台访问的问,允许用户创建“群组”,在群组内共享和同步文件,方便了团队协同工作。
官方免费提供专业版,但是限制“3”用户使用,这里仅演示安装免费3用户的专业版
从 7.1.0 版本开始,Seafile 将依赖 Python 3,并且不再兼容 Python 2
安装环境 :良心云2H4G作为演示机
操作系统:Centos7
yum install python3 python3-setuptools python3-pip python3-ldap -y
pip3 install --timeout=3600 Pillow pylibmc captcha jinja2 sqlalchemy psd-tools django-pylibmc django-simple-captcha
注意Seafile 专业版需要 java 1.8 以上版本(官方推荐2G内存以上机器运行)
yum list -y java* #搜索java安装包
yum install java-1.8.0 -y #安装java1.8
appnode官网链接:www.appnode.com
一键安装appnode
INSTALL_AGENT=1 INSTALL_APPS=sitemgr INSTALL_PKGS='nginx-stable,mysql55' bash -c "$(curl -sS http://dl.appnode.com/install.sh)"
安装完成后显示面板登陆地址账号和密码
登陆后进入软件管家安装 mysql服务器面板
进入mysql服务器启动并更改mysql root密码
进入网站管理按照提示创建运行环境(注意:网站类型选择反向代理)
创建一个网站,按照说明填写
点击网站设置继续设置,不然后面seafile不能上传文件
选择源文,点 编辑 将以下代码加入到合适位置,保存并部署(代码需要根据实际情况修改,我会在下面备注)
location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://127.0.0.1:8082;
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;
proxy_request_buffering off;
}
location /media {
root /www/seafile-server-latest/seahub; #这是你安装seafile目录
}
location /seafdav {
proxy_pass http://127.0.0.1:8080/seafdav;
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_set_header X-Forwarded-Proto $scheme;
proxy_read_timeout 1200s;
client_max_body_size 0;
access_log /data/mystack/sites/129.226.12.81/log/nginx/seafdav.access.log; #这里是日志
error_log /data/mystack/sites/129.226.12.81/log/nginx/seafdav.error.log; #这里是日志
}
日志地址在下图
切到 SSH
新建账户并设置密码
useradd seafile #新建账户
passwd seafile #为新建的账户设置密码
新建文件夹并设置用户组为刚刚新建的账户
mkdir /www #创建文件夹
chown -R seafile:seafile /www #设置文件夹用户
切换到seafile用户并进入文件夹www
su seafile #切换用户
cd /www #进入www目录
tar xf seafile-pro-server_7.1.5_x86-64_CentOS.tar.gz #解压
进入解压目录运行安装脚本
cd seafile-pro-server-7.1.5 #进入目录
./setup-seafile-mysql.sh #运行安装脚本并回答预设问题
[seafile@VM-0-13-centos seafile-pro-server-7.1.5]$ ./setup-seafile-mysql.sh
Checking python on this machine ...
Checking for java ...Done.
-----------------------------------------------------------------
This script will guide you to setup your seafile server using MySQL.
Make sure you have read seafile server manual at
https://download.seafile.com/published/seafile-manual/home.md
Press ENTER to continue
-----------------------------------------------------------------
What is the name of the server? It will be displayed on the client.
3 - 15 letters or digits
[ server name ] #这里填服务器名,随便填
What is the ip or domain of the server?
For example: www.mycompany.com, 192.168.1.101
[ This server's ip or domain ] 129.226.12.81 #服务器的 IP 地址或者域名
Which port do you want to use for the seafile fileserver?
[ default "8082" ] #默认即可
-------------------------------------------------------
Please choose a way to initialize seafile databases:
-------------------------------------------------------
[1] Create new ccnet/seafile/seahub databases
你需要提供根密码. 脚本程序会创建数据库和用户。
[2] Use existing ccnet/seafile/seahub databases
ccnet/seafile/seahub 数据库应该已提前创建。
[ 1 or 2 ] 1 #选择1即可
What is the host of mysql server?
[ default "localhost" ] #默认即可
What is the port of mysql server?
[ default "3306" ] #默认即可
What is the password of the mysql root user?
[ root password ] 输入mysql根密码
verifying password of user root ... done
Enter the name for mysql user of seafile. It would be created if not exists.
[ default "seafile" ] seafile #默认即可
Enter the password for mysql user "seafile":
[ password for seafile ] #设置seafile数据库密码
Enter the database name for ccnet-server:
[ default "ccnet-db" ] #默认即可
Enter the database name for seafile-server:
[ default "seafile-db" ] #默认即可
Enter the database name for seahub:
[ default "seahub-db" ] #默认即可
---------------------------------
This is your configuration
---------------------------------
server name: cloud
server ip/domain: 129.226.12.81
seafile data dir: /www/seafile-data
fileserver port: 8082
database: create new
ccnet database: ccnet-db
seafile database: seafile-db
seahub database: seahub-db
database user: seafile
---------------------------------
Press ENTER to continue, or Ctrl-C to abort
---------------------------------
Generating ccnet configuration ...
done
Successly create configuration dir /www/ccnet.
Generating seafile configuration ...
Done.
done
Generating 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 <port> | stop | restart <port> }
-----------------------------------------------------------------
If you are behind a firewall, remember to allow input/output of these tcp ports:
-----------------------------------------------------------------
port of seafile fileserver: 8082
port of seahub: 8000
When problems occur, Refer to
https://download.seafile.com/published/seafile-manual/home.md
for information.
[seafile@VM-0-13-centos seafile-pro-server-7.1.5]$
./seafile.sh start # 启动 Seafile 服务
./seahub.sh start # 启动 Seahub 网站 (默认运行在8000端口上)如果想自定义端口在参数后面加上你的端口
# 你第一次启动 seahub 时,seahub.sh 脚本会提示你创建一个 seafile 管理员帐号。
[seafile@VM-0-13-centos seafile-pro-server-7.1.5]$ ./seahub.sh start
LC_ALL is not set in ENV, set to en_US.UTF-8
Starting 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 ] #输入邮箱地址
What is the password for the admin account?
[ admin password ] #设置密码
Enter the password again:
[ admin password again ] #确认密码
----------------------------------------
Successfully created seafile admin
----------------------------------------
Seahub is started
Done.
[seafile@VM-0-13-centos seafile-pro-server-7.1.5]$
现在可以打开了
打开系统设置
按照说明设置
测试上传成功
./seafile.sh { start | stop | restart }
./seahub.sh { start <port> | stop | restart <port> }
Libreoffice安装教程:https://zh-cn.libreoffice.org/get-help/install-howto/linux/
开启配置项
打开 conf/seafevents.conf,添加:
[OFFICE CONVERTER]
enabled = true
host = 127.0.0.1 # 本机的IP地址,默认 127.0.0.1
port = 6000 # 端口,默认6000
打开conf/seahub_settings.py,添加:
OFFICE_CONVERTOR_ROOT = 'http://127.0.0.1:6000/' # 与seafevents.conf中的 host 和 port 保持一致
保存 seafevents.conf 与seahub_settings.py后,重启 Seafile 服务 ./seafile.sh restart
完结,本文菜鸟可放心食用,可能看我写的乱七八糟,这些都不是问题,细琢磨都能解决
前言 这篇主要以抓「台湾证券交易所」的「除权除息计算结果表」为主 取得「除权除息计算结果表」CSV ...
昨天介绍了CSS写在内部,今天要来把CSS写在外部。 外部的CSS 早期在学校写程序的时候,都会把一...
上一篇我们使用 addTransceiver 单向接收串流 ,但是却不能两个人一起接收,今天我们要来...
挑战目标: MockNative Camp 这次的挑战应该就止步於此了,虽然後端是自己熟悉的部分,但...
如题,想寻找 不是使用 session cookie TempData 这三种方式去做储存数值的方式...