IRedMail/FAQ/Upgrade.iRedAPD
From iRedMail
(Difference between revisions)
| (16 intermediate revisions not shown) | |||
| Line 1: | Line 1: | ||
---- | ---- | ||
| - | This tutorial describes how to upgrade iRedAPD to the latest stable release. It's applicable on all Linux/BSD distributions supported by iRedMail. | + | This tutorial describes how to upgrade iRedAPD to the latest stable release, iRedAPD-1.4.0. It's applicable on all Linux/BSD distributions supported by iRedMail. |
| + | |||
| + | Important notes: | ||
| + | * Since iRedAPD-1.4.0, we use Python source file as config file, not '.ini' format anymore. | ||
| + | * We don't need second instance, '''iredapd-rr''', anymore. | ||
---- | ---- | ||
| - | * Download the latest stable release here: http://iredmail.org/yum/misc/ For example, iRedAPD-1. | + | * Download the latest stable release here: http://iredmail.org/yum/misc/ For example, iRedAPD-1.4.0.tar.bz2. |
| - | * Upload it to your iRedMail server. Assume it's /root/iRedAPD-1. | + | * Upload it to your iRedMail server. Assume it's '''/root/iRedAPD-1.4.0.tar.bz2''' on the server. |
* Extract downloaded package and move to /opt/. | * Extract downloaded package and move to /opt/. | ||
{{cmd|<pre> | {{cmd|<pre> | ||
| - | # tar xjf /root/iRedAPD-1. | + | # tar xjf /root/iRedAPD-1.4.0.tar.bz2 -C /opt/ |
</pre>}} | </pre>}} | ||
| - | You get a new directory: /opt/iRedAPD-1. | + | You get a new directory: /opt/iRedAPD-1.4.0/. |
| + | |||
| + | * Set correct owner and permission: | ||
| + | {{cmd|<pre> | ||
| + | # chown -R iredapd:iredapd /opt/iRedAPD-1.4.0 | ||
| + | # chmod -R 0700 /opt/iRedAPD-1.4.0 | ||
| + | </pre>}} | ||
| + | |||
| + | * Generate new config file from sample file, and set correct file owner and permission. | ||
| + | {{cmd|<pre> | ||
| + | # cd /opt/iRedAPD-1.4.0/ | ||
| + | # cp settings.py.sample settings.py | ||
| + | # chown -R iredapd:iredapd settings.py | ||
| + | # chmod -R 0600 settings.py | ||
| + | </pre>}} | ||
| + | WARNING: Config file '''/opt/iredapd/settings.py''' contains sensitive infomation (username, password), please don't make it world-readable. Permission 0600 is the best. | ||
| + | |||
| + | * Please open '''/opt/iredapd/settings.py''', and sync settings with old iRedAPD config file '''/opt/iRedAPD-[OLD-VERSION]/etc/iredapd.ini'''. | ||
| + | ** In old version of iRedAPD, all parameters under "[ldap]" section are now new parameters start with '''ldap_'''. | ||
| + | ** In old version of iRedAPD, all parameters under "[sql]" (or "[mysql]") section are now new parameters start with '''sql_'''. | ||
| + | |||
* Remove symbol link of old release: | * Remove symbol link of old release: | ||
{{cmd|<pre> | {{cmd|<pre> | ||
| Line 19: | Line 43: | ||
{{cmd|<pre> | {{cmd|<pre> | ||
# cd /opt/ | # cd /opt/ | ||
| - | # ln -s iRedAPD-1. | + | # ln -s iRedAPD-1.4.0 iredapd |
</pre>}} | </pre>}} | ||
| - | + | * Copy new RC script for your server. We have scripts for different Linux/BSD distributions. Please copy the proper one for your server. For example: | |
| - | * | + | ** /opt/iredapd/rc_scripts/iredapd.debian: For Debian and Ubuntu. |
| + | ** /opt/iredapd/rc_scripts/iredapd.freebsd: For FreeBSD. Please copy to /usr/local/etc/rc.d/. | ||
| + | ** /opt/iredapd/rc_scripts/iredapd.gentoo: For Gentoo Linux. | ||
| + | ** /opt/iredapd/rc_scripts/iredapd.openbsd: For OpenBSD. Please copy to /etc/rc.d/. | ||
| + | ** /opt/iredapd/rc_scripts/iredapd.opensuse: For openSUSE. | ||
| + | ** /opt/iredapd/rc_scripts/iredapd.rhel: For Red Hat, CentOS, Scientific Linux. | ||
{{cmd|<pre> | {{cmd|<pre> | ||
| - | # | + | # cp /opt/iredapd/rc_scripts/iredapd.rhel /etc/init.d/iredapd |
| - | # chmod | + | # chmod +x /etc/init.d/iredapd |
</pre>}} | </pre>}} | ||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
| - | |||
* Restart iRedAPD service: | * Restart iRedAPD service: | ||
| Line 57: | Line 75: | ||
</pre>}} | </pre>}} | ||
| - | + | * If you don't have file '''/etc/init.d/iredapd-rr''' on Linux, or '''/etc/rc.d/iredapd-rr''' on OpenBSD, or '''/usr/local/etc/rc.d/iredapd-rr''' on FreeBSD, it's safe to ignore below steps. But if you have it, please stop service '''iredapd-rr''', then move all enabled plugin names listed in '''/opt/iRedAPD-[OLD_VERSION]/etc/iredapd-rr.ini''' to our new config file '''/opt/iredapd/settings.py''', in parameter '''plugins = '''. | |
| + | {{cmd|<pre> | ||
| + | # /etc/init.d/iredapd-rr stop | ||
| + | # rm /etc/init.d/iredapd-rr | ||
| + | </pre>}} | ||
| + | |||
| + | Check whether you have '''check_policy_service inet:127.0.0.1:7778''' in Postfix config file '''/etc/postfix/main.cf''' (Linux/OpenBSD) or '''/usr/local/etc/postfix/main.cf''', if you have it, please remove '''check_policy_service inet:127.0.0.1:7778''', then restart Postfix service. | ||
| + | That's all. | ||
[[Category: FAQ]] | [[Category: FAQ]] | ||
[[Category: iRedMail/FAQ]] | [[Category: iRedMail/FAQ]] | ||
Current revision as of 12:28, 7 May 2013
This tutorial describes how to upgrade iRedAPD to the latest stable release, iRedAPD-1.4.0. It's applicable on all Linux/BSD distributions supported by iRedMail.
Important notes:
- Since iRedAPD-1.4.0, we use Python source file as config file, not '.ini' format anymore.
- We don't need second instance, iredapd-rr, anymore.
- Download the latest stable release here: http://iredmail.org/yum/misc/ For example, iRedAPD-1.4.0.tar.bz2.
- Upload it to your iRedMail server. Assume it's /root/iRedAPD-1.4.0.tar.bz2 on the server.
- Extract downloaded package and move to /opt/.
| Terminal: |
# tar xjf /root/iRedAPD-1.4.0.tar.bz2 -C /opt/ |
You get a new directory: /opt/iRedAPD-1.4.0/.
- Set correct owner and permission:
| Terminal: |
# chown -R iredapd:iredapd /opt/iRedAPD-1.4.0 # chmod -R 0700 /opt/iRedAPD-1.4.0 |
- Generate new config file from sample file, and set correct file owner and permission.
| Terminal: |
# cd /opt/iRedAPD-1.4.0/ # cp settings.py.sample settings.py # chown -R iredapd:iredapd settings.py # chmod -R 0600 settings.py |
WARNING: Config file /opt/iredapd/settings.py contains sensitive infomation (username, password), please don't make it world-readable. Permission 0600 is the best.
- Please open /opt/iredapd/settings.py, and sync settings with old iRedAPD config file /opt/iRedAPD-[OLD-VERSION]/etc/iredapd.ini.
- In old version of iRedAPD, all parameters under "[ldap]" section are now new parameters start with ldap_.
- In old version of iRedAPD, all parameters under "[sql]" (or "[mysql]") section are now new parameters start with sql_.
- Remove symbol link of old release:
| Terminal: |
# rm -i /opt/iredapd # <- Don't not end with '/'. |
- Create symbol link to the latest release:
| Terminal: |
# cd /opt/ # ln -s iRedAPD-1.4.0 iredapd |
- Copy new RC script for your server. We have scripts for different Linux/BSD distributions. Please copy the proper one for your server. For example:
- /opt/iredapd/rc_scripts/iredapd.debian: For Debian and Ubuntu.
- /opt/iredapd/rc_scripts/iredapd.freebsd: For FreeBSD. Please copy to /usr/local/etc/rc.d/.
- /opt/iredapd/rc_scripts/iredapd.gentoo: For Gentoo Linux.
- /opt/iredapd/rc_scripts/iredapd.openbsd: For OpenBSD. Please copy to /etc/rc.d/.
- /opt/iredapd/rc_scripts/iredapd.opensuse: For openSUSE.
- /opt/iredapd/rc_scripts/iredapd.rhel: For Red Hat, CentOS, Scientific Linux.
| Terminal: |
# cp /opt/iredapd/rc_scripts/iredapd.rhel /etc/init.d/iredapd # chmod +x /etc/init.d/iredapd |
- Restart iRedAPD service:
| Terminal: |
# # ---- On Linux ---- # # /etc/init.d/iredapd restart # # ---- On FreeBSD ---- # # /usr/local/etc/rc.d/iredapd restart # # ---- On OpenBSD ---- # # /etc/rc.d/iredapd restart |
- If you don't have file /etc/init.d/iredapd-rr on Linux, or /etc/rc.d/iredapd-rr on OpenBSD, or /usr/local/etc/rc.d/iredapd-rr on FreeBSD, it's safe to ignore below steps. But if you have it, please stop service iredapd-rr, then move all enabled plugin names listed in /opt/iRedAPD-[OLD_VERSION]/etc/iredapd-rr.ini to our new config file /opt/iredapd/settings.py, in parameter plugins = .
| Terminal: |
# /etc/init.d/iredapd-rr stop # rm /etc/init.d/iredapd-rr |
Check whether you have check_policy_service inet:127.0.0.1:7778 in Postfix config file /etc/postfix/main.cf (Linux/OpenBSD) or /usr/local/etc/postfix/main.cf, if you have it, please remove check_policy_service inet:127.0.0.1:7778, then restart Postfix service.
That's all.
