Follow https://wiki.davical.org/index.php/Raspberry_Pi2_Raspbian Settings: DatabaseName=davicaldb DBUsername_dba=davical_dba DBUsername_app=davical_app DBPassword=davicaldb AdminPassword=GodsOwn1 During the installation: * The password for the 'admin' user has been set to 'af7SaUH0' In Davical, create principals: - principal group smarthome, pw simon1 (maybe not necessary?) - principal resource resource (full name: Resource), pw simon1 - principal person simon, pw simon1 - principal person wei, pw wei1 - principal person nick, pw nick1 - principal person kai, pw kai1 Grant everything to all (assign persons to resources), so that in InfCloud you can see the calendars of Wei and Simon Tickets are not necessary In IPhone: go to Mail - Acounts, create new account SmartHome: - server sbruegmann.mooo.com, SSL, simon/simon1, Description SmartHome - URL https://sbruegmann.mooo.com/davical/caldav.php/simon/ - data synchronization: push auomatically (only for not in power save) - in calendar add a calendar, with account SmartHome Get on console: wget --no-check-certificate https://simon:simon1@sbruegmann.mooo.com/davical/caldav.php/simon/calendar.ics ================================ Original ================================ DAViCal Install (adapted and simplified from Debian_shared) (858384 kb used on /) Install current DAViCal version with Jessie dependencies: sudo apt-get update sudo apt-get upgrade sudo apt-get install locales export LANGUAGE="en_GB" export LC_ALL="en_GB.UTF-8" sudo dpkg-reconfigure locales # select your locale with TUI sudo apt-get install davical davical-doc (1121108 kb used on /) To be continued... Prepare the DAViCal database values (please, for security reasons, choose your own values): DatabaseName=mycaldb DBUsername_dba=mycaluser_dba DBUsername_app=mycaluser_app DBPassword=12345 AdminPassword=1234 Add open permissions temporarily for the installation scripts: MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")" PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf" sudo mv "$PgConfig" "${PgConfig}.davical-bak" sudo cp -a "${PgConfig}.davical-bak" "$PgConfig" echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig" echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig" echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig" echo "" | sudo tee --append "$PgConfig" sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig" # Service name can be only "postgresql" or more: sudo service postgresql reload Apply a temporary patch to creation script: CScript="/usr/share/davical/dba/create-database.sh" sudo mv "$CScript" "${CScript}.davical-bak" sudo cp -a "${CScript}.davical-bak" "$CScript" cat "${CScript}.davical-bak" | sed -e "s/DBNAME=.*/DBNAME=${DatabaseName}/g" | sed -e "s/AWL_DBAUSER=.*/AWL_DBAUSER=${DBUsername_dba}/g" | sed -e "s/AWL_APPUSER=.*/AWL_APPUSER=${DBUsername_app}/g" | sudo tee "$CScript" Apply a temporary patch to update script: UScript="/usr/share/davical/dba/update-davical-database" sudo mv "$UScript" "${UScript}.davical-bak" sudo cp -a "${UScript}.davical-bak" "$UScript" cat "${UScript}.davical-bak" | sed -e "s/\$dbname = .*/\$dbname = \"${DatabaseName}\";/g" | sed -e "s/\$dbuser = .*/\$dbuser = \"${DBUsername_dba}\";/g" | sed -e "s/\$appuser = .*/\$appuser = \"${DBUsername_app}\";/g" | sed -e "s/\$dbpass = .*/\$dbpass = \"${DBPassword}\";/g" | sudo tee "$UScript" (only fresh install) Run main installation script and take note of the shown password for the 'admin' user: sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword" (only restoration of a backup) Restore data and run update script: echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump" echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump" sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump" sudo su -l postgres -c "$UScript" Restore installation scripts to original: sudo mv "${UScript}.davical-bak" "$UScript" sudo mv "${CScript}.davical-bak" "$CScript" (only fresh install) Set password authentication for the database: echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql Allow these authenticated access to PostgreSql: echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig" echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig" echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig" echo "" | sudo tee --append "$PgConfig" sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig" # Service name can be only "postgresql" or more: sudo service postgresql reload Create or restore configuration file as /etc/davical/config.php (for default host example.net/davical) with its content as in the following example: admin_email = 'admin@example.net'; $c->system_name = "My CalDAV Server"; $c->enable_row_linking = true; $c->default_locale = 'en_US.UTF-8'; # or something else: fr_FR.UTF-8, ... $c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345'; Avoid permissions issues: sudo chmod a+r /etc/davical/config.php Create or restore Apache virtualhost /etc/apache2/sites-available/000-default.conf with its profile content as in this example: ServerAdmin webmaster@localhost DocumentRoot /var/www/html ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined Enable Apache website (may be useless): sudo a2ensite 000-default Enable davical: cd /var/www/html sudo ln -s /usr/share/davical/htdocs/ davical Now you should be able to browse to example.net/davical with your favourite web browser. If not, check example.net/davical/setup.php for details. Login to DAViCal Admin If all is going well you should now be able to browse to the site pages and log in as 'admin' with the password set during installation. Apache2 setup for SSL access to DAViCal Install SSL for apache2: sudo apt-get install ssl-cert sudo mkdir /etc/apache2/ssl sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem # (localhost + your box's public IP address) sudo a2enmod ssl sudo service apache2 restart sudo a2ensite default-ssl sudo service apache2 reload Now, you can browse https://example.net/davical (you will probably have to add an exception in your browser because of self-signed certificate). InfCloud setup (optional) Check for InfCloud version at https://www.inf-it.com/open-source/clients/infcloud/ Download, unzip configure an run InfCloud: cd wget https://www.inf-it.com/InfCloud_0.13.1.zip cd /usr/share sudo unzip $HOME/InfCloud_0.13.1.zip cd infcloud sudo vi config.js # In globalNetworkCheckSettings=, change '/caldav.php/' with '/davical/caldav.php/' sudo vi config.js # Check for globalInterfaceLanguage, globalDatepickerFirstDayOfWeek, globalDefaultAddressCountry cd /var/www/html sudo ln -s /usr/share/infcloud/ infcloud sudo service apache2 reload Now you should be able to browse to example.net/infcloud with your favourite web browser (and through https if apache2 configured for SSL) and login with davical account. Note: due to HTML5 browser caching, an update in config.js after browsing will probably need to delete browser cache manually.