Difference between revisions of "Installation Guide Update"

From Davical
Jump to navigationJump to search
(TroubleShooting)
(Get rid of 'general' user)
Line 9: Line 9:
 
# install the packages as described on [http://rscds.sourceforge.net/installation.php http://rscds.sourceforge.net/installation.php]  
 
# install the packages as described on [http://rscds.sourceforge.net/installation.php http://rscds.sourceforge.net/installation.php]  
 
# also make sure that a postgre-sql server is available to your DAViCal installation (version 8.1 or higher). This database server can be on the same system as DAViCal, or on a different machine on the network. (Which is why it is not considered a dependecy of the DAViCal package.)  
 
# also make sure that a postgre-sql server is available to your DAViCal installation (version 8.1 or higher). This database server can be on the same system as DAViCal, or on a different machine on the network. (Which is why it is not considered a dependecy of the DAViCal package.)  
 
====Creating the Web User for the Database====
 
 
<pre>sudo su
 
su postgres -c "createuser --no-createdb --no-createrole general"
 
</pre>
 
 
After this command you might get a question wheater your new user(role) should be a superuser, it is inherent to answer yes on this question.
 
 
  
 
====Creating and Building the Database====
 
====Creating and Building the Database====
Line 26: Line 17:
 
====Connecting to the Database====
 
====Connecting to the Database====
  
Once your database has been created, you also need to edit your '''/etc/postgresql/#YOUR_VERSION#/main/pg_hba.conf''' file in order to grant the application access to the database as the 'general' user.  
+
Once your database has been created, you also need to edit your '''/etc/postgresql/#YOUR_VERSION#/main/pg_hba.conf''' file in order to grant the application access to the database as the 'davical_app' user, and to grant access as the 'davical_dba' user for the scripts that will occasionally need to run when upgrading to a future version.  
  
 
In a simple installation, where you do not have untrusted users on your database server, and your database is on the same computer as the web server, the following line (near the top of the pg_hba.conf file) should be enough:  
 
In a simple installation, where you do not have untrusted users on your database server, and your database is on the same computer as the web server, the following line (near the top of the pg_hba.conf file) should be enough:  
  
<pre>local  davical    general   trust
+
<pre>local  davical    davical_app  trust
 +
local  davical    davical_dba   trust
 
</pre>
 
</pre>
  
Line 37: Line 29:
 
'''Don't forget to restart the PostgreSQL Server:'''  
 
'''Don't forget to restart the PostgreSQL Server:'''  
  
<pre>/etc/init.d/postgresql-#YOUR_VERSION# restart
+
<pre>/etc/init.d/postgresql-#YOUR_VERSION# reload
 
</pre>
 
</pre>
  
Line 62: Line 54:
 
//  $c->sysabbr    = 'davical';
 
//  $c->sysabbr    = 'davical';
 
   $c->admin_email = 'admin@example.net';
 
   $c->admin_email = 'admin@example.net';
   $c->system_name = "Really Simple CalDAV Store";
+
   $c->system_name = "DAViCal CalDAV Server";
 
//  $c->collections_always_exist = true;
 
//  $c->collections_always_exist = true;
 
//  $c->enable_row_linking = true;
 
//  $c->enable_row_linking = true;
 
   $c->default_locale = en_US.UTF-8;
 
   $c->default_locale = en_US.UTF-8;
  
   $c->pg_connect[] = 'dbname=davical port=5432 user=general';
+
   $c->pg_connect[] = 'dbname=davical port=5432 user=davical_app';
  
 
</pre>
 
</pre>
  
