To follow up on my previous post about DAViCal, I’ve built and published RPMs for DAViCal itself and the php-awl dependency.
These are based off provided spec files from the project and tweaked somewhat to be more suitable for RHEL 5 & 6.
RHEL 5 & PostgreSQL 8.1 Note
Whilst DAViCal is intended (and for normal operation, does) work with PostgreSQL 8.1 or later, this version is too old for the LDAP authentication module to work, as it uses some PostgreSQL 8.4 version queries.
Fortunately RHEL & CentOS ship with both PostgreSQL 8.1 and PostgreSQL 8.4 now available, so you can fix the solution by installing with:
# yum install davical postgresql84-server
RHEL 5 & 6 Installation Instructions
These instructions assume you have confirmed the Amberdms RHEL 5 “amberdms-os” repository at minimum – or you can go and pull the specific RPM files you want – php-awl and davical and add them to your own repository.
Once the repositories are setup, simply install with:
# yum install davical
DAViCal uses PostgreSQL, if this is a new/first PostgreSQL installation, you will need to start and possibly initilise the DB:
# service postgresql start /var/lib/pgsql/data is missing. Use "service postgresql initdb" to initialize the cluster first. [FAILED] # service postgresql initdb Initializing database: [ OK ] # service postgresql start Starting postgresql service: [ OK ]
We need to edit the PostgreSQL user authentication configuration to allow local-only password-less access for the DAViCal application. Optionally you can configure MD5, ident or other desired methods. Add the two lines below to the configuration file, above any existing lines.
# vi /var/lib/pgsql/data/pg_hba.conf # trust davical local davical davical_app trust local davical davical_dba trust
Restart PostgreSQL for the changes to take effect:
# service postgresql restart
Install the database:
# cd /tmp/ # su postgres -c /usr/share/davical/dba/create-database.sh Supported locales updated. Updated view: dav_principal.sql applied. CalDAV functions updated. RRULE functions updated. Database permissions updated. NOTE ==== * The password for the 'admin' user has been set to 'EXAMPLE' Thanks for trying DAViCal! Check in /usr/share/doc/davical/examples/ for some configuration examples. For help, visit #davical on irc.oftc.net.
Adjust the access rules for Apache & restart it:
# vi /etc/httpd/conf.d/davical.conf # service httpd restart
Test access at http://localhost/davical/or whatever your appropriate server URL is. Any 403 errors probably suggest fault with the /etc/httpd/conf.d/davical.conf IP ACL configuration.
RHEL 5 & 6 Upgrade Instructions
Using the packages I have provided, the DAViCal PostgreSQL DB will be updated on any new releases when installing newer RPMs.
This uses the /usr/share/davical/dba/update-davical-database script supplied with DAViCal and shouldn’t require any manual execution or options normally.
To configure LDAP authentication, edit the configuration file and define the external authentication settings.
See the notes in the file about LDAP configuration or consult the quite reliable source of documentation at the DAViCal wiki.
You will also need to have php-ldap installed – it’s not one of the default package dependencies – if it’s missing, you will get this clear message on the login screen:
"drivers_ldap : function ldap_connect not defined, check your php_ldap module"
To install, run:
# yum install php-ldap # service httpd restart
If authentication still fails to work, try the following
- Check the version of PostgreSQL used – must be 8.4 or later, not 8.1, as per my note at the start of this document.
- Check Apache error logs (typically /var/log/httpd/error_log)
- Check the LDAP server logs