Install/iRedAdmin-Pro/MySQL/OpenSuSE

From iRedMail

(Difference between revisions)
Jump to: navigation, search
(Configure iRedAdmin)
(Configure iRedAdmin)
Line 115: Line 115:
[amavisd]
[amavisd]
# Database "amavisd". Required for Amavisd-New integration. includes spam quarantining/releasing.
# Database "amavisd". Required for Amavisd-New integration. includes spam quarantining/releasing.
 +
</pre>}}
 +
 +
* Restart apache web server.
 +
{{cmd|<pre>
 +
# /etc/init.d/apache2 restart
</pre>}}
</pre>}}
= Troubleshooting =
= Troubleshooting =

Revision as of 03:41, 29 January 2011

Contents

System requirements

  • Apache, 2.2+. Web server. Already shipped within RHEL/CentOS 5.x.
    • mod_wsgi 2.1+. Apache module used to host Python application which supports the Python WSGI interface.
  • Python 2.4+, core programming language. Already shipped within RHEL/CentOS 5.x. Warning: Python 3.x is not supported yet.
  • Web.py, 0.32+. A python-powered web framework.
    • MySQLdb. A thread-compatible interface to the popular MySQL database server that provides the Python database API.

Add new system account: iredadmin

We will make iRedAdmin run with Apache web server, but as non-apache, low privilege user: iredadmin.

Terminal:
# useradd -s /sbin/nologin -m -d /home/iredadmin iredadmin 

Install necessary packages

  • Make sure you have OpenSuSE package repository configured: /etc/zypp/repos.d/repo-oss.repo.
File: /etc/zypp/repos.d/repo-oss.repo
[repo-oss]
name=openSUSE-11.3-Oss
enabled=1
... # <- Skip other lines here
  • Add iRedMail zypper repository for Apache modules: /etc/zypp/repos.d/iRedMail.repo.
File: /etc/zypp/repos.d/iRedMail.repo
[iRedMail]
name=iRedMail
baseurl=http://iredmail.org/yum/opensuse/11.3/
enabled=1
autorefresh=1
path=/
type=rpm-md
keeppackages=0
gpgcheck=0
  • Install necessary packages.
Terminal:
# zypper refresh
# zypper install apache2-mod_wsgi python-jinja2 python-ldap python-mysql python-setuptools
# a2enmod wsgi
# easy_install web.py DBUtils

Download iRedAdmin and configure Apache web server

  • Get iRedAdmin:
    • If you purchased iRedAdmin-Pro-MySQL, you should already have it. If not, please mail to support@ iredmail.org to get a download link.
    • If you didn't purchase iRedAdmin-Pro-MySQL, download iRedAdmin open source edition from download page.
  • Copy iRedAdmin to /srv/www/, set correct file permissions, and create symbol link.
Terminal:
# tar xjf iRedAdmin-x.y.z.tar.bz2 -C /srv/www/
# cd /srv/www/
# chown -R iredadmin iRedAdmin-x.y.z
# chmod -R 0755 iRedAdmin-x.y.z
# ln -s iRedAdmin-x.y.z iredadmin
  • Add apache configure file: /etc/apache2/conf.d/iredadmin.conf.
File: /etc/apache2/conf.d/iredadmin.conf
#
# Note: Uncomment below two lines if you want to make iRedAdmin accessable via HTTP.
#
#WSGIScriptAlias /iredadmin /srv/www/iredadmin/iredadmin.py/
#Alias /iredadmin/static /srv/www/iredadmin/static/

WSGISocketPrefix /var/run/wsgi
WSGIDaemonProcess iredadmin user=iredadmin threads=15
WSGIProcessGroup iredadmin

AddType text/html .py

<Directory /srv/www/iredadmin/>
    Order deny,allow
    Allow from all
</Directory>
  • Edit /etc/httpd/conf.d/ssl.conf, make iredadmin accessable via HTTPS. Add below lines before </VirtualHost>:
File: /etc/httpd/conf.d/ssl.conf
WSGIScriptAlias /iredadmin /srv/www/iredadmin/iredadmin.py/
Alias /iredadmin/static /srv/www/iredadmin/static/
  • Restart apache to enable mod_wsgi:
Terminal:
# /etc/init.d/httpd restart

Create necessary MySQL database and grant privileges

Configure iRedAdmin

  • Copy example config file, and make it not world-writeable.
Terminal:
# cd /srv/www/iredadmin/
# cp settings.ini.ldap.sample settings.ini
# chown iredadmin settings.ini
# chmod 0600 settings.ini
  • Edit settings.ini and set correct values.
    • NOTE: For more inforamtion, please open settings.ini, it's self-documented.
File: settings.ini
[general]
# General settings ...

[iredadmin]
# Database "iredadmin". required by iRedAdmin.

[vmaildb]
# Database "vmail", stored all mail accounts.

[policyd]
# Database "policyd". Required for policyd integration.

[amavisd]
# Database "amavisd". Required for Amavisd-New integration. includes spam quarantining/releasing.
  • Restart apache web server.
Terminal:
# /etc/init.d/apache2 restart

Troubleshooting

Personal tools