Difference between revisions of "Installation Guide Update"

From Davical
Jump to navigationJump to search
Line 1: Line 1:
==Installation Guide==
+
Please follow the installation instructions at [http://www.davical.org/installation.php http://www.davical.org/installation.php] which should be the most current official installation instructions.
  
for version 0.9.8.4 on Debian (with PostgreSQL 8.3)
+
If you find problems with that document, please '''''do not''''' write an update in the wiki, but tell us about it on the mailing list, or via IRC. By all means do collect your thoughts together in a private document beforehand though.
  
===Install Packages===
+
You may also want to review people's [[Installation Experiences]] in specific distributions / versions, or visit the [[Installation Stuff]] page where there are some other links to distribution specific pages.
 
 
# install the packages as described on [http://www.davical.org/installation.php http://www.davical.org/installation.php]
 
# also make sure that a PostgreSQL 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.)
 
 
 
===Connecting to the Database===
 
 
 
Before 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 run during installation and when upgrading to future versions.
 
 
 
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    davical_app  trust
 
local  davical    davical_dba  trust
 
</pre>
 
 
 
...
 
 
 
'''Don't forget to restart the PostgreSQL Server:'''
 
 
 
<pre>/etc/init.d/postgresql-#YOUR_VERSION# reload
 
</pre>
 
 
 
===Creating and Building the Database===
 
 
 
<pre>su postgres -c /usr/share/davical/dba/create-database.sh
 
</pre>
 
 
 
===Apache Web Server Configuration===
 
 
 
==== With Virtual Host ====
 
 
 
Your Apache instance needs to be configured for Virtual Hosts. If this is not already the case you may want to read some documentation about that, and you most likely will want to ensure that any existing site becomes the **default** virtual host, with DAViCal only being a single virtual host.
 
 
 
I use a Virtual Host stanza like this:
 
 
 
#
 
# Virtual Host def for Debian packaged DAViCal
 
<VirtualHost 123.4.56.78 >
 
  DocumentRoot /usr/share/davical/htdocs
 
  DirectoryIndex index.php index.html
 
  ServerName davical.example.net
 
  ServerAlias calendar.example.net
 
  Alias /images/ /usr/share/davical/htdocs/images/
 
  <Directory /usr/share/davical/htdocs/>
 
      AllowOverride None
 
      Order allow,deny
 
      Allow from all
 
  </Directory>
 
  php_value include_path /usr/share/awl/inc
 
  php_value magic_quotes_gpc 0
 
  php_value register_globals 0
 
  php_value error_reporting "E_ALL & ~E_NOTICE"
 
  php_value default_charset "utf-8"
 
</VirtualHost>
 
 
 
Replace 123.4.56.78 with your own IP address, of course (you can use a name, but your webserver may fail on restart if DNS happens to be borked at that time).
 
 
 
The various paths and names need to be changed to reflect your own installation, although those are the recommended locations for the various pieces of the code (and are standard if you installed from a package.
 
 
 
Once your VHost is installed an working correctly, you should be able to browse to that address and see a page telling you that you need to configure DAViCal.
 
 
 
On Debian systems (or derivatives such as Ubuntu), when you are using Apache 2, you should put this definition in the /etc/apache2/sites-available directory and you can use the 'a2ensite' command to enable it.
 
 
 
==== Without Virtual Host ====
 
If you do not want a Virtual Host, the following line added to '''/etc/apache2/sites-available/default''' will make DAViCal visible under ''<nowiki>http://your.domain.org/cal/...</nowiki>'':
 
 
 
<pre>Alias /cal/ /usr/share/davical/htdocs/
 
</pre>
 
 
 
You will also need to edit '''/etc/php5/apache2/php/ini''' in order to change the PHP include path to include the AWL include directory, as follows:
 
 
 
<pre>include_path = ".:/usr/share/php:/usr/share/awl/inc"
 
</pre>
 
 
 
'''Don't forget to restart the Apache Web Server:'''
 
 
 
<pre>/etc/init.d/apache2 restart
 
</pre>
 
 
 
==DAViCal Configuration==
 
 
 
Create the file '''/etc/davical/config.php''' (or ''/etc/davical/<domain>-conf.php'' if you will host multiple instances of DAViCal on this computer) and copy the following content into it:
 
 
 
<pre><?php
 
  $c->admin_email = 'admin@example.net';
 
  $c->system_name = "DAViCal CalDAV Server";
 
  $c->enable_row_linking = true;
 
  $c->default_locale = en_US.UTF-8;
 
 
 
  $c->pg_connect[] = 'dbname=davical port=5432 user=davical_app';
 
 
 
</pre>
 
 
 
Adjust the values where appropriate. In older versions of DAViCal the "general" database user was used rather than "davical_app".
 
 
 
 
 
====Admin Password====
 
 
 
The password should be printed on the screen during database creation. You can also retrieve it by
 
 
 
<pre>su postgres
 
psql davical -c 'select username, password from usr;'
 
</pre>
 
 
 
(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.
 
 
 
Also see [[Problems and Solutions]] and [[Frequently Asked Questions]]
 

Revision as of 23:11, 12 March 2010

Please follow the installation instructions at http://www.davical.org/installation.php which should be the most current official installation instructions.

If you find problems with that document, please do not write an update in the wiki, but tell us about it on the mailing list, or via IRC. By all means do collect your thoughts together in a private document beforehand though.

You may also want to review people's Installation Experiences in specific distributions / versions, or visit the Installation Stuff page where there are some other links to distribution specific pages.