<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="http://www.iredmail.org/wiki/skins/common/feed.css?207"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Install/iRedAdmin-Pro/PGSQL/openSuSE - Revision history</title>
		<link>http://www.iredmail.org/wiki/index.php?title=Install/iRedAdmin-Pro/PGSQL/openSuSE&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.15.5</generator>
		<lastBuildDate>Sat, 25 May 2013 04:15:57 GMT</lastBuildDate>
		<item>
			<title>ZhangHuangbin:&amp;#32;Created page with ' __TOC__  If you already have iRedAdmin open source edition installed, you can migrate from iRedAdmin open source edition to iRedAdmin-Pro with just few steps: * [[Migrate/iRedAd…'</title>
			<link>http://www.iredmail.org/wiki/index.php?title=Install/iRedAdmin-Pro/PGSQL/openSuSE&amp;diff=2048&amp;oldid=prev</link>
			<description>&lt;p&gt;Created page with &amp;#39; __TOC__  If you already have iRedAdmin open source edition installed, you can migrate from iRedAdmin open source edition to iRedAdmin-Pro with just few steps: * [[Migrate/iRedAd…&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
If you already have iRedAdmin open source edition installed, you can migrate from iRedAdmin open source edition to iRedAdmin-Pro with just few steps:&lt;br /&gt;
* [[Migrate/iRedAdmin-Pro/OSE-Pro |Migrate from iRedAdmin open source edition to iRedAdmin-Pro]]&lt;br /&gt;
&lt;br /&gt;
= Summary =&lt;br /&gt;
* This installation guide is used to install iRedAdmin-Pro-PGSQL on openSUSE.&lt;br /&gt;
* iRedAdmin-Pro is official web-based admin panel for iRedMail. There're three editions available:&lt;br /&gt;
** '''iRedAdmin-Pro-LDAP''': works with OpenLDAP backend.&lt;br /&gt;
** '''iRedAdmin-Pro-MySQL''': works with MySQL backend.&lt;br /&gt;
** '''iRedAdmin-Pro-PGSQL''': works with PostgreSQL backend.&lt;br /&gt;
&lt;br /&gt;
= System requirements =&lt;br /&gt;
* iRedMail-0.8.0 or later releases.&lt;br /&gt;
* iRedAdmin-Pro-PGSQL-1.0 or later releases.&lt;br /&gt;
&lt;br /&gt;
* Required Packages. They all are installed automatically during iRedMail installation.&lt;br /&gt;
** '''Apache''', 2.2+. Web server.&lt;br /&gt;
*** '''mod_wsgi''' 2.1+. Apache module used to host Python application which supports the Python WSGI interface.&lt;br /&gt;
** '''Python''' 2.4+, core programming language. Warning: Python 3.x is not supported yet.&lt;br /&gt;
*** '''web.py''', 0.32+. A python-powered web framework.&lt;br /&gt;
*** '''psycopg2'''. A interface to the popular PostgreSQL database server that provides the Python database API.&lt;br /&gt;
&lt;br /&gt;
iRedAdmin will run with a low-privileged system user: iredadmin, which is created automatically during iRedMail installation, too.&lt;br /&gt;
&lt;br /&gt;
= Download iRedAdmin and configure Apache web server =&lt;br /&gt;
* Get iRedAdmin:&lt;br /&gt;
** If you purchased iRedAdmin-Pro-PGSQL, you should already have it. If not, please mail to '''support@ iredmail.org''' to get a download link.&lt;br /&gt;
** If you didn't purchase iRedAdmin-Pro-PGSQL, download iRedAdmin open source edition from [http://www.iredmail.org/download.html#iredadmin download page].&lt;br /&gt;
&lt;br /&gt;
* Copy iRedAdmin to /srv/www/, set correct file permissions, and create symbol link.&lt;br /&gt;
{{cmd|&amp;lt;pre&amp;gt;&lt;br /&gt;
# tar xjf iRedAdmin-x.y.z.tar.bz2 -C /srv/www/&lt;br /&gt;
# cd /srv/www/&lt;br /&gt;
# chown -R iredadmin:iredadmin iRedAdmin-x.y.z&lt;br /&gt;
# chmod -R 0755 iRedAdmin-x.y.z&lt;br /&gt;
# ln -s iRedAdmin-x.y.z iredadmin&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
* Add apache configure file: /etc/apache2/conf.d/iredadmin.conf.&lt;br /&gt;
{{cfg|/etc/apache2/conf.d/iredadmin.conf|&amp;lt;pre&amp;gt;&lt;br /&gt;
WSGISocketPrefix /var/run/wsgi&lt;br /&gt;
WSGIDaemonProcess iredadmin user=iredadmin threads=15&lt;br /&gt;
WSGIProcessGroup iredadmin&lt;br /&gt;
&lt;br /&gt;
AddType text/html .py&lt;br /&gt;
&lt;br /&gt;
&amp;lt;Directory /srv/www/iredadmin/&amp;gt;&lt;br /&gt;
    Order deny,allow&lt;br /&gt;
    Allow from all&lt;br /&gt;
&amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
* Edit /etc/apache2/vhosts.d/vhost-ssl.conf, make iredadmin accessable via HTTPS. Add below lines before &amp;lt;/VirtualHost&amp;gt;:&lt;br /&gt;
{{cfg|/etc/apache2/vhosts.d/vhost-ssl.conf|&amp;lt;pre&amp;gt;&lt;br /&gt;
WSGIScriptAlias /iredadmin /srv/www/iredadmin/iredadmin.py/&lt;br /&gt;
Alias /iredadmin/static /srv/www/iredadmin/static/&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
* Restart apache to enable mod_wsgi:&lt;br /&gt;
{{cmd|&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
= Create necessary PostgreSQL database and grant privileges =&lt;br /&gt;
&lt;br /&gt;
# Create SQL database: iredadmin. Used to store sessions, admin operation logs, etc.&lt;br /&gt;
# Create SQL user: iredadmin, with password 'plain_password' (without quotes).&lt;br /&gt;
# Create required SQL tables and grant privileges.&lt;br /&gt;
{{cmd|&amp;lt;pre&amp;gt;&lt;br /&gt;
# su - postgres&lt;br /&gt;
$ psql&lt;br /&gt;
sql&amp;gt; CREATE DATABASE iredadmin WITH TEMPLATE template0 ENCODING 'UTF8';&lt;br /&gt;
sql&amp;gt; CREATE ROLE iredadmin WITH LOGIN ENCRYPTED PASSWORD 'plain_password' NOSUPERUSER NOCREATEDB NOCREATEROLE;&lt;br /&gt;
sql&amp;gt; \c iredadmin;&lt;br /&gt;
sql&amp;gt; \i /srv/www/iredadmin/docs/samples/iredadmin.pgsql;&lt;br /&gt;
sql&amp;gt; GRANT INSERT,UPDATE,DELETE,SELECT on sessions,log,updatelog to iredadmin;&lt;br /&gt;
sql&amp;gt; GRANT UPDATE,USAGE,SELECT ON log_id_seq TO iredadmin;&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
= Configure iRedAdmin =&lt;br /&gt;
&lt;br /&gt;
The major config file of iRedAdmin is file '''/srv/www/iredadmin/settings.ini'''.&lt;br /&gt;
&lt;br /&gt;
* Copy example config file, and set correct file permission.&lt;br /&gt;
{{cmd|&amp;lt;pre&amp;gt;&lt;br /&gt;
# cd /srv/www/iredadmin/&lt;br /&gt;
# cp settings.ini.pgsql.sample settings.ini&lt;br /&gt;
# chown iredadmin:iredadmin settings.ini&lt;br /&gt;
# chmod 0400 settings.ini&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''NOTE''': If you are installing iRedAdmin-Pro, and have iRedAdmin open source edition installed, you can simply copy '''settings.ini''' from open source edition. Don't forget to set correct file owner and permission after copied.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
* Edit '''settings.ini'''.&lt;br /&gt;
&lt;br /&gt;
'''NOTE''':&lt;br /&gt;
** All required usernames/passwords are stored in '''iRedMail.tips''' which generated during iRedMail installation, placed under iRedMail directory. e.g. /root/iRedMail-0.8.0/iRedMail.tips.&lt;br /&gt;
** For more inforamtion, please open '''settings.ini''', it's self-documented.&lt;br /&gt;
{{cfg|settings.ini|&amp;lt;pre&amp;gt;&lt;br /&gt;
[general]&lt;br /&gt;
# General settings ...&lt;br /&gt;
&lt;br /&gt;
[iredadmin]&lt;br /&gt;
# Database &amp;quot;iredadmin&amp;quot;. required by iRedAdmin.&lt;br /&gt;
&lt;br /&gt;
[vmaildb]&lt;br /&gt;
# Database &amp;quot;vmail&amp;quot;, stored all mail accounts.&lt;br /&gt;
&lt;br /&gt;
[policyd]&lt;br /&gt;
# Database &amp;quot;policyd&amp;quot;. Required for policyd integration.&lt;br /&gt;
&lt;br /&gt;
[amavisd]&lt;br /&gt;
# Database &amp;quot;amavisd&amp;quot;. Required for Amavisd-New integration. includes spam quarantining/releasing.&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
* Restart apache web server.&lt;br /&gt;
{{cmd|&amp;lt;pre&amp;gt;&lt;br /&gt;
# /etc/init.d/apache2 restart&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
* Open your web browser to access iRedAdmin: https://your_server_ip_address/iredadmin/&lt;br /&gt;
** '''NOTE''': Make sure you use HTTPS:// instead of HTTP://.&lt;br /&gt;
&lt;br /&gt;
= Troubleshooting =&lt;br /&gt;
If iRedAdmin doesn't work as expected, you can set '''debug = True''' in settings.ini to turn on debug mode, restart apache web server, use your favourite web browser to access it again, create a new forum topic and paste error message in forum topic.&lt;br /&gt;
{{cfg|settings.ini|&amp;lt;pre&amp;gt;&lt;br /&gt;
[general]&lt;br /&gt;
debug = True&lt;br /&gt;
&amp;lt;/pre&amp;gt;}}&lt;/div&gt;</description>
			<pubDate>Sun, 06 May 2012 05:53:27 GMT</pubDate>			<dc:creator>ZhangHuangbin</dc:creator>			<comments>http://www.iredmail.org/wiki/index.php?title=Talk:Install/iRedAdmin-Pro/PGSQL/openSuSE</comments>		</item>
	</channel>
</rss>