原帖地址:http://vpsug.com/threads/vestacp-seafile.211/#post-305
由于只能贴一张图,导致显示不美观,麻烦管理员把少的<加上去!
- 下载最新安装包
到下载 - Seafile 下载最新的安装包
cd /home/
mkdir seafile
cd seafile
wget http://download-cn.seafile.com/seafile-server_5.1.2_x86-64.tar.gz
tar -xzf seafile-server_5.1.2_x86-64.tar.gz
mkdir installed
mv seafile-server_* installed
- 安装依赖
apt-get install python-pip python-imaging python-ldap python-mysqldb python-memcache
- 安装
cd seafile-server*
./setup-seafile-mysql.sh
根据提示,输入服务器名,访问域名。
为了方便管理,这里我就使用利用vestacp创建好的数据库
安装完成后的提示
接下来去VESTACP开端口
- 启动Seafile和SeaHub
./seafile.sh start
./seahub.sh start #因为是初次运行,要创建管理员账号
测试可登陆
接下来开始修改配置文件。
新建一个域名为seafile.ixiqin.com的主机
直接到/home/admin/conf/web/
修改nginx.conf
server {
listen 80;
server_name seafile.ixiqin.com;
proxy_set_header X-Forwarded-For $remote_addr;
location / {
fastcgi_pass 127.0.0.1:8000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_script_name;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
fastcgi_param REMOTE_ADDR $remote_addr;
access_log /var/log/nginx/seahub.access.log;
error_log /var/log/nginx/seahub.error.log;
}
location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://127.0.0.1:8082;
client_max_body_size 0;
proxy_connect_timeout 36000s;
proxy_read_timeout 36000s;
}
location /media {
root /home/seafile/seafile-server-latest/seahub;
}
}
效果如图
接下来去Web控制台修改配置项
然后重启
./seafile.sh restart
./seahub.sh stop
./seahub.sh start-fastcgi
访问我们的域名
访问文件试试