升级owncloud到7.0.2

时间:2024-11-05 19:33:50

owncloud很久没有提示升级了,官网已经升级到7.0.2,访问Update Center依旧显示是最新。估计是有什么问题导致不能自动更新。想着干脆手动升级试试。找到了两个手动升级的文档:

大版本升级:http://doc.owncloud.org/server/7.0/admin_manual/maintenance/update.html

小版本升级:http://doc.owncloud.org/server/7.0/admin_manual/maintenance/upgrade.html

直接按照大版本升级的方法升级,错误提示:

Updating ownCloud to version 7.0.2, this may take a while.

启用维护模式
Checked database schema update
An exception occurred while executing 'ALTER TABLE `oc_oc_lucene_status_a08bc8968febf` ADD PRIMARY KEY (`fileid`)': SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '10' for key 'PRIMARY'

The update was unsuccessful.Please report this issue to the ownCloud community.

使用./occ upgrade一样提示该错误。仔细观察发现当前版本很混乱,配置文件里是5.0.17但是Admin页面显示的是5.0.10,突然想到可能是5.0.17自动升级时部分失败了导致的,于是重新下载5.0.17进行手动小版本升级(过程略)。再手动升级大版本:

过程备忘:

mv owncloud owncloud-5.0.
cd /home/downloads/
tar xjf owncloud-7.0..tar.bz2
mv owncloud /home/data/webHome/web_3/
cd /home/data/webHome/web_3/
chown -R apache:apache ./owncloud
chcon -R -t httpd_user_content_t ./owncloud
cp ./owncloud-5.0./config/config.php ./owncloud/config/