Roundcube Upgrade

最後更新: 2024-06-20

目錄

  • Minor version upgrade (e.g. 1.5.X)
  • Upgrade (0.9.5 up to 1.0.3)

Minor version upgrade (e.g. 1.5.X)

 

Path

ln -s sf NEW roundcubemail

e.g.

ln -sf roundcubemail-1.5.9 roundcubemail

nginx config

# 大 version upgrade 才會用到
location ~ ^/mail/installer/(.*\.php)$ {
    #allow x.x.x.x;
    deny all;
    include /etc/nginx/templates/hsts.tmpl;
    include /etc/nginx/templates/fastcgi_php.tmpl;
    fastcgi_param SCRIPT_FILENAME /opt/www/roundcubemail/installer/$1;
}
# 主要設定
location ~ ^/mail/(.*\.php)$ {
    #allow x.x.x.x;
    #deny all;
    include /etc/nginx/templates/hsts.tmpl;
    include /etc/nginx/templates/fastcgi_php.tmpl;
    fastcgi_param SCRIPT_FILENAME /opt/www/roundcubemail/$1;
}

Notes

一般是以下 deny directories 設定

location ~ ^/mail/(bin|config|logs|installer|SQL|temp|vendor)($|/.*) { deny all; }

roundcudbe config

要行 installer 才要加此 Settings. minor version upgrae 一般不用加

config/config.inc.php

$config['enable_installer'] = true;

roundcudbe plugin

OLD=1.5.2

cp -a roundcubemail-$OLD/plugins/password/config.inc.php \
  roundcubemail/plugins/password/

cp -a roundcubemail-$OLD/plugins/managesieve/config.inc.php \
  roundcubemail/plugins/managesieve/

# Verify file permission

ls -l */config.inc.php

-r--r----- 1 nginx nginx  5883 Mar 30  2022 managesieve/config.inc.php
-r--r----- 1 nginx nginx 20639 Mar 30  2022 password/config.inc.php

 


Upgrade (0.9.5 up to 1.0.3)

 

Step1: 升級 DB

  • backup 原本的 DB 資料 ( mysqldump -u roundcube roundcube -p > backup.sql )
  • 更新 DB schema

在 /var/www/roundcubemail-1.0.3/SQL/mysql 內有

2011121400.sql -- Updates from version 0.7
2012080700.sql
2013011000.sql
.........................

Step2: Replace the configuration defaults files:

   - config/defaults.inc.php
   - config/mimetypes.php

   chown www-data config

Step3: 更新 soft link

cd /usr/share

ls -n /usr/share/roundcubemail-0.9.5-dep roundcubemail

Step4: http://xxx/webmail/installer

RCUBE_CONFIG_DIR/main.inc.php

$rcube_config['enable_installer'] = true;
  • 建立 config.inc.php
  • 把新的 config.inc.php 放到 config/config.inc.php

整過個程:

  1. Check environment
  2. Create config
  3. Check config file
  4. Check DB config

 


 

Creative Commons license icon Creative Commons license icon