基于centos7部署 Seafile 服务器流程(使用MySql)

官方搭建教程(home - Seafile Cloud

1.下载seafile7.0*版本(好像是官方7.0*版本后都不支持centos7了。)下载地址:Seafile Server

例如:

 

2.

将下载的文件放好、解压(可以使用FileZilla将文件直接拉到所在位置)

 

 

 

 

 

 3.

 

 4.进入到seafile-server-*文件夹内

 

./setup-seafile-mysql.sh #运行安装脚本并回答预设问题(注:在这之前需要保证你的服务器已经安装mysql,nginx

 

 

 

 

 

 5.

./seafile.sh start # 启动 Seafile 服务
./seahub.sh start # 启动 Seahub 网站 (默认运行在127.0.0.1:8000端口上)

 6.

Nginx 下配置 Seahub

文件所在位置

 

 

 

 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;
# used for view/edit office file via Office Online Server
client_max_body_size 0;
}

location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
#seafile的端口,根据实际情况设置,默认是8082
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 {
#静态文件路径,根据实际安装路径找到/seafile-server-latest/seahub的位置
root /opt/seafile/seafile-pro-server-7.0.19/seahub;
}
 

 

 查看nginx是否正常:如果是successful则是正常的

 

 

./nginx -s reload #在刚刚的./sbin目录下重新加载该文件,重新启动nginx

 

然后就可以在浏览器输入你的地址了例如http://192.168.191.130登陆管理员账号

 

参考链接:(33条消息) Linux操作系统CentOS7安装Nginx[详细版]_Naijia_OvO的博客-CSDN博客

CentOS7安装Seafile7并使用Nginx代理 - 简书 (jianshu.com)

 

posted @ 2023-02-18 11:12  少吃饭多读书  阅读(583)  评论(0)    收藏  举报