Adjust the values where appropriate. In newer versions of DAViCal the database user must be set to "davical_app" instead of "general", see [[Installation_Guide_Update_(Feb_2008)#DAViCal_Configuration|Installation Guide Update Februar 2008]] for further information. Details: [http://rscds.sourceforge.net/installation.php http://rscds.sourceforge.net/installation.php]  
+
Adjust the values where appropriate. In older versions of DAViCal the "general" database user was used rather than "davical_app", see [[Installation_Guide_Update_(Feb_2008)#DAViCal_Configuration|Installation Guide Update February 2008]] for further information. Details: [http://rscds.sourceforge.net/installation.php http://rscds.sourceforge.net/installation.php]  
  
 
Link the file to '''localhost-conf.php''': <pre>cd /etc/davical/
 
Link the file to '''localhost-conf.php''': <pre>cd /etc/davical/

Revision as of 04:43, 24 September 2009

I found the Installation Guide on http://rscds.sourceforge.net/installation.php not quite up to date, or things missing, especially after changing the name to DAViCal. Therefore, an updated version here:

Installation Guide

for version 0.9.3 on Debian (with PostgreSQL 8.1)

Install Packages

  1. install the packages as described on http://rscds.sourceforge.net/installation.php
  2. also make sure that a postgre-sql server is available to your DAViCal installation (version 8.1 or higher). This database server can be on the same system as DAViCal, or on a different machine on the network. (Which is why it is not considered a dependecy of the DAViCal package.)

Creating and Building the Database

su postgres -c /usr/share/davical/dba/create-database.sh

Connecting to the Database

Once your database has been created, you also need to edit your /etc/postgresql/#YOUR_VERSION#/main/pg_hba.conf file in order to grant the application access to the database as the 'davical_app' user, and to grant access as the 'davical_dba' user for the scripts that will occasionally need to run when upgrading to a future version.

In a simple installation, where you do not have untrusted users on your database server, and your database is on the same computer as the web server, the following line (near the top of the pg_hba.conf file) should be enough:

local   davical    davical_app   trust
local   davical    davical_dba   trust

...

Don't forget to restart the PostgreSQL Server:

/etc/init.d/postgresql-#YOUR_VERSION# reload

Apache Web Server Configuration

If you do not want or need a Virtual Host, the following line added to /etc/apache2/sites-available/default should be sufficient:

Alias /cal/ /usr/share/davical/htdocs/


Don't forget to restart the Apache Web Server:

/etc/init.d/apache2 restart

DAViCal Configuration

Create the file /etc/davical/<domain>-conf.php and copy the following content into it:

<?php
//  $c->domain_name = "calendar.example.net";
//  $c->sysabbr     = 'davical';
  $c->admin_email = 'admin@example.net';
  $c->system_name = "DAViCal CalDAV Server";
//  $c->collections_always_exist = true;
//  $c->enable_row_linking = true;
  $c->default_locale = en_US.UTF-8;

  $c->pg_connect[] = 'dbname=davical port=5432 user=davical_app';

Adjust the values where appropriate. In older versions of DAViCal the "general" database user was used rather than "davical_app", see Installation Guide Update February 2008 for further information. Details: http://rscds.sourceforge.net/installation.php

Link the file to localhost-conf.php:

cd /etc/davical/
ln -s <domain>-conf.php localhost-conf.php

Correct AWL includes

For some strange reason, the DAViCal PHP scripts could not find the AWL includes, although installed (seems to be an include_path issue). One solution is:

cd /usr/share/davical/inc
ln -s /usr/share/awl/inc/* .

Admin Password

The password should be printed on the screen during database creation. You can also retrieve it by

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

(the password is the bit after the '**' in the 'password' field of the 'usr' table)

Login to DAViCAL Admin

If all is going well you should now be able to browse to the admin pages and log in as 'admin' with the given password on <servername>/cal/.

TroubleShooting

I have to log in on every page! Make sure there is no newline after the php end tag (?>) in your /etc/davical/<hostname>-conf.php . Better yet: remove the unecessary ?> altogether.

This problem might also appear as a DAV_NOT_DAV error in the Lightning/Sunbird log files, although that error may also indicate other problems, such as excessively verbose error reporting.