From Davical
Jump to navigationJump to search
  • Note: this howto has been last updated in late August 2010, and describe how DAViCal was handled at that time. It comes "as-is" and shouldn't be followed blindly but adjusted to your needs. Do not hesitate to update the guide.


Since 2008, an ebuild for davical is available in the Gentoo Sunrise overlay. See the instruction about how to set up the overlay here. You might need to mask a few packages using /etc/portage/package.mask such as higher version of PHP available from the overlay, etc.

Use flags

If you use a server profile, you'll have the mysql flag turned on by default (see: eselect profile show). DAViCal depends on postgres, so if you don't need MySQL for other purposes, make sure to disable the use flag either in make.conf or in /etc/portage/package.use so that installing DAViCal doesn't bring MySQL for nothing.

You'll need to enable both the postgres and apache2 use flag for PHP, and eventually, disable the mysql one, see the comment above. Apparently, you also need the pdo use flag, see PHP Config.

dev-lang/php -mysql postgres apache2 pdo

Again, if you have a server profile, the apache2 use flag will be one by default.


Then, you can start emerging stuff, DAViCal needs postgresql-server to work, but doesn't depends on it since you use another box as the postgresql server, so, you'll have to emerge it manually, if you plan to run everything locally.

emerge -av davical
emerge -av postgresql-server # Optionnal

When everything is installed (davical, postgres*, php, apache2 etc), you can start configuration stuffs.


Run emerge --config when it's required, then start the postgresqsl-server if you run it locally, then locate the sqlscripts directory of davical (qlist davical will list davical's files).

/etc/init.d/postgresql start
# Run the create-database script as the postgres user:
su postgres -c /usr/share/webapps/davical/0.9.9/sqlscripts/

Don't forget to note the admin password, if by mistake you forget to do so, just run the following command:

psql davical -c 'select username, password from usr;' -U postgres

After running you might have to append the following lines in /var/lib/postgresql/<version>/data/pg_hba.conf:

local davical davical_dba trust
local davical davical_app trust
# You must then reload postgres
/etc/init.d/postgresql-server reload

If you used the vhosts use flag of davical, you'll have to run webapp-config.

Now, you can create your apache2 vhost, mine looks like this (assuming is my domain):

<VirtualHost *:80>
  DirectoryIndex index.php index.html
  Alias /images/ /var/www/
  DocumentRoot /var/www/
  ErrorLog  /var/log/apache2/cal.example.net_error.log
  CustomLog /var/log/apache2/ combined
  <Directory /var/www/>
        AllowOverride None
        Order allow,deny
        allow from all
  php_value include_path "/usr/share/php5/awl:/usr/share/webapps/davical/0.9.9/hostroot/inc/"

You can now continue with regular DAViCal configuration by creating and adjusting values of /etc/davical/ where is your domain, see the second link in the See Also section, or the above example :

$c->domain_name = "";
$c->sysabbr     = 'DAViCal';
$c->admin_email = '';
$c->system_name = "Zaphod's DAViCal Server";
$c->enable_row_linking = true;
$c->pg_connect[] = 'dbname=davical port=5432 user=davical_app host=localhost';

See Also