.. _installfedora:

================
Baruwa on Fedora
================

Configure MailScanner
=====================

:ref:`Configure <mailscanner>` MailScanner if you have not already done so.

Baruwa rpm install
==================

Download the rpm from `topdog-software.com <http://www.topdog-software.com/oss/baruwa/>`_,

Now proceed and install the rpm::

    # yum --nogpgcheck localinstall baruwa-<version>.noarch.rpm

Create the database::

	 # mysqladmin -u root -p create baruwa

Create the database user::

    mysql> GRANT ALL ON baruwa.* TO baruwa@localhost IDENTIFIED BY '<password>';
    mysql> flush privileges;

Configure Baruwa
================

Edit the baruwa settings.py::

	# baruwa_path=$(python2.4 -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")
	# vi $baruwa_path/setttings.py

And set the mysql database details::

    DATABASE_ENGINE = 'mysql'           
    DATABASE_NAME = 'baruwa'             
    DATABASE_USER = 'baruwa'             
    DATABASE_PASSWORD = '<baruwa_password>'         
    DATABASE_HOST = 'localhost'

Create the baruwa admin user and populate the database::

	# $baruwa_path/baruwa/manage.py syncdb       

Edit the settings.py file and make the baruwa specific changes to suit
your install::

	# vi $baruwa_path/setttings.py

**Setup Web server**

Edit your apache configurations to enable virtual hosting if
not enabled already. Then set the correct hostname in 
/etc/httpd/conf.d/baruwa.conf::

    # change to your hostname
    ServerName baruwa-alpha.local

Make sure mod_wsgi is enabled, uncomment the following line in
/etc/httpd/conf.d/wsgi.conf::

    LoadModule wsgi_module modules/mod_wsgi.so
    
Restart apache and point your browser to the hostname url.
