云友 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
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。