Quick & Dirty Guide to Mioga

Introduction

Mar 2003: The French company Atrid that developed Mioga went out of business; the web site http://www.mioga.org is no longer maintained. A new site is available at http://www.club-mioga.org

Mioga is a Web-based groupware application like PHPGroupWare and is written in Perl by a French software company called ATRID SYSTEMES with support from a government body called Conseil General des Mines. Currently, it offers calendar, upload/download through WebDAV, to-do lists, and other standard modules. Its main author is Gilles POLART-DONAT <g.polart@atrid.fr>.

Note that a lot of references are embedded in configuration files (DB username and password, location of files, etc.).

Setup

  1. Install PostgreSQL. Edit /etc/profile, and define environment variables POSTGRES_INCLUDE (/usr/include/pgsql) and POSTGRES_LIB (/usr/lib) as they are needed to compile DBD-Pg below.
  2. Launch PostgreSQL since DBD-Pg will test the connection when running make test
  3. Install the following Perl modules, each by running "perl Makefile.PL ; make ; (module-dependent) make test ; make install. The order is important, and note that missing from the list given on Mioga's web site are modules HTML-Tagset, Unicode-String, Digest-MD5, and Mail-Mailer:
    • Unicode-String-2.06.tar.gz
    • Digest-MD5-2.13.tar.gz
    • MailTools-1.15.tar.gz (includes Mail-Mailer)
    • DBI-1.13.tar.gz
    • DBD-Pg-0.93.tar.gz (NOTE: su - postgres before running make test)
    • ApacheDBI-0.87.tar.gz
    • MIME-Base64-2.11.tar.gz
    • libnet-1.0607.tar.gz
    • Msgcat-1.03.tar.gz
    • libwww-perl-5.47.tar.gz
    • URI-1.05.tar.gz
    • HTML-Template-1.5.tar.gz
    • DateManip-5.37.tar.gz
    • XML-Parser-2.27.tar.gz
    • XML-DOM-1.25.tar.gz
    • Storable-0.6.7.tar.gz
    • HTML-Tagset-3.03.tar.gz
    • HTML-Parser-3.05.tar.gz

    Note: As an alternative, look at CPAN's web site or http//www.rpmfind.net to make it easier to install all those modules

  4. Compile and install mod_perl, mod_dav, and Apache
    1. cp mod_perl.tar.gz /usr/src
    2. cp mod_dav.tar.gz /usr/src
    3. cp apache.tar.gz /usr/src
    4. cd /usr/src
    5. tar xzvf mod_perl.tar.gz
    6. tar xzvf mod_dav.tar.gz
    7. tar xzvf apache.tar.gz
    8. cd apache ; ./configure --prefix=/usr/local/apache
    9. cd ../mod_perl ; perl Makefile.PL USE_APACI=1 EVERYTHING=1 APACHE_SRC=../apache/src ; make ; make install

      Note: Answer YES when asked whether to configure with Apache, but answer NO when asked to build Apache. You might have to play with different versions of mod_perl and apache to find one that compiles OK.
       
    10. cd ../mod_dav ; ./configure --with-apache=../apache ; make ; make install
    11. cd ../apache ; ./configure --prefix=/usr/local/apache --with-perl=/usr/bin/perl --activate-module=src/modules/perl/libperl.a --activate-module=src/modules/dav/libdav.a --enable-module=info --enable-module=status ; make ; make install
  5. Install the source code for Mioga: cp mioga.tar.gz /usr/src ; cd /usr/src ; tar xzvf mioga.tar.gz ; cd mioga
  6. Build a custom mioga.conf in /usr/src/mioga/web/ from the mioga.conf.example sample:
            HTTPDUser = nobody
            HTTPDGroup = nobody
            DBIUser = mioga
            DBIPassword = mioga
            DBName = mioga
            DBDriver = Pg
            TemplateDir = ./templates
            WebDir = /opt/Mioga/web
            BaseURL = /Mioga
            HomeDir = /opt/Mioga/home
            HomeURL = /MiogaHome
            SFBase = /MiogaSharedFolder
            SFPath = /opt/Mioga/SharedFolder
            SFFolderName = SharedFolder
            MessagesPath = /opt/Mioga/messages
            BinPath = /opt/Mioga/bin
            ManageGroupList = manageGroupList
            TimeZone = MET
            ClipboardName = .clipboard
            FileNameLength = 80
            DateFormat = %d/%m/%Y %H:%M:%S
            ContextTimeout = 60
            FirstOrganizerHour = 8
            LastOrganizerHour = 20
            TimeResolution = 2
            MondayFirst = 1
            Language = french
            TmpPath=/tmp
            SearchCmd = /cgi-bin/htsearch?config=mioga&restrict=&exclude=&format=short&    
  7. cd /usr/src/mioga/ ; perl Makefile.PL ; make
  8. Create the manageGroupList binary (used to create/remove a qmail account for a group of users): cd bin ; gcc -o manageGroupList qmail_manage_group_list.c
  9. Finish installing Mioga: cd .. ; make install
  10. Log on as postgres (su - postgres), and create the mioga database: createdb mioga ; psql mioga mioga < /usr/src/mioga/sql/schema_base.sql
  11. Create the tables in the mioga database: /usr/src/mioga/sql/init_sql.sh mioga mioga /Mioga /MiogaHome /MiogaSharedFolder
  12. Edit /usr/local/apache/conf/httpd.conf, and include the following (you might need to customize the highlighted item):
    PerlModule Apache::Registry Apache::AuthDBI Mioga::apache::ACL 
    Alias /Mioga /opt/Mioga/web
    <Directory /opt/Mioga/web> DirectoryIndex start Options +ExecCGI SetHandler perl-script PerlHandler Apache::Registry AuthType Basic AuthName Mioga PerlAuthenHandler Apache::AuthDBI::authen PerlSetVar Auth_DBI_data_source dbi:Pg:dbname=mioga PerlSetVar Auth_DBI_username mioga PerlSetVar Auth_DBI_password mioga PerlSetVar Auth_DBI_encrypted off PerlSetVar Auth_DBI_pwd_table m_user PerlSetVar Auth_DBI_uid_field ident PerlSetVar Auth_DBI_pwd_field passwd PerlAuthzHandler Mioga::apache::ACL PerlSetVar Mioga_ACL_data_source dbi:Pg:dbname=mioga PerlSetVar Mioga_ACL_username mioga PerlSetVar Mioga_ACL_password mioga PerlSetVar Mioga_ACL_authz_id_group id_group PerlSetVar Mioga_ACL_authz_id_request id_request PerlSetVar Mioga_ACL_authz_id_uri id_uri PerlSetVar Mioga_ACL_authorize m_authorize PerlSetVar Mioga_ACL_usergroup_id_group id_group PerlSetVar Mioga_ACL_usergroup_id_user id_user PerlSetVar Mioga_ACL_user_group m_user_group PerlSetVar Mioga_ACL_user_ident ident PerlSetVar Mioga_ACL_user_rowid rowid PerlSetVar Mioga_ACL_user m_user PerlSetVar Mioga_ACL_request_rowid rowid PerlSetVar Mioga_ACL_request_request request PerlSetVar Mioga_ACL_request m_request PerlSetVar Mioga_ACL_uri_rowid rowid PerlSetVar Mioga_ACL_uri_uri uri PerlSetVar Mioga_ACL_uri m_uri require valid-user </Directory> <Directory /opt/Mioga/web/images> SetHandler default-handler </Directory> DAVLockDB /usr/local/apache/dav/DAVLocks   Alias /MiogaHome /opt/Mioga/home <Directory /opt/Mioga/home> Dav On Options +Indexes IndexOptions FancyIndexing NameWidth=* PerlModule Apache::Registry Apache::AuthDBI Mioga::apache::ACL PerlHandler Apache::Registry AuthType Basic AuthName Mioga PerlAuthenHandler Apache::AuthDBI::authen PerlSetVar Auth_DBI_data_source dbi:Pg:dbname=mioga PerlSetVar Auth_DBI_username mioga PerlSetVar Auth_DBI_password mioga PerlSetVar Auth_DBI_encrypted off PerlSetVar Auth_DBI_pwd_table m_user PerlSetVar Auth_DBI_uid_field ident PerlSetVar Auth_DBI_pwd_field passwd PerlAuthzHandler Mioga::apache::ACL PerlSetVar Mioga_ACL_data_source dbi:Pg:dbname=mioga PerlSetVar Mioga_ACL_username mioga PerlSetVar Mioga_ACL_password mioga PerlSetVar Mioga_ACL_authz_id_group id_group PerlSetVar Mioga_ACL_authz_id_request id_request PerlSetVar Mioga_ACL_authz_id_uri id_uri PerlSetVar Mioga_ACL_authorize m_authorize PerlSetVar Mioga_ACL_usergroup_id_group id_group PerlSetVar Mioga_ACL_usergroup_id_user id_user PerlSetVar Mioga_ACL_user_group m_user_group PerlSetVar Mioga_ACL_user_ident ident PerlSetVar Mioga_ACL_user_rowid rowid PerlSetVar Mioga_ACL_user m_user PerlSetVar Mioga_ACL_request_rowid rowid PerlSetVar Mioga_ACL_request_request request PerlSetVar Mioga_ACL_request m_request PerlSetVar Mioga_ACL_uri_rowid rowid PerlSetVar Mioga_ACL_uri_uri uri PerlSetVar Mioga_ACL_uri m_uri require valid-user </Directory>   Alias /MiogaSharedFolder /opt/Mioga/SharedFolder <Directory /opt/Mioga/SharedFolder> Dav On Options +Indexes IndexOptions FancyIndexing NameWidth=* PerlModule Apache::Registry Apache::AuthDBI Mioga::apache::ACL PerlHandler Apache::Registry AuthType Basic AuthName Mioga PerlAuthenHandler Apache::AuthDBI::authen PerlSetVar Auth_DBI_data_source dbi:Pg:dbname=mioga PerlSetVar Auth_DBI_username mioga PerlSetVar Auth_DBI_password mioga PerlSetVar Auth_DBI_encrypted off PerlSetVar Auth_DBI_pwd_table m_user PerlSetVar Auth_DBI_uid_field ident PerlSetVar Auth_DBI_pwd_field passwd PerlAuthzHandler Mioga::apache::ACL PerlSetVar Mioga_ACL_data_source dbi:Pg:dbname=mioga PerlSetVar Mioga_ACL_username mioga PerlSetVar Mioga_ACL_password mioga PerlSetVar Mioga_ACL_authz_id_group id_group PerlSetVar Mioga_ACL_authz_id_request id_request PerlSetVar Mioga_ACL_authz_id_uri id_uri PerlSetVar Mioga_ACL_authorize m_authorize PerlSetVar Mioga_ACL_usergroup_id_group id_group PerlSetVar Mioga_ACL_usergroup_id_user id_user PerlSetVar Mioga_ACL_user_group m_user_group PerlSetVar Mioga_ACL_user_ident ident PerlSetVar Mioga_ACL_user_rowid rowid PerlSetVar Mioga_ACL_user m_user PerlSetVar Mioga_ACL_request_rowid rowid PerlSetVar Mioga_ACL_request_request request PerlSetVar Mioga_ACL_request m_request PerlSetVar Mioga_ACL_uri_rowid rowid PerlSetVar Mioga_ACL_uri_uri uri PerlSetVar Mioga_ACL_uri m_uri require valid-user </Directory>
  13.  TODO: Install the indexing module ht://dig
    (From INSTALL)
    There is some files to complete ans move for the htdig installation mioga.conf must be edited and copied to the configuration directory. The bad word file must be copied in /opt/Mioga/htdig. The crawl.pl and make_list.pl files must be copied in /opt/Mioga/htdig. crawl.pl construct the database. make_list.pl crawl the local system to find all the URL and adds them to a start file for htdig.
  14. Launch Apache, aim at http://localhost/Mioga (or wherever Apache is running), and have a good one!

Q&A

Some Perl modules complain about missing dependencies, although files are OK

Because Perl expects to find libraries in certain locations. This is shown by running "perl -v", eg. "Can't locate DBI.pm in @INC (@INC contains: /usr/lib/perl5/5.6.0/i386-linux /usr/lib/perl5/5.6.0 /usr/lib/perl5/site_perl/5.6.0/i386-linux /usr/lib/perl5/site_perl/5.6.0 /usr/lib/perl5/site_perl .) at Makefile.PL line 7."

Temp stuff

Is MIOGA customized to work with qmail, or is any MTA OK?

/usr/src/mioga/bin/qmail_manage_group_list.c

Warning when compiling binary file manageGroupList on a standard RH 7.1

[root@mylinux bin]# gcc -o manageGroupList qmail_manage_group_list.c
qmail_manage_group_list.c: In function `main':
qmail_manage_group_list.c:58: warning: passing arg 1 of `sprintf' from incompatible pointer type
qmail_manage_group_list.c:60: warning: passing arg 1 of `sprintf' from incompatible pointer type
qmail_manage_group_list.c:65: warning: passing arg 1 of `sprintf' from incompatible pointer type

Bunch of ERRORS when creating tables by running psql mioga mioga < schema_base.sql

bash-2.04$ psql mioga mioga < /tmp/mioga/Mioga-0.50/sql/schema_base.sql
ERROR:  Relation 'm_user' does not exist
ERROR:  Relation 'm_user_rowid_seq' does not exist
NOTICE:  CREATE TABLE will create implicit sequence 'm_user_rowid_seq' for SERIAL column 'm_user.rowid'
NOTICE:  CREATE TABLE/UNIQUE will create implicit index 'm_user_rowid_key' for table 'm_user'
NOTICE:  CREATE TABLE/UNIQUE will create implicit index 'm_user_ident_key' for table 'm_user'
CREATE
etc....

Authentication Failed with mioga/mioga

[error] access to /Mioga failed for 127.0.0.1, reason: 2695 Apache::AuthDBI::authen password for user mioga not found

Due to DB or table access prob? Sthing in httpd.conf? Need to create a mioga/mioga user?

 mioga=# select * from m_user;
 rowid |  creation  | modification | sys_user |  ident  | passwd  |      name      | email | clipboard | home_dir
-------+------------+--------------+----------+---------+---------+----------------+-------+-----------+----------
     1 | 2000-01-01 | 2000-01-01   | t        | admin   | mioga   | Administrateur |       |           | admin
     2 | 2000-01-01 | 2000-01-01   | t        | crawler | crawler | Administrateur |       |           | admin
(2 rows)

Can log on as admin/mioga, but some features fail with errors

eg. clicking on Shared Folders | Create, followed by New Folder | Name -> " The server encountered an internal error or misconfiguration and was unable to complete your request." Log sez:

[Mon Jun  4 03:29:26 2001] DOM.pm: Unrecognized escape \d passed through at /usr/lib/perl5/site_perl/5.6.0/XML/DOM.pm line 136.
[Mon Jun  4 03:30:10 2001] null: Use of uninitialized value in string at /usr/lib/perl5/site_perl/5.6.0/Mioga/SFMenu.pm line 1408.
[Mon Jun  4 03:30:10 2001] [error] Can't call method "GetPath" on an undefined value at /usr/lib/perl5/site_perl/5.6.0/Mioga/SFMenu.pm line 1419.

What about require valid-user in httpd.conf?

DAVLockDB /opt/apache/dav/DAVLocks

No trace of /usr/local/apache/dav sub-directory. Should I change the above to /usr/local/apache/dav/DAVLocks and let mioga create it?

Is it ok to have Apache living in /usr/local/apache and Mioga's stuff in /opt/Mioga?

Resources