2016-05-19 06:51:20 -05:00
<!DOCTYPE html>
2014-12-26 20:09:58 -06:00
< html >
< head >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" / >
< title > Install iRedAdmin on OpenBSD< / title >
2015-07-31 23:14:52 -05:00
< link rel = "stylesheet" type = "text/css" href = "./css/markdown.css" / >
2014-12-26 20:09:58 -06:00
< / head >
< body >
2019-07-13 06:21:55 -05:00
2014-12-26 20:09:58 -06:00
< div id = "navigation" >
2017-11-16 21:48:44 -06:00
< a href = "https://www.iredmail.org" target = "_blank" >
2016-04-19 12:48:51 -05:00
< img alt = "iRedMail web site"
src="./images/logo-iredmail.png"
style="vertical-align: middle; height: 30px;"
/>
< span > iRedMail< / span >
< / a >
2016-02-29 02:15:19 -06:00
// < a href = "./index.html" > Document Index< / a > < / div > < h1 id = "install-iredadmin-on-openbsd" > Install iRedAdmin on OpenBSD< / h1 >
2017-09-12 02:01:09 -05:00
< div class = "toc" >
< ul >
< li > < a href = "#install-iredadmin-on-openbsd" > Install iRedAdmin on OpenBSD< / a > < ul >
< li > < a href = "#requirements" > Requirements< / a > < / li >
< li > < a href = "#download-iredadmin-and-configure-apache-web-server" > Download iRedAdmin and configure Apache web server< / a > < / li >
< li > < a href = "#create-required-mysql-database-and-grant-privileges" > Create required MySQL database and grant privileges< / a > < / li >
< li > < a href = "#configure-iredadmin" > Configure iRedAdmin< / a > < / li >
< li > < a href = "#access-iredadmin" > Access iRedAdmin< / a > < / li >
< li > < a href = "#troubleshooting-debug" > Troubleshooting & Debug< / a > < / li >
< / ul >
< / li >
< / ul >
< / div >
2018-12-22 08:06:44 -06:00
< div class = "admonition warning" >
< p class = "admonition-title" > Warning< / p >
< p > This tutorial is out of date and deprecated. Since iRedMail-0.9.8, Apache
was removed and Nginx is the only one web server.< / p >
< / div >
2014-12-26 20:09:58 -06:00
< blockquote >
< p > This tutorial is used to install iRedAdmin from scratch, running under Apache
web server.< / p >
< p > If you already have iRedAdmin open source edition or old iRedAdmin-Pro release
installed, you can simply migrate it to the latest iRedAdmin by follow our short
tutorial: < a href = "./migrate.or.upgrade.iredadmin.html" > Migrate or upgrade iRedAdmin< / a > .< / p >
< / blockquote >
< p > NOTE: This tutorial must be rewritten to use Nginx as web server since OpenBSD
5.6 removes Apache-1.3 in base system, and Nginx will be removed since OpenBSD
5.7.< / p >
< h2 id = "requirements" > Requirements< / h2 >
< p > iRedMail will install all required packages for you, you don't need to
2017-09-12 01:17:46 -05:00
install them manually, below info just for your reference.< / p >
2014-12-26 20:09:58 -06:00
< ul >
2015-06-29 21:08:08 -05:00
< li >
2017-11-16 21:48:44 -06:00
< p > The latest iRedMail release. < a href = "https://www.iredmail.org/download.html" > Download the latest iRedMail< / a > .
2015-06-29 21:08:08 -05:00
NOTE: You must have iRedMail installed on server first.< / p >
< / li >
< li >
< p > < code > Apache< / code > 1.3+, the built-in Apache web server in base system.< / p >
< / li >
2014-12-26 20:09:58 -06:00
< li >
< p > < code > Python< / code > 2.4+, core programming language. Warning: Python 3.x is not supported yet.< / p >
< ul >
< li > < code > web.py< / code > , 0.32+. A python-powered web framework.< / li >
< li > < code > MySQLdb< / code > : A thread-compatible interface to the popular MySQL database server that provides the Python database API. Required if you store mail accounts in OpenLDAP, MySQL or MariaDB.< / li >
< li > < code > Python-LDAP< / code > 2.3.7+: An object-oriented API to access LDAP directory servers from Python programs. Required if you store mail accounts in OpenLDAP.< / li >
< li > < code > Python-psycopg2< / code > : interface to the PostgreSQL database server from Python programs. Required if you store mail accounts in PostgreSQL.< / li >
< / ul >
< / li >
< / ul >
< h2 id = "download-iredadmin-and-configure-apache-web-server" > Download iRedAdmin and configure Apache web server< / h2 >
< ul >
< li >
2017-11-16 21:48:44 -06:00
< p > Download iRedAdmin open source edition < a href = "https://dl.iredmail.org/yum/misc/" > here< / a > .
If you're trying to install iRedAdmin-Pro, please < a href = "https://www.iredmail.org/contact.html" > contact us< / a >
2014-12-26 20:09:58 -06:00
to get download link of iRedAdmin-Pro.< / p >
< / li >
< li >
< p > Copy iRedAdmin to < code > /var/www/< / code > , set correct file permissions, and create symbol link.< / p >
< / li >
< / ul >
< pre > < code > # tar xjf iRedAdmin-x.y.z.tar.bz2 -C /var/www/
# cd /var/www/
# chown -R iredadmin:iredadmin iRedAdmin-x.y.z
# chmod -R 0555 iRedAdmin-x.y.z
# ln -s iRedAdmin-x.y.z iredadmin
< / code > < / pre >
< ul >
< li > Add apache configure file: < code > /var/www/conf/modules/iredadmin.conf< / code > .< / li >
< / ul >
< pre > < code > AddType text/html .py
AddHandler cgi-script .py
< Directory /var/www/iredadmin/>
Options +ExecCGI
Order deny,allow
Allow from all
< /Directory>
< / code > < / pre >
< ul >
< li > Edit < code > /var/www/conf/httpd.conf< / code > , make iredadmin accessible via HTTPS.
Add below lines before < code > < /VirtualHost> < / code > :< / li >
< / ul >
< pre > < code > Alias /iredadmin/static /var/www/iredadmin/static
ScriptAlias /iredadmin /var/www/iredadmin/iredadmin.py
< / code > < / pre >
< ul >
< li > Restart apache to enable mod_wsgi:< / li >
< / ul >
< pre > < code > # /etc/rc.d/httpd restart
< / code > < / pre >
< h2 id = "create-required-mysql-database-and-grant-privileges" > Create required MySQL database and grant privileges< / h2 >
< ul >
< li > Create MySQL database: < code > iredadmin< / code > .< / li >
< / ul >
< pre > < code > # mysql -uroot -p
mysql> CREATE DATABASE iredadmin DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
mysql> USE iredadmin;
mysql> SOURCE /var/www/iredadmin/docs/samples/iredadmin.sql;
< / code > < / pre >
< ul >
< li > Grant privileges to iredadmin user and set password for it. WARNING: Here we
use 'secret_passwd' as password of iredadmin user, please replace it with
your own password.< / li >
< / ul >
< pre > < code > # mysql -uroot -p
mysql> GRANT SELECT,INSERT,UPDATE,DELETE ON iredadmin.* TO iredadmin@localhost IDENTIFIED BY 'secret_passwd';
mysql> FLUSH PRIVILEGES;
< / code > < / pre >
< h2 id = "configure-iredadmin" > Configure iRedAdmin< / h2 >
< ul >
< li >
< p > Copy sample config file, and make it not world-writeable.< / p >
< ul >
< li > settings.py.ldap.sample: sample config file for OpenLDAP backend< / li >
< li > settings.py.mysql.sample: sample config file for MySQL/MariaDB backend< / li >
< li > settings.py.pgsql.sample: sample config file for PostgreSQL backend< / li >
< / ul >
< / li >
< / ul >
< pre > < code > # cd /var/www/iredadmin/
# cp settings.py.[backend].sample settings.py
# chown iredadmin:iredadmin settings.py
# chmod 0400 settings.py
< / code > < / pre >
< ul >
< li >
< p > Update settings.py with correct values. Please read < code > settings.py< / code > for more
information, it's self-documented.< / p >
< / li >
< li >
< p > Restart apache web server.< / p >
< / li >
< / ul >
< pre > < code > # /etc/rc.d/httpd restart
< / code > < / pre >
< h2 id = "access-iredadmin" > Access iRedAdmin< / h2 >
< p > Open your web browser to access iRedAdmin: < code > httpS://your_server_ip_address/iredadmin/< / code > < / p >
< p > Make sure you use < code > HTTPS://< / code > instead of < code > HTTP://< / code > .< / p >
< h2 id = "troubleshooting-debug" > Troubleshooting & Debug< / h2 >
< p > If iRedAdmin doesn't work as expected, you can simplily set < code > DEBUG = True< / code > in
< code > settings.py< / code > , restart apache web server, use your favourite web browser to
2017-10-26 08:13:46 -05:00
access it again, create a new < a href = "https://forum.iredmail.org/" > forum< / a > topic and
2016-05-19 06:51:20 -05:00
paste error message in your forum topic.< / p > < div class = "footer" >
2019-12-31 00:07:48 -06:00
< p style = "text-align: center; color: grey;" > All documents are available in < a href = "https://github.com/iredmail/docs/" > GitHub repository< / a > , and published under < a href = "http://creativecommons.org/licenses/by-nd/3.0/us/" target = "_blank" > Creative Commons< / a > license. You can < a href = "https://github.com/iredmail/docs/archive/master.zip" > download the latest version< / a > for offline reading. If you found something wrong, please do < a href = "https://www.iredmail.org/contact.html" > contact us< / a > to fix it.< / p >
2016-05-19 06:51:20 -05:00
< / div >
2017-11-05 02:33:58 -06:00
<!-- Global site tag (gtag.js) - Google Analytics -->
< script async src = "https://www.googletagmanager.com/gtag/js?id=UA-3293801-21" > < / script >
< script >
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
2015-02-05 07:02:53 -06:00
2017-11-05 02:33:58 -06:00
gtag('config', 'UA-3293801-21');
2014-12-26 20:09:58 -06:00
< / script >
< / body > < / html >