IRedMail/FAQ/Upgrade.Roundcube.Webmail

From iRedMail

(Difference between revisions)
Jump to: navigation, search
Line 13: Line 13:
* Download the latest Roundcube webmail here: http://roundcube.net/. Here we take 0.7.1 for example: /root/roundcubemail-0.7.1.tar.gz
* Download the latest Roundcube webmail here: http://roundcube.net/. Here we take 0.7.1 for example: /root/roundcubemail-0.7.1.tar.gz
-
* Extract it in the right place :
+
* Extract it in the right place.
{{cmd|<pre>
{{cmd|<pre>
 +
# ---- For RHEL/CentOS/Scientific Linux ----
 +
# tar xzf /root/roundcubemail-0.7.1.tar.gz -C /var/www/
 +
# cd /var/www/
 +
# mkdir roundcubemail-0.7.1/{temp,logs}
 +
# chown apache:apache roundcubemail-0.7.1/{temp,logs}
 +
# ---- For Debian/Ubuntu ----
# ---- For Debian/Ubuntu ----
# tar xzf /root/roundcubemail-0.7.1.tar.gz -C /usr/share/apache2/
# tar xzf /root/roundcubemail-0.7.1.tar.gz -C /usr/share/apache2/
# cd /usr/share/apache2/
# cd /usr/share/apache2/
-
# mkdir temp logs
+
# mkdir roundcubemail-0.7.1/{temp,logs}
-
# chown www-data:www-data temp logs
+
# chown www-data:www-data roundcubemail-0.7.1/{temp,logs}
 +
 
 +
# ---- For Gentoo Linux ----
 +
# tar xzf /root/roundcubemail-0.7.1.tar.gz -C /var/www/
 +
# cd /var/www/
 +
# mkdir roundcubemail-0.7.1/{temp,logs}
 +
# chown apache:apache roundcubemail-0.7.1/{temp,logs}
 +
 
 +
# ---- For openSUSE ----
 +
# tar xzf /root/roundcubemail-0.7.1.tar.gz -C /srv/www/
 +
# cd /srv/www/
 +
# mkdir roundcubemail-0.7.1/{temp,logs}
 +
# chown wwwrun:www roundcubemail-0.7.1/{temp,logs}
 +
 
 +
# ---- For FreeBSD ----
 +
# tar xzf /root/roundcubemail-0.7.1.tar.gz -C /usr/local/www/
 +
# cd /usr/local/www/
 +
# mkdir roundcubemail-0.7.1/{temp,logs}
 +
# chown www:www roundcubemail-0.7.1/{temp,logs}
</pre>}}
</pre>}}
-
* Copy config files from old release to new release. For example:
+
* Copy config files '''db.inc.php''' and '''main.inc.php''' from old release to new release. For example:
{{cmd|<pre>
{{cmd|<pre>
-
# cd /usr/share/apache2/
+
# cp -p roundcubemail-0.5.2/config/{db.inc.php,main.inc.php} roundcubemail-0.7.1/config/
-
# cp -a roundcubemail-0.5.2/config/main.inc.php roundcubemail-0.7.1/config/
+
-
# cp -a roundcubemail-0.5.2/config/db.inc.php roundcubemail-0.7.1/config/
+
</pre>}}
</pre>}}
* Remove symbol link and create a new one, link to new release:
* Remove symbol link and create a new one, link to new release:
{{cmd|<pre>
{{cmd|<pre>
-
# cd /usr/share/apache2/
 
# rm roundcubemail
# rm roundcubemail
# ln -s roundcubemail-0.7.1 roundcubemail
# ln -s roundcubemail-0.7.1 roundcubemail
Line 44: Line 65:
If the installer reports your server misses some required packages or PHP modules, please install them manually to fix them.
If the installer reports your server misses some required packages or PHP modules, please install them manually to fix them.
-
* Set correct time zone in your PHP config file: /etc/php5/apache2/php.ini. For example:
+
* Set correct time zone in your PHP config file '''php.ini'''. For example:
 +
** On RHEL/CentOS/Scientific Linux, it's '''/etc/php.ini'''
 +
** On Debian/Ubuntu, it's '''/etc/php5/apache2/php.ini'''
 +
** On Gentoo Linux, it's '''/etc/php/apache2-php5.3/php.ini'''
 +
** On openSUSE, it's '''/etc/php5/apache2/php.ini'''
 +
** on FreeBSD, it's '''/usr/local/etc/php.ini'''
{{cmd|<pre>
{{cmd|<pre>
date.timezone = "Europe/Paris"
date.timezone = "Europe/Paris"
</pre>}}
</pre>}}
-
* Restart Apache web server if you have new required packages or PHP modules installed:
+
* Restart Apache web server if you have new required packages or PHP modules installed. For example, on Debian/Ubuntu:
{{cmd|<pre>
{{cmd|<pre>
# /etc/init.d/apache2 restart
# /etc/init.d/apache2 restart
Line 56: Line 82:
* Upgrade Roundcube database structure by importing shipped SQL file:
* Upgrade Roundcube database structure by importing shipped SQL file:
{{cmd|<pre>
{{cmd|<pre>
-
# cd /usr/share/apache2/roundcubemail-0.7.1/
 
# mysql -uroot -p
# mysql -uroot -p
mysql> USE roundcubemail;
mysql> USE roundcubemail;
-
mysql> SOURCE SQL/mysql.update.sql;
+
mysql> SOURCE roundcubemail-0.7.1/SQL/mysql.update.sql;
</pre>}}
</pre>}}
* Access Roundcube installer with this URL: httpS://your_server/mail/installer , it will validate required packages, PHP modules and database structure.
* Access Roundcube installer with this URL: httpS://your_server/mail/installer , it will validate required packages, PHP modules and database structure.
-
* Roundcube installer also gives the way to download main.inc.php and db.inc.php files, please download them and replace your old config files. Because old config files might miss some parameters. Don't forget to fix file permission after replaced:
+
* Roundcube installer also gives the way to download main.inc.php and db.inc.php files, please download them and replace your old config files. Because old config files might miss some parameters. Don't forget to fix file permission after replaced. For example, on Debian/Ubuntu:
{{cmd|<pre>
{{cmd|<pre>
-
# cd /usr/share/apache2/
+
# chown www-data:www-data roundcubemail-0.7.1/config/*
-
# chown www-data:www-data config/*
+
</pre>}}
</pre>}}
-
* After Roundcube installer finished upgrading process, disable installer in config file 'config/main.inc.php' by updating below parameter:
+
* After Roundcube installer finished upgrading process, disable installer in config file 'roundcubemail-0.7.1/config/main.inc.php' by updating below parameter:
{{cmd|<pre>
{{cmd|<pre>
$rcmail_config['enable_installer'] = false;
$rcmail_config['enable_installer'] = false;

Revision as of 08:39, 19 February 2012


THIS IS A DRAFT TUTORIAL, DO NOT APPLY IT.

This tutorial is used to upgrade Roundcube from old release to the latest release.

  • Backup current Roundcube database first.
Terminal:
# mysqldump -u root -p roundcubemail > /root/mysql-db-roundcubemail.sql
  • Download the latest Roundcube webmail here: http://roundcube.net/. Here we take 0.7.1 for example: /root/roundcubemail-0.7.1.tar.gz
  • Extract it in the right place.
Terminal:
# ---- For RHEL/CentOS/Scientific Linux ----
# tar xzf /root/roundcubemail-0.7.1.tar.gz -C /var/www/
# cd /var/www/
# mkdir roundcubemail-0.7.1/{temp,logs}
# chown apache:apache roundcubemail-0.7.1/{temp,logs}

# ---- For Debian/Ubuntu ----
# tar xzf /root/roundcubemail-0.7.1.tar.gz -C /usr/share/apache2/
# cd /usr/share/apache2/
# mkdir roundcubemail-0.7.1/{temp,logs}
# chown www-data:www-data roundcubemail-0.7.1/{temp,logs}

# ---- For Gentoo Linux ----
# tar xzf /root/roundcubemail-0.7.1.tar.gz -C /var/www/
# cd /var/www/
# mkdir roundcubemail-0.7.1/{temp,logs}
# chown apache:apache roundcubemail-0.7.1/{temp,logs}

# ---- For openSUSE ----
# tar xzf /root/roundcubemail-0.7.1.tar.gz -C /srv/www/
# cd /srv/www/
# mkdir roundcubemail-0.7.1/{temp,logs}
# chown wwwrun:www roundcubemail-0.7.1/{temp,logs}

# ---- For FreeBSD ----
# tar xzf /root/roundcubemail-0.7.1.tar.gz -C /usr/local/www/
# cd /usr/local/www/
# mkdir roundcubemail-0.7.1/{temp,logs}
# chown www:www roundcubemail-0.7.1/{temp,logs}
  • Copy config files db.inc.php and main.inc.php from old release to new release. For example:
Terminal:
# cp -p roundcubemail-0.5.2/config/{db.inc.php,main.inc.php} roundcubemail-0.7.1/config/
  • Remove symbol link and create a new one, link to new release:
Terminal:
# rm roundcubemail
# ln -s roundcubemail-0.7.1 roundcubemail
  • Enable Roundcube installer by update below setting in roundcubemail-0.7.1/config/main.inc.php:
Terminal:
$rcmail_config['enable_installer'] = true;

If the installer reports your server misses some required packages or PHP modules, please install them manually to fix them.

  • Set correct time zone in your PHP config file php.ini. For example:
    • On RHEL/CentOS/Scientific Linux, it's /etc/php.ini
    • On Debian/Ubuntu, it's /etc/php5/apache2/php.ini
    • On Gentoo Linux, it's /etc/php/apache2-php5.3/php.ini
    • On openSUSE, it's /etc/php5/apache2/php.ini
    • on FreeBSD, it's /usr/local/etc/php.ini
Terminal:
date.timezone = "Europe/Paris"
  • Restart Apache web server if you have new required packages or PHP modules installed. For example, on Debian/Ubuntu:
Terminal:
# /etc/init.d/apache2 restart
  • Upgrade Roundcube database structure by importing shipped SQL file:
Terminal:
# mysql -uroot -p
mysql> USE roundcubemail;
mysql> SOURCE roundcubemail-0.7.1/SQL/mysql.update.sql;
  • Access Roundcube installer with this URL: httpS://your_server/mail/installer , it will validate required packages, PHP modules and database structure.
  • Roundcube installer also gives the way to download main.inc.php and db.inc.php files, please download them and replace your old config files. Because old config files might miss some parameters. Don't forget to fix file permission after replaced. For example, on Debian/Ubuntu:
Terminal:
# chown www-data:www-data roundcubemail-0.7.1/config/*
  • After Roundcube installer finished upgrading process, disable installer in config file 'roundcubemail-0.7.1/config/main.inc.php' by updating below parameter:
Terminal:
$rcmail_config['enable_installer'] = false;

That's all.

Personal tools