vebys
1
升级的时候报错如下:
[root@yunpan-test2 upgrade]# ./upgrade_6.2_6.3.sh
This script would upgrade your seafile server from 6.2 to 6.3
Press [ENTER] to contiune
Updating seafile/seahub database …
[INFO] You are using MySQL
[INFO] updating ccnet database…
[ERROR] Failed to execute sql: Can’t DROP ‘PRIMARY’; check that column/key exists
Failed to upgrade your database
[root@yunpan-test2 upgrade]# ./upgrade_6.2_6.3.sh
This script would upgrade your seafile server from 6.2 to 6.3
Press [ENTER] to contiune
Updating seafile/seahub database …
[INFO] You are using MySQL
[INFO] updating ccnet database…
[ERROR] Failed to execute sql: Duplicate column name ‘parent_group_id’
Failed to upgrade your database
[root@yunpan-test2 upgrade]# ./upgrade_6.2_6.3.sh
This script would upgrade your seafile server from 6.2 to 6.3
Press [ENTER] to contiune
Updating seafile/seahub database …
[INFO] You are using MySQL
[INFO] updating ccnet database…
[ERROR] Failed to execute sql: Duplicate column name ‘parent_group_id’
Failed to upgrade your database
我直接启动服务提示如下:
[root@yunpan-test2 seafile-server-6.3.1]# ./seafile.sh start
[06/29/18 09:18:41] …/common/session.c(132): using config file /opt/conf/ccnet.conf
Starting seafile server, please wait …
Seafile server started
Done.
[root@yunpan-test2 seafile-server-6.3.1]# ./seahub.sh start
LC_ALL is not set in ENV, set to en_US.UTF-8
Starting seahub at port 8000 …
Error: ‘/opt/conf/gunicorn.conf’ doesn’t exist
Error:Seahub failed to start.
Please try to run “./seahub.sh start” again
6.3.x 及其以上版本
6.3.0 及其之后的版本,我们弃用了 ./seahub.sh start 的方式使seahub进程监听在其他端口。但是,您可以通过修改 conf/gunicorn.conf 中的端口设置来指定seahub启动端口。
关闭 Seafile 服务器
./seahub.sh stop # 停止 Seafile 进程
./seafile.sh stop # 停止 Seahub
更改haiwen/conf/ccnet.conf文件中SERVICE_URL 的值(假设你的 ip 或者域名时192.168.1.100), 如下 (从 5.0 版本开始,可以直接在管理员界面中设置。注意,如果同时在 Web 界面和配置文件中设置了这个值,以 Web 界面的配置为准。):
SERVICE_URL = http://192.168.1.100:8001
修改conf/gunicorn.conf
# default localhost:8000
bind = "0.0.0.0:8001"
重启 Seafile 服务器
./seafile.sh start # 启动 Seafile 服务
./seahub.sh start # 启动 Seahub 网站 (运行在8001端口上)
jyzzx
3
非常感谢您的解决方法!按里面说6.3。0之后用了新的方法,那用NGINX代理新的方法是什么?希望公布,或者出个教程说明,谢谢!
jyzzx
4
那用什么新的方式启动?是不是直接用seafile.sh start 就可以了?用了NGinx的,启动方法有什么不同?
他的意思是我们不再启动时绑定端口号, 以前我们绑定服务器端口号的启动方式是(crontab):
@reboot sleep 60 && /bin/bash /var/www/seafile/seafile-server-latest/seafile.sh start
@reboot sleep 60 && /bin/bash /var/www/seafile/seafile-server-latest/seahub.sh start-fastcgi 8000
现在是在上面的两个配置文件中配置的。启动时将上述命令的端口号去掉即可。
nginx web服务器配置的话和这种启动方式的改变无关。例如我的配置(使用了letsencrypt加密)
server {
listen 443 ssl;
server_name yourdomain;
ssl_certificate /etc/letsencrypt/live/yourdomain/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/yourdomain/privkey.pem;
include letsencrypt;
client_max_body_size 10m;
access_log /var/log/nginx/seahub.access.log;
error_log /var/log/nginx/seahub.error.log;
location / {
proxy_pass http://127.0.0.1:8000/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
}
location /seafhttp {
rewrite ^/seafhttp(.*)$ $1 break;
proxy_pass http://localhost:8082/;
client_max_body_size 0;
proxy_connect_timeout 360000s;
proxy_read_timeout 36000s;
proxy_send_timeout 36000s;
send_timeout 36000s;
}
location /media {
root /var/www/seafiles/seafile-server-latest/seahub;
}
}
server {
listen 80;
server_name yourdomain;
return 301 https://$host$request_uri;
}
# for add letusencrypt crt only
#server{
# listen 80;
# server_name yourdomain;
# root /var/www/cloud;
# location / {
# try_files $uri $uri/ =404;
# }
##for let's encrypt
# location ~ /.well-known {
# allow all;
# }
#
# location ~ /\.ht {
# deny all;
# }
#}
在使用let’s encrypt脚本产生证书时, 先把没有注释的部分注释掉, 并通过取消注释的部分启用80号端口来获取证书。 等成功产生证书后, 在还原成我代码中的样子。你需要注意的是是修改配置中的yourdomain为你的域名。 并在/var/www
中新建cloud
目录(空即可)。 当然你可能还需要调整seafile的具体路径。
我也遇到以上升级数据库时出错,我使用的是mysal,请问如何解决
是从6.1.1直接升级到6.3.1,先后运行6.1-6.2,6.2-6.3,6.2-6.3时出错,通过先下载6.2.5的升级包先升级到6.2.5后,再下载6.3.1的升级包运行6.2-6.3进行升级就没有问题了。