开发者社区> 问答> 正文

在 Debian 8 系统里安装 seafile 服务器(mysql数据库)

云友 vclike 在 帖子里问是否安装过 seafile ,所以此帖实践一下。

环境:Debian 8 64位,seafile-server_6.2.2_x86-64

目的:使用 https://swas.anqun.org 访问到 Seahub 网站

过程:

1. apt-get update #更新

2. apt-get install mariadb-server #安装 mariadb-server
[attachment=133878]

3. apt-get install python2.7 libpython2.7 python-setuptools python-imaging python-ldap python-mysqldb python-memcache python-urllib3 #安装python及相应软件
[attachment=133879]

4. apt-get install nginx #安装nginx,用来反向代理后端的 seahub 网站

5. vi /etc/nginx/sites-enabled/swas.conf #创建swas.anqun.org反向代理配置内容,详细如下:
server {
    listen       80;
    server_name  swas.anqun.org;
    rewrite ^ https://$http_host$request_uri? permanent;    # force redirect http to https




    # Enables or disables emitting nginx version on error pages and in the "Server" response header field.
    server_tokens off;
}




server {
    listen 443;
    ssl on;
    ssl_certificate /etc/ssl/214298380010268.pem;        # path to your cacert.pem
    ssl_certificate_key /etc/ssl/214298380010268.key;    # path to your privkey.pem
    server_name swas.anqun.org;
    server_tokens off;




    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_set_header   X-Forwarded-Proto https;




        access_log      /var/log/nginx/seahub.access.log;
        error_log       /var/log/nginx/seahub.error.log;




        proxy_read_timeout  1200s;




        client_max_body_size 0;
    }    
}

6. adduser liujia #创建一个普通用户,seafile相应文件放在 /home/liujia 路径里
  

7. su liujia #切换到普通用户liujia
  

8. wget http://seafile-downloads.oss-cn-shanghai.aliyuncs.com/seafile-server_6.2.2_x86-64.tar.gz #下载当前版本的seafile安装文件

9. tar xzvf seafile-server_6.2.2_x86-64.tar.gz #解压安装文件

10. cd seafile-server-6.2.2 #切换到程序目录

11. ./setup-seafile-mysql.sh #开始安装
[attachment=133880]

12. 按提示回答问题,如输入Mariadb的root密码,其它如端口和数据库名称,可保持默认的
[attachment=133881]

[attachment=133882]

[attachment=133883]

[attachment=133884]
  

13. ./seafile.sh start # 启动 Seafile 服务

14. ./seahub.sh start # 启动 Seahub 网站

15. 在浏览器里访问,登录,正常。另,实例安全组里应当允许访问如 tcp 443,80,8000 和8082端口


[attachment=133885]

[attachment=133886]


[attachment=133887]


参考: http://manual-cn.seafile.com/deploy/using_mysql.html

展开
收起
dongshan8 2017-10-17 18:23:14 6711 0
2 条回答
写回答
取消 提交回答
  • 的帖子很精彩!希望很快能再分享您的下一帖!

    -------------------------

    的帖子很精彩!希望很快能再分享您的下一帖!

    2018-01-25 11:23:18
    赞同 展开评论 打赏
  • 一个程序员,欢迎骚扰!!!
    开源版本 功能限制太多了
    2017-10-25 13:08:30
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
如何运维千台以上游戏云服务器 立即下载
网站/服务器取证 实践与挑战 立即下载
ECS计算与存储分离架构实践 立即下载