https://wiki.davical.org/api.php?action=feedcontributions&user=Frizou&feedformat=atom
Davical - User contributions [en]
2024-03-19T07:07:39Z
User contributions
MediaWiki 1.40.1
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3792
Raspberry Pi2 Raspbian
2019-04-06T18:42:08Z
<p>Frizou: /* DAViCal Install */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card (useless with Raspbian 2018-11-13 and next versions)<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide =<br />
== DAViCal Install ==<br />
<br />
(adapted and simplified from [[Debian_shared]])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get upgrade<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1121108 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Create or restore configuration file as /etc/davical/config.php (for default host ''example.net/davical'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8'; # or something else: fr_FR.UTF-8, ...<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/config.php<br />
<br />
Create or restore Apache virtualhost /etc/apache2/sites-available/000-default.conf with its profile content as in this example:<br />
<VirtualHost *:80><br />
ServerAdmin webmaster@localhost<br />
DocumentRoot /var/www/html<br />
ErrorLog ${APACHE_LOG_DIR}/error.log<br />
CustomLog ${APACHE_LOG_DIR}/access.log combined<br />
</VirtualHost><br />
<br />
Enable Apache website (may be useless):<br />
sudo a2ensite 000-default<br />
<br />
Enable davical:<br />
cd /var/www/html<br />
sudo ln -s /usr/share/davical/htdocs/ davical<br />
<br />
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.<br />
<br />
== Login to DAViCal Admin ==<br />
<br />
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.<br />
<br />
== Apache2 setup for SSL access to DAViCal ==<br />
<br />
Install SSL for apache2:<br />
sudo apt-get install ssl-cert<br />
sudo mkdir /etc/apache2/ssl<br />
sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem # (localhost + your box's public IP address)<br />
sudo a2enmod ssl<br />
sudo service apache2 restart<br />
sudo a2ensite default-ssl<br />
sudo service apache2 reload<br />
<br />
Now, you can browse https://example.net/davical (you will probably have to add an exception in your browser because of self-signed certificate).<br />
<br />
== InfCloud setup (optional) ==<br />
<br />
Check for InfCloud version at https://www.inf-it.com/open-source/clients/infcloud/<br />
<br />
Download, unzip configure an run InfCloud:<br />
cd<br />
wget https://www.inf-it.com/InfCloud_0.13.1.zip<br />
cd /usr/share<br />
sudo unzip $HOME/InfCloud_0.13.1.zip<br />
cd infcloud<br />
sudo vi config.js # In globalNetworkCheckSettings=, change '/caldav.php/' with '/davical/caldav.php/'<br />
sudo vi config.js # Check for globalInterfaceLanguage, globalDatepickerFirstDayOfWeek, globalDefaultAddressCountry<br />
cd /var/www/html<br />
sudo ln -s /usr/share/infcloud/ infcloud<br />
sudo service apache2 reload<br />
<br />
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.<br />
Note: due to HTML5 browser caching, an update in config.js after browsing will probably need to delete browser cache manually.</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3791
Raspberry Pi2 Raspbian
2019-04-06T18:41:04Z
<p>Frizou: /* Connecting Raspberry Pi to LAN and boot */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card (useless with Raspbian 2018-11-13 and next versions)<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide =<br />
== DAViCal Install ==<br />
<br />
(adapted and simplified from [[Debian_shared]])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1121108 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Create or restore configuration file as /etc/davical/config.php (for default host ''example.net/davical'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8'; # or something else: fr_FR.UTF-8, ...<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/config.php<br />
<br />
Create or restore Apache virtualhost /etc/apache2/sites-available/000-default.conf with its profile content as in this example:<br />
<VirtualHost *:80><br />
ServerAdmin webmaster@localhost<br />
DocumentRoot /var/www/html<br />
ErrorLog ${APACHE_LOG_DIR}/error.log<br />
CustomLog ${APACHE_LOG_DIR}/access.log combined<br />
</VirtualHost><br />
<br />
Enable Apache website (may be useless):<br />
sudo a2ensite 000-default<br />
<br />
Enable davical:<br />
cd /var/www/html<br />
sudo ln -s /usr/share/davical/htdocs/ davical<br />
<br />
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.<br />
<br />
<br />
== Login to DAViCal Admin ==<br />
<br />
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.<br />
<br />
== Apache2 setup for SSL access to DAViCal ==<br />
<br />
Install SSL for apache2:<br />
sudo apt-get install ssl-cert<br />
sudo mkdir /etc/apache2/ssl<br />
sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem # (localhost + your box's public IP address)<br />
sudo a2enmod ssl<br />
sudo service apache2 restart<br />
sudo a2ensite default-ssl<br />
sudo service apache2 reload<br />
<br />
Now, you can browse https://example.net/davical (you will probably have to add an exception in your browser because of self-signed certificate).<br />
<br />
== InfCloud setup (optional) ==<br />
<br />
Check for InfCloud version at https://www.inf-it.com/open-source/clients/infcloud/<br />
<br />
Download, unzip configure an run InfCloud:<br />
cd<br />
wget https://www.inf-it.com/InfCloud_0.13.1.zip<br />
cd /usr/share<br />
sudo unzip $HOME/InfCloud_0.13.1.zip<br />
cd infcloud<br />
sudo vi config.js # In globalNetworkCheckSettings=, change '/caldav.php/' with '/davical/caldav.php/'<br />
sudo vi config.js # Check for globalInterfaceLanguage, globalDatepickerFirstDayOfWeek, globalDefaultAddressCountry<br />
cd /var/www/html<br />
sudo ln -s /usr/share/infcloud/ infcloud<br />
sudo service apache2 reload<br />
<br />
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.<br />
Note: due to HTML5 browser caching, an update in config.js after browsing will probably need to delete browser cache manually.</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3790
Raspberry Pi2 Raspbian
2019-04-06T18:39:23Z
<p>Frizou: /* Preparing Raspberry Pi micro-SD card from a linux computer */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card (useless with Raspbian 2018-11-13 and next versions)<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide =<br />
== DAViCal Install ==<br />
<br />
(adapted and simplified from [[Debian_shared]])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1121108 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Create or restore configuration file as /etc/davical/config.php (for default host ''example.net/davical'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8'; # or something else: fr_FR.UTF-8, ...<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/config.php<br />
<br />
Create or restore Apache virtualhost /etc/apache2/sites-available/000-default.conf with its profile content as in this example:<br />
<VirtualHost *:80><br />
ServerAdmin webmaster@localhost<br />
DocumentRoot /var/www/html<br />
ErrorLog ${APACHE_LOG_DIR}/error.log<br />
CustomLog ${APACHE_LOG_DIR}/access.log combined<br />
</VirtualHost><br />
<br />
Enable Apache website (may be useless):<br />
sudo a2ensite 000-default<br />
<br />
Enable davical:<br />
cd /var/www/html<br />
sudo ln -s /usr/share/davical/htdocs/ davical<br />
<br />
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.<br />
<br />
<br />
== Login to DAViCal Admin ==<br />
<br />
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.<br />
<br />
== Apache2 setup for SSL access to DAViCal ==<br />
<br />
Install SSL for apache2:<br />
sudo apt-get install ssl-cert<br />
sudo mkdir /etc/apache2/ssl<br />
sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem # (localhost + your box's public IP address)<br />
sudo a2enmod ssl<br />
sudo service apache2 restart<br />
sudo a2ensite default-ssl<br />
sudo service apache2 reload<br />
<br />
Now, you can browse https://example.net/davical (you will probably have to add an exception in your browser because of self-signed certificate).<br />
<br />
== InfCloud setup (optional) ==<br />
<br />
Check for InfCloud version at https://www.inf-it.com/open-source/clients/infcloud/<br />
<br />
Download, unzip configure an run InfCloud:<br />
cd<br />
wget https://www.inf-it.com/InfCloud_0.13.1.zip<br />
cd /usr/share<br />
sudo unzip $HOME/InfCloud_0.13.1.zip<br />
cd infcloud<br />
sudo vi config.js # In globalNetworkCheckSettings=, change '/caldav.php/' with '/davical/caldav.php/'<br />
sudo vi config.js # Check for globalInterfaceLanguage, globalDatepickerFirstDayOfWeek, globalDefaultAddressCountry<br />
cd /var/www/html<br />
sudo ln -s /usr/share/infcloud/ infcloud<br />
sudo service apache2 reload<br />
<br />
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.<br />
Note: due to HTML5 browser caching, an update in config.js after browsing will probably need to delete browser cache manually.</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3710
Raspberry Pi2 Raspbian
2016-07-24T20:00:48Z
<p>Frizou: /* InfCloud setup (optional) (under construction) */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide =<br />
== DAViCal Install ==<br />
<br />
(adapted and simplified from [[Debian_shared]])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1121108 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Create or restore configuration file as /etc/davical/config.php (for default host ''example.net/davical'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8'; # or something else: fr_FR.UTF-8, ...<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/config.php<br />
<br />
Create or restore Apache virtualhost /etc/apache2/sites-available/000-default.conf with its profile content as in this example:<br />
<VirtualHost *:80><br />
ServerAdmin webmaster@localhost<br />
DocumentRoot /var/www/html<br />
ErrorLog ${APACHE_LOG_DIR}/error.log<br />
CustomLog ${APACHE_LOG_DIR}/access.log combined<br />
</VirtualHost><br />
<br />
Enable Apache website (may be useless):<br />
sudo a2ensite 000-default<br />
<br />
Enable davical:<br />
cd /var/www/html<br />
sudo ln -s /usr/share/davical/htdocs/ davical<br />
<br />
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.<br />
<br />
<br />
== Login to DAViCal Admin ==<br />
<br />
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.<br />
<br />
== Apache2 setup for SSL access to DAViCal ==<br />
<br />
Install SSL for apache2:<br />
sudo apt-get install ssl-cert<br />
sudo mkdir /etc/apache2/ssl<br />
sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem # (localhost + your box's public IP address)<br />
sudo a2enmod ssl<br />
sudo service apache2 restart<br />
sudo a2ensite default-ssl<br />
sudo service apache2 reload<br />
<br />
Now, you can browse https://example.net/davical (you will probably have to add an exception in your browser because of self-signed certificate).<br />
<br />
== InfCloud setup (optional) ==<br />
<br />
Check for InfCloud version at https://www.inf-it.com/open-source/clients/infcloud/<br />
<br />
Download, unzip configure an run InfCloud:<br />
cd<br />
wget https://www.inf-it.com/InfCloud_0.13.1.zip<br />
cd /usr/share<br />
sudo unzip $HOME/InfCloud_0.13.1.zip<br />
cd infcloud<br />
sudo vi config.js # In globalNetworkCheckSettings=, change '/caldav.php/' with '/davical/caldav.php/'<br />
sudo vi config.js # Check for globalInterfaceLanguage, globalDatepickerFirstDayOfWeek, globalDefaultAddressCountry<br />
cd /var/www/html<br />
sudo ln -s /usr/share/infcloud/ infcloud<br />
sudo service apache2 reload<br />
<br />
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.<br />
Note: due to HTML5 browser caching, an update in config.js after browsing will probably need to delete browser cache manually.</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3709
Raspberry Pi2 Raspbian
2016-07-24T17:22:43Z
<p>Frizou: /* InfCloud setup (optional) (under construction) */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide =<br />
== DAViCal Install ==<br />
<br />
(adapted and simplified from [[Debian_shared]])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1121108 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Create or restore configuration file as /etc/davical/config.php (for default host ''example.net/davical'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8'; # or something else: fr_FR.UTF-8, ...<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/config.php<br />
<br />
Create or restore Apache virtualhost /etc/apache2/sites-available/000-default.conf with its profile content as in this example:<br />
<VirtualHost *:80><br />
ServerAdmin webmaster@localhost<br />
DocumentRoot /var/www/html<br />
ErrorLog ${APACHE_LOG_DIR}/error.log<br />
CustomLog ${APACHE_LOG_DIR}/access.log combined<br />
</VirtualHost><br />
<br />
Enable Apache website (may be useless):<br />
sudo a2ensite 000-default<br />
<br />
Enable davical:<br />
cd /var/www/html<br />
sudo ln -s /usr/share/davical/htdocs/ davical<br />
<br />
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.<br />
<br />
<br />
== Login to DAViCal Admin ==<br />
<br />
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.<br />
<br />
== Apache2 setup for SSL access to DAViCal ==<br />
<br />
Install SSL for apache2:<br />
sudo apt-get install ssl-cert<br />
sudo mkdir /etc/apache2/ssl<br />
sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem # (localhost + your box's public IP address)<br />
sudo a2enmod ssl<br />
sudo service apache2 restart<br />
sudo a2ensite default-ssl<br />
sudo service apache2 reload<br />
<br />
Now, you can browse https://example.net/davical (you will probably have to add an exception in your browser because of self-signed certificate).<br />
<br />
== InfCloud setup (optional) (under construction) ==<br />
<br />
Check for InfCloud version at https://www.inf-it.com/open-source/clients/infcloud/<br />
<br />
Download, unzip configure an run InfCloud:<br />
cd<br />
wget https://www.inf-it.com/InfCloud_0.13.1.zip<br />
cd /usr/share<br />
sudo unzip $HOME/InfCloud_0.13.1.zip<br />
cd infcloud<br />
sudo vi config.js # In globalNetworkCheckSettings=, change '/caldav.php/' with '/davical/caldav.php/'<br />
sudo vi config.js # Check for globalInterfaceLanguage, globalDatepickerFirstDayOfWeek, globalDefaultAddressCountry<br />
cd /var/www/html<br />
sudo ln -s /usr/share/infcloud/ infcloud<br />
sudo service apache2 reload<br />
<br />
Now you should be able to browse to example.net/infcloud with your favourite web browser (and through https if apache2 configured for SSL).</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3708
Raspberry Pi2 Raspbian
2016-07-24T16:57:45Z
<p>Frizou: /* InfCloud setup (optional) (under construction) */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide =<br />
== DAViCal Install ==<br />
<br />
(adapted and simplified from [[Debian_shared]])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1121108 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Create or restore configuration file as /etc/davical/config.php (for default host ''example.net/davical'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8'; # or something else: fr_FR.UTF-8, ...<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/config.php<br />
<br />
Create or restore Apache virtualhost /etc/apache2/sites-available/000-default.conf with its profile content as in this example:<br />
<VirtualHost *:80><br />
ServerAdmin webmaster@localhost<br />
DocumentRoot /var/www/html<br />
ErrorLog ${APACHE_LOG_DIR}/error.log<br />
CustomLog ${APACHE_LOG_DIR}/access.log combined<br />
</VirtualHost><br />
<br />
Enable Apache website (may be useless):<br />
sudo a2ensite 000-default<br />
<br />
Enable davical:<br />
cd /var/www/html<br />
sudo ln -s /usr/share/davical/htdocs/ davical<br />
<br />
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.<br />
<br />
<br />
== Login to DAViCal Admin ==<br />
<br />
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.<br />
<br />
== Apache2 setup for SSL access to DAViCal ==<br />
<br />
Install SSL for apache2:<br />
sudo apt-get install ssl-cert<br />
sudo mkdir /etc/apache2/ssl<br />
sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem # (localhost + your box's public IP address)<br />
sudo a2enmod ssl<br />
sudo service apache2 restart<br />
sudo a2ensite default-ssl<br />
sudo service apache2 reload<br />
<br />
Now, you can browse https://example.net/davical (you will probably have to add an exception in your browser because of self-signed certificate).<br />
<br />
== InfCloud setup (optional) (under construction) ==<br />
<br />
Check for InfCloud version at https://www.inf-it.com/open-source/clients/infcloud/<br />
<br />
Download, unzip configure an run InfCloud:<br />
cd<br />
wget https://www.inf-it.com/InfCloud_0.13.1.zip<br />
cd /usr/share<br />
sudo unzip $HOME/InfCloud_0.13.1.zip<br />
cd infcloud<br />
sudo vi config.js # Check for globalInterfaceLanguage, globalDatepickerFirstDayOfWeek, globalDefaultAddressCountry<br />
cd /var/www/html<br />
sudo ln -s /usr/share/infcloud/ infcloud<br />
sudo service apache2 reload<br />
<br />
Now you should be able to browse to example.net/infcloud with your favourite web browser (and through https if apache2 configured for SSL).</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3707
Raspberry Pi2 Raspbian
2016-07-24T16:56:15Z
<p>Frizou: /* InfCloud setup (optional) (under construction) */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide =<br />
== DAViCal Install ==<br />
<br />
(adapted and simplified from [[Debian_shared]])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1121108 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Create or restore configuration file as /etc/davical/config.php (for default host ''example.net/davical'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8'; # or something else: fr_FR.UTF-8, ...<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/config.php<br />
<br />
Create or restore Apache virtualhost /etc/apache2/sites-available/000-default.conf with its profile content as in this example:<br />
<VirtualHost *:80><br />
ServerAdmin webmaster@localhost<br />
DocumentRoot /var/www/html<br />
ErrorLog ${APACHE_LOG_DIR}/error.log<br />
CustomLog ${APACHE_LOG_DIR}/access.log combined<br />
</VirtualHost><br />
<br />
Enable Apache website (may be useless):<br />
sudo a2ensite 000-default<br />
<br />
Enable davical:<br />
cd /var/www/html<br />
sudo ln -s /usr/share/davical/htdocs/ davical<br />
<br />
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.<br />
<br />
<br />
== Login to DAViCal Admin ==<br />
<br />
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.<br />
<br />
== Apache2 setup for SSL access to DAViCal ==<br />
<br />
Install SSL for apache2:<br />
sudo apt-get install ssl-cert<br />
sudo mkdir /etc/apache2/ssl<br />
sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem # (localhost + your box's public IP address)<br />
sudo a2enmod ssl<br />
sudo service apache2 restart<br />
sudo a2ensite default-ssl<br />
sudo service apache2 reload<br />
<br />
Now, you can browse https://example.net/davical (you will probably have to add an exception in your browser because of self-signed certificate).<br />
<br />
== InfCloud setup (optional) (under construction) ==<br />
<br />
Check for InfCloud version at https://www.inf-it.com/open-source/clients/infcloud/<br />
<br />
Download, unzip configure an run InfCloud:<br />
cd<br />
wget https://www.inf-it.com/InfCloud_0.13.1.zip<br />
cd /usr/share<br />
sudo unzip $HOME/InfCloud_0.13.1.zip<br />
cd infcloud<br />
sudo vi config.js # Check for globalInterfaceLanguage, globalDatepickerFirstDayOfWeek, globalDefaultAddressCountry<br />
cd /var/www/html<br />
sudo ln -s /usr/share/infcloud/ infcloud<br />
sudo service apache2 reload</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3706
Raspberry Pi2 Raspbian
2016-07-24T16:30:09Z
<p>Frizou: /* CardDavMATE setup (optional) (under construction) */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide =<br />
== DAViCal Install ==<br />
<br />
(adapted and simplified from [[Debian_shared]])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1121108 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Create or restore configuration file as /etc/davical/config.php (for default host ''example.net/davical'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8'; # or something else: fr_FR.UTF-8, ...<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/config.php<br />
<br />
Create or restore Apache virtualhost /etc/apache2/sites-available/000-default.conf with its profile content as in this example:<br />
<VirtualHost *:80><br />
ServerAdmin webmaster@localhost<br />
DocumentRoot /var/www/html<br />
ErrorLog ${APACHE_LOG_DIR}/error.log<br />
CustomLog ${APACHE_LOG_DIR}/access.log combined<br />
</VirtualHost><br />
<br />
Enable Apache website (may be useless):<br />
sudo a2ensite 000-default<br />
<br />
Enable davical:<br />
cd /var/www/html<br />
sudo ln -s /usr/share/davical/htdocs/ davical<br />
<br />
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.<br />
<br />
<br />
== Login to DAViCal Admin ==<br />
<br />
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.<br />
<br />
== Apache2 setup for SSL access to DAViCal ==<br />
<br />
Install SSL for apache2:<br />
sudo apt-get install ssl-cert<br />
sudo mkdir /etc/apache2/ssl<br />
sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem # (localhost + your box's public IP address)<br />
sudo a2enmod ssl<br />
sudo service apache2 restart<br />
sudo a2ensite default-ssl<br />
sudo service apache2 reload<br />
<br />
Now, you can browse https://example.net/davical (you will probably have to add an exception in your browser because of self-signed certificate).<br />
<br />
== InfCloud setup (optional) (under construction) ==<br />
<br />
Check for InfCloud version at https://www.inf-it.com/open-source/clients/infcloud/</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3705
Raspberry Pi2 Raspbian
2016-07-24T16:21:20Z
<p>Frizou: /* DAViCal setup for SSL access */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide =<br />
== DAViCal Install ==<br />
<br />
(adapted and simplified from [[Debian_shared]])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1121108 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Create or restore configuration file as /etc/davical/config.php (for default host ''example.net/davical'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8'; # or something else: fr_FR.UTF-8, ...<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/config.php<br />
<br />
Create or restore Apache virtualhost /etc/apache2/sites-available/000-default.conf with its profile content as in this example:<br />
<VirtualHost *:80><br />
ServerAdmin webmaster@localhost<br />
DocumentRoot /var/www/html<br />
ErrorLog ${APACHE_LOG_DIR}/error.log<br />
CustomLog ${APACHE_LOG_DIR}/access.log combined<br />
</VirtualHost><br />
<br />
Enable Apache website (may be useless):<br />
sudo a2ensite 000-default<br />
<br />
Enable davical:<br />
cd /var/www/html<br />
sudo ln -s /usr/share/davical/htdocs/ davical<br />
<br />
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.<br />
<br />
<br />
== Login to DAViCal Admin ==<br />
<br />
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.<br />
<br />
== Apache2 setup for SSL access to DAViCal ==<br />
<br />
Install SSL for apache2:<br />
sudo apt-get install ssl-cert<br />
sudo mkdir /etc/apache2/ssl<br />
sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem # (localhost + your box's public IP address)<br />
sudo a2enmod ssl<br />
sudo service apache2 restart<br />
sudo a2ensite default-ssl<br />
sudo service apache2 reload<br />
<br />
Now, you can browse https://example.net/davical (you will probably have to add an exception in your browser because of self-signed certificate).<br />
<br />
== CardDavMATE setup (optional) (under construction) ==</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3704
Raspberry Pi2 Raspbian
2016-07-24T16:20:44Z
<p>Frizou: /* DAViCal setup for SSL access (under construction) */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide =<br />
== DAViCal Install ==<br />
<br />
(adapted and simplified from [[Debian_shared]])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1121108 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Create or restore configuration file as /etc/davical/config.php (for default host ''example.net/davical'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8'; # or something else: fr_FR.UTF-8, ...<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/config.php<br />
<br />
Create or restore Apache virtualhost /etc/apache2/sites-available/000-default.conf with its profile content as in this example:<br />
<VirtualHost *:80><br />
ServerAdmin webmaster@localhost<br />
DocumentRoot /var/www/html<br />
ErrorLog ${APACHE_LOG_DIR}/error.log<br />
CustomLog ${APACHE_LOG_DIR}/access.log combined<br />
</VirtualHost><br />
<br />
Enable Apache website (may be useless):<br />
sudo a2ensite 000-default<br />
<br />
Enable davical:<br />
cd /var/www/html<br />
sudo ln -s /usr/share/davical/htdocs/ davical<br />
<br />
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.<br />
<br />
<br />
== Login to DAViCal Admin ==<br />
<br />
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.<br />
<br />
== DAViCal setup for SSL access ==<br />
<br />
Install SSL for apache2:<br />
sudo apt-get install ssl-cert<br />
sudo mkdir /etc/apache2/ssl<br />
sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem # (localhost + your box's public IP address)<br />
sudo a2enmod ssl<br />
sudo service apache2 restart<br />
sudo a2ensite default-ssl<br />
sudo service apache2 reload<br />
<br />
Now, you can browse https://example.net/davical (you will probably have to add an exception in your browser because of self-signed certificate).<br />
<br />
== CardDavMATE setup (optional) (under construction) ==</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3703
Raspberry Pi2 Raspbian
2016-07-24T16:19:37Z
<p>Frizou: /* DAViCal setup for SSL access (under construction) */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide =<br />
== DAViCal Install ==<br />
<br />
(adapted and simplified from [[Debian_shared]])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1121108 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Create or restore configuration file as /etc/davical/config.php (for default host ''example.net/davical'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8'; # or something else: fr_FR.UTF-8, ...<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/config.php<br />
<br />
Create or restore Apache virtualhost /etc/apache2/sites-available/000-default.conf with its profile content as in this example:<br />
<VirtualHost *:80><br />
ServerAdmin webmaster@localhost<br />
DocumentRoot /var/www/html<br />
ErrorLog ${APACHE_LOG_DIR}/error.log<br />
CustomLog ${APACHE_LOG_DIR}/access.log combined<br />
</VirtualHost><br />
<br />
Enable Apache website (may be useless):<br />
sudo a2ensite 000-default<br />
<br />
Enable davical:<br />
cd /var/www/html<br />
sudo ln -s /usr/share/davical/htdocs/ davical<br />
<br />
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.<br />
<br />
<br />
== Login to DAViCal Admin ==<br />
<br />
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.<br />
<br />
== DAViCal setup for SSL access (under construction) ==<br />
<br />
Install SSL for apache2:<br />
sudo apt-get install ssl-cert<br />
sudo mkdir /etc/apache2/ssl<br />
sudo make-ssl-cert /usr/share/ssl-cert/ssleay.cnf /etc/apache2/ssl/apache.pem # (localhost + your box's public IP address)<br />
sudo a2enmod ssl<br />
sudo service apache2 restart<br />
sudo a2ensite default-ssl<br />
sudo service apache2 reload<br />
<br />
Now, you can browse https://example.net/davical (you will probably have to add an exception in your browser because of self-signed certificate).<br />
<br />
== CardDavMATE setup (optional) (under construction) ==</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3702
Raspberry Pi2 Raspbian
2016-07-24T16:09:11Z
<p>Frizou: /* SW installation guide (under construction) */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide =<br />
== DAViCal Install ==<br />
<br />
(adapted and simplified from [[Debian_shared]])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1121108 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Create or restore configuration file as /etc/davical/config.php (for default host ''example.net/davical'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8'; # or something else: fr_FR.UTF-8, ...<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/config.php<br />
<br />
Create or restore Apache virtualhost /etc/apache2/sites-available/000-default.conf with its profile content as in this example:<br />
<VirtualHost *:80><br />
ServerAdmin webmaster@localhost<br />
DocumentRoot /var/www/html<br />
ErrorLog ${APACHE_LOG_DIR}/error.log<br />
CustomLog ${APACHE_LOG_DIR}/access.log combined<br />
</VirtualHost><br />
<br />
Enable Apache website (may be useless):<br />
sudo a2ensite 000-default<br />
<br />
Enable davical:<br />
cd /var/www/html<br />
sudo ln -s /usr/share/davical/htdocs/ davical<br />
<br />
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.<br />
<br />
<br />
== Login to DAViCal Admin ==<br />
<br />
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.<br />
<br />
== DAViCal setup for SSL access (under construction) ==<br />
<br />
== CardDavMATE setup (optional) (under construction) ==</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3701
Raspberry Pi2 Raspbian
2016-07-24T14:08:14Z
<p>Frizou: /* SW installation guide (under construction) */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide (under construction) =<br />
(adapted and simplified from [[Debian_shared]])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1121108 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Create or restore configuration file as /etc/davical/config.php (for default host ''example.net/davical'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8'; # or something else: fr_FR.UTF-8, ...<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/config.php<br />
<br />
Create or restore Apache virtualhost /etc/apache2/sites-available/000-default.conf with its profile content as in this example:<br />
<VirtualHost *:80><br />
ServerAdmin webmaster@localhost<br />
DocumentRoot /var/www/html<br />
ErrorLog ${APACHE_LOG_DIR}/error.log<br />
CustomLog ${APACHE_LOG_DIR}/access.log combined<br />
</VirtualHost><br />
<br />
Enable Apache website (may be useless):<br />
sudo a2ensite 000-default<br />
<br />
Enable davical:<br />
cd /var/www/html<br />
sudo ln -s /usr/share/davical/htdocs/ davical<br />
<br />
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.<br />
<br />
<br />
==== Login to DAViCAL Admin ====<br />
<br />
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.</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3700
Raspberry Pi2 Raspbian
2016-07-24T14:03:04Z
<p>Frizou: /* SW installation guide (under construction) */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide (under construction) =<br />
(adapted and simplified from [[Debian_shared]])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1121108 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Create or restore configuration file as /etc/davical/config.php (for default host ''example.net/davical'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8'; # or something else: fr_FR.UTF-8, ...<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/config.php<br />
<br />
Create or restore Apache virtualhost /etc/apache2/sites-available/000-default.conf with its profile content as in this example:<br />
<VirtualHost *:80><br />
ServerAdmin webmaster@localhost<br />
DocumentRoot /var/www/html<br />
ErrorLog ${APACHE_LOG_DIR}/error.log<br />
CustomLog ${APACHE_LOG_DIR}/access.log combined<br />
</VirtualHost><br />
<br />
Enable Apache website (may be useless):<br />
sudo a2ensite 000-default<br />
<br />
Enable davical:<br />
cd /var/www/html<br />
sudo ln -s /usr/share/davical/htdocs/ davical<br />
<br />
Now you should be able to browse to example.net/davical with your favourite web browser.<br />
<br />
<br />
==== Login to DAViCAL Admin ====<br />
<br />
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.</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3699
Raspberry Pi2 Raspbian
2016-07-24T06:39:17Z
<p>Frizou: /* SW installation guide (under construction) */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide (under construction) =<br />
(adapted from [[Debian_shared]])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1121108 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Create or restore configuration file as /etc/davical/caldav.example.net-conf.php (for a virtualhost ''caldav.example.net'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8';<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/caldav.example.net-conf.php<br />
<br />
Create or restore Apache virtualhost with its profile content as in this example:<br />
<VirtualHost *:80 *:8008 *:8800><br />
ServerName caldav.example.net<br />
DocumentRoot /usr/share/davical/htdocs<br />
DirectoryIndex index.php index.html<br />
Alias /images/ /usr/share/davical/htdocs/images/<br />
<Directory /usr/share/davical/htdocs/><br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
php_value include_path /usr/share/awl/inc<br />
php_value magic_quotes_gpc 0<br />
php_value magic_quotes_runtime 0<br />
php_value register_globals 0<br />
php_value error_reporting "E_ALL & ~E_NOTICE"<br />
php_value default_charset "utf-8"<br />
</VirtualHost><br />
(Apache may need to be configured in ports.conf to listen also ports 8008 and 8800)<br />
<br />
Enable Apache website:<br />
sudo a2ensite caldav.example.net<br />
<br />
==== Login to DAViCAL Admin ====<br />
<br />
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.</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3698
Raspberry Pi2 Raspbian
2016-07-23T22:10:08Z
<p>Frizou: /* SW installation guide (under construction) */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide (under construction) =<br />
(adapted from [Debian_shared])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1121108 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Create or restore configuration file as /etc/davical/caldav.example.net-conf.php (for a virtualhost ''caldav.example.net'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8';<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/caldav.example.net-conf.php<br />
<br />
Create or restore Apache virtualhost with its profile content as in this example:<br />
<VirtualHost *:80 *:8008 *:8800><br />
ServerName caldav.example.net<br />
DocumentRoot /usr/share/davical/htdocs<br />
DirectoryIndex index.php index.html<br />
Alias /images/ /usr/share/davical/htdocs/images/<br />
<Directory /usr/share/davical/htdocs/><br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
php_value include_path /usr/share/awl/inc<br />
php_value magic_quotes_gpc 0<br />
php_value magic_quotes_runtime 0<br />
php_value register_globals 0<br />
php_value error_reporting "E_ALL & ~E_NOTICE"<br />
php_value default_charset "utf-8"<br />
</VirtualHost><br />
(Apache may need to be configured in ports.conf to listen also ports 8008 and 8800)<br />
<br />
Enable Apache website:<br />
sudo a2ensite caldav.example.net<br />
<br />
==== Login to DAViCAL Admin ====<br />
<br />
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.</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3692
Raspberry Pi2 Raspbian
2016-06-18T10:25:33Z
<p>Frizou: /* SW installation guide (under construction) */ - postgressql reload</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide (under construction) =<br />
(adapted from [Debian_shared])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1014128 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Create or restore configuration file as /etc/davical/caldav.example.net-conf.php (for a virtualhost ''caldav.example.net'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8';<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/caldav.example.net-conf.php<br />
<br />
Create or restore Apache virtualhost with its profile content as in this example:<br />
<VirtualHost *:80 *:8008 *:8800><br />
ServerName caldav.example.net<br />
DocumentRoot /usr/share/davical/htdocs<br />
DirectoryIndex index.php index.html<br />
Alias /images/ /usr/share/davical/htdocs/images/<br />
<Directory /usr/share/davical/htdocs/><br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
php_value include_path /usr/share/awl/inc<br />
php_value magic_quotes_gpc 0<br />
php_value magic_quotes_runtime 0<br />
php_value register_globals 0<br />
php_value error_reporting "E_ALL & ~E_NOTICE"<br />
php_value default_charset "utf-8"<br />
</VirtualHost><br />
(Apache may need to be configured in ports.conf to listen also ports 8008 and 8800)<br />
<br />
Enable Apache website:<br />
sudo a2ensite caldav.example.net<br />
<br />
==== Login to DAViCAL Admin ====<br />
<br />
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.</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3691
Raspberry Pi2 Raspbian
2016-06-18T10:21:10Z
<p>Frizou: /* SW installation guide (under construction) */ - postgressql reload</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide (under construction) =<br />
(adapted from [Debian_shared])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1014128 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql-${MediumPgVersion} reload<br />
<br />
Create or restore configuration file as /etc/davical/caldav.example.net-conf.php (for a virtualhost ''caldav.example.net'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8';<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/caldav.example.net-conf.php<br />
<br />
Create or restore Apache virtualhost with its profile content as in this example:<br />
<VirtualHost *:80 *:8008 *:8800><br />
ServerName caldav.example.net<br />
DocumentRoot /usr/share/davical/htdocs<br />
DirectoryIndex index.php index.html<br />
Alias /images/ /usr/share/davical/htdocs/images/<br />
<Directory /usr/share/davical/htdocs/><br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
php_value include_path /usr/share/awl/inc<br />
php_value magic_quotes_gpc 0<br />
php_value magic_quotes_runtime 0<br />
php_value register_globals 0<br />
php_value error_reporting "E_ALL & ~E_NOTICE"<br />
php_value default_charset "utf-8"<br />
</VirtualHost><br />
(Apache may need to be configured in ports.conf to listen also ports 8008 and 8800)<br />
<br />
Enable Apache website:<br />
sudo a2ensite caldav.example.net<br />
<br />
==== Login to DAViCAL Admin ====<br />
<br />
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.</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3690
Raspberry Pi2 Raspbian
2016-06-18T10:13:34Z
<p>Frizou: </p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal 1.1.3.1, AWL 0.55, PostgreSql 9.4.8, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide (under construction) =<br />
(adapted from [Debian_shared])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1014128 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql-${MediumPgVersion} reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql-${MediumPgVersion} reload<br />
<br />
Create or restore configuration file as /etc/davical/caldav.example.net-conf.php (for a virtualhost ''caldav.example.net'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8';<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/caldav.example.net-conf.php<br />
<br />
Create or restore Apache virtualhost with its profile content as in this example:<br />
<VirtualHost *:80 *:8008 *:8800><br />
ServerName caldav.example.net<br />
DocumentRoot /usr/share/davical/htdocs<br />
DirectoryIndex index.php index.html<br />
Alias /images/ /usr/share/davical/htdocs/images/<br />
<Directory /usr/share/davical/htdocs/><br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
php_value include_path /usr/share/awl/inc<br />
php_value magic_quotes_gpc 0<br />
php_value magic_quotes_runtime 0<br />
php_value register_globals 0<br />
php_value error_reporting "E_ALL & ~E_NOTICE"<br />
php_value default_charset "utf-8"<br />
</VirtualHost><br />
(Apache may need to be configured in ports.conf to listen also ports 8008 and 8800)<br />
<br />
Enable Apache website:<br />
sudo a2ensite caldav.example.net<br />
<br />
==== Login to DAViCAL Admin ====<br />
<br />
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.</div>
Frizou
https://wiki.davical.org/index.php?title=Downloading&diff=3689
Downloading
2016-06-18T09:47:40Z
<p>Frizou: /* Debian / Ubuntu */ + link to Raspberry</p>
<hr />
<div>{{TOCright}}<br />
The latest DAViCal release is generally available for download from:<br />
https://gitlab.com/davical-project/davical/tags<br />
<br />
Andrew's Web Libraries, which DAViCal depends on, is similarly available from:<br />
https://gitlab.com/davical-project/awl/tags<br />
<br />
Both these sources are of the full Git repository, which includes the website and other pieces you may not need. We hope to have a better packaged distribution again in the near future.<br />
<br />
== Pre-built Distribution Files ==<br />
<br />
=== Debian / Ubuntu ===<br />
<br />
==== Debian ====<br />
<br />
AWL 0.53 and DAViCal 1.1.1 are in Debian Wheezy, while Jessie has AWL 0.55 and DAViCal 1.1.3.1. Packages can be installed directly with apt-get.<br />
<br />
==== Raspberry Pi2 Raspbian ====<br />
<br />
You can find a very detailed how-to here: [[Raspberry_Pi2_Raspbian]].<br />
<br />
==== Ubuntu ====<br />
<br />
DAViCal and AWL have been synced from Debian and are present already.<br />
<br />
==== Older Ubuntu & Debian releases ====<br />
<br />
While older DAViCal packages are present in several releases of Ubuntu and Debian, you may want to consider installing the most recent version to benefit from bug and compatibility fixes. For this purpose, we maintain a '''davical-current''' repository, which can be added to your sources.list through a three-step process described at '''https://people.debian.org/~fsfs/davical-current/setup.sh'''<br />
<br />
=== Gentoo ===<br />
<br />
An ebuild should be available within the 'sunrise' overlay.<br />
<br />
=== Red Hat and other RPM-based releases ===<br />
<br />
It is possible that DAViCal will appear in the Fedora repository at some point. In the meantime, it is probably best to install from the sources.<br />
<br />
=== FreeBSD ===<br />
<br />
There are ports of DAViCal which are updated from time to time.<br />
<br />
== Installing from Source ==<br />
<br />
=== Tar archives ===<br />
DAViCal is not a compiled package, so there is generally very little to be gained from installing from source, however you can do this by downloading the relevant .tar.gz files (both DAViCal and AWL) from the above location.<br />
<br />
=== Installing from Git ===<br />
<br />
If you want to follow the cutting edge and help develop and test DAViCal, you can clone from the above mentioned gitlab repositories as follows:<br />
git clone https://gitlab.com/davical-project/awl.git<br />
git clone https://gitlab.com/davical-project/davical.git<br />
<br />
For more information read [[Developer Setup]] and [[Helping with DAViCal]].</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3688
Raspberry Pi2 Raspbian
2016-06-18T09:37:50Z
<p>Frizou: New jessie version.</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
* 2015-06-18: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
* 2016-06-18: Raspbian jessie released on 2016-05-27<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
* 2016-06-18: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide (under construction) =<br />
(adapted from [Debian_shared])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1014128 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql-${MediumPgVersion} reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql-${MediumPgVersion} reload<br />
<br />
Create or restore configuration file as /etc/davical/caldav.example.net-conf.php (for a virtualhost ''caldav.example.net'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8';<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/caldav.example.net-conf.php<br />
<br />
Create or restore Apache virtualhost with its profile content as in this example:<br />
<VirtualHost *:80 *:8008 *:8800><br />
ServerName caldav.example.net<br />
DocumentRoot /usr/share/davical/htdocs<br />
DirectoryIndex index.php index.html<br />
Alias /images/ /usr/share/davical/htdocs/images/<br />
<Directory /usr/share/davical/htdocs/><br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
php_value include_path /usr/share/awl/inc<br />
php_value magic_quotes_gpc 0<br />
php_value magic_quotes_runtime 0<br />
php_value register_globals 0<br />
php_value error_reporting "E_ALL & ~E_NOTICE"<br />
php_value default_charset "utf-8"<br />
</VirtualHost><br />
(Apache may need to be configured in ports.conf to listen also ports 8008 and 8800)<br />
<br />
Enable Apache website:<br />
sudo a2ensite caldav.example.net<br />
<br />
==== Login to DAViCAL Admin ====<br />
<br />
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.</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3687
Raspberry Pi2 Raspbian
2016-06-17T20:42:30Z
<p>Frizou: /* SW installation guide (under construction) */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide (under construction) =<br />
(adapted from [Debian_shared])<br />
<br />
(858384 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE="en_GB"<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales # select your locale with TUI<br />
sudo apt-get install davical davical-doc<br />
<br />
(1014128 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql-${MediumPgVersion} reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql-${MediumPgVersion} reload<br />
<br />
Create or restore configuration file as /etc/davical/caldav.example.net-conf.php (for a virtualhost ''caldav.example.net'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8';<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/caldav.example.net-conf.php<br />
<br />
Create or restore Apache virtualhost with its profile content as in this example:<br />
<VirtualHost *:80 *:8008 *:8800><br />
ServerName caldav.example.net<br />
DocumentRoot /usr/share/davical/htdocs<br />
DirectoryIndex index.php index.html<br />
Alias /images/ /usr/share/davical/htdocs/images/<br />
<Directory /usr/share/davical/htdocs/><br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
php_value include_path /usr/share/awl/inc<br />
php_value magic_quotes_gpc 0<br />
php_value magic_quotes_runtime 0<br />
php_value register_globals 0<br />
php_value error_reporting "E_ALL & ~E_NOTICE"<br />
php_value default_charset "utf-8"<br />
</VirtualHost><br />
(Apache may need to be configured in ports.conf to listen also ports 8008 and 8800)<br />
<br />
Enable Apache website:<br />
sudo a2ensite caldav.example.net<br />
<br />
==== Login to DAViCAL Admin ====<br />
<br />
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.</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3686
Raspberry Pi2 Raspbian
2016-06-17T20:20:44Z
<p>Frizou: /* Preparing Raspberry Pi micro-SD card from a linux computer */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_lite_latest<br />
openssl dgst -sha1 raspbian_lite_latest<br />
# SHA1(raspbian_lite_latest)= 03b6ea33efc3bb4d475f528421d554fc1ef91944<br />
unzip raspbian_lite_latest<br />
# 2016-05-27-raspbian-jessie-lite.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2016-05-27-raspbian-jessie-lite.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide (under construction) =<br />
(adapted from [Debian_shared])<br />
<br />
(3201140 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE='en_GB'<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales<br />
sudo apt-get install davical davical-doc<br />
<br />
(3277004 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql-${MediumPgVersion} reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql-${MediumPgVersion} reload<br />
<br />
Create or restore configuration file as /etc/davical/caldav.example.net-conf.php (for a virtualhost ''caldav.example.net'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8';<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/caldav.example.net-conf.php<br />
<br />
Create or restore Apache virtualhost with its profile content as in this example:<br />
<VirtualHost *:80 *:8008 *:8800><br />
ServerName caldav.example.net<br />
DocumentRoot /usr/share/davical/htdocs<br />
DirectoryIndex index.php index.html<br />
Alias /images/ /usr/share/davical/htdocs/images/<br />
<Directory /usr/share/davical/htdocs/><br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
php_value include_path /usr/share/awl/inc<br />
php_value magic_quotes_gpc 0<br />
php_value magic_quotes_runtime 0<br />
php_value register_globals 0<br />
php_value error_reporting "E_ALL & ~E_NOTICE"<br />
php_value default_charset "utf-8"<br />
</VirtualHost><br />
(Apache may need to be configured in ports.conf to listen also ports 8008 and 8800)<br />
<br />
Enable Apache website:<br />
sudo a2ensite caldav.example.net<br />
<br />
==== Login to DAViCAL Admin ====<br />
<br />
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.</div>
Frizou
https://wiki.davical.org/index.php?title=Community_Support/Minutes_21Jan2016&diff=3661
Community Support/Minutes 21Jan2016
2016-01-21T21:17:25Z
<p>Frizou: /* People involved in the meeting: */</p>
<hr />
<div>=DAViCal PROJECT MEETING, called for 2016-01-21, 19:00 UTC=<br />
<br />
==People involved in the meeting:==<br />
Jim Fenton, Cyril Giraud, Narcis Garcia, Frank Martin, Tuxick, Gorka<br />
<br />
Begin time: 19:06 UTC<br />
<br />
=1. Project infrastructure=<br />
<br />
==1.1. Website and documentation==<br />
<br />
Navigating on http://wiki.davical.org may switch to http://davical.dhits.nl (same Wiki content, but confusing). Corrected by Tuxick on the fly.<br />
<br />
We also discussed getting rid of the /index.php/ in the middle of the wiki URLs; Tuxick will investigate rewrite rules to do that.<br />
<br />
==1.2. Source code==<br />
<br />
Florian and Cyril will improve scripting of translation process.<br />
<br />
An opensource tool to make documentation from code and code comments should be selected. phpdoc and php-apigen are in short list.<br />
<br />
===1.2.1 Git===<br />
<br />
==1.3. Downloads and binary repositories==<br />
<br />
===1.3.1 Debian/DEB Packages===<br />
<br />
===1.3.2 RedHat/RPM Packages===<br />
<br />
==1.4. Localization==<br />
<br />
<br />
=2. Development=<br />
<br />
==2.1. Tickets or bug reports==<br />
<br />
==2.2. Patches or updates==<br />
<br />
==2.3. New features or versions==<br />
<br />
<br />
=3.Project community=<br />
<br />
==3.1 Mailing list and meetings==<br />
<br />
==3.2. Roles==<br />
<br />
==3.3. Communication with Andrew McMillan==<br />
<br />
<br />
=4. Off topics=<br />
<br />
Next meeting Thursday March 10 at 19:00 UTC.<br />
<br />
Meeting adjourned 21:07 UTC.</div>
Frizou
https://wiki.davical.org/index.php?title=Community_Support/Minutes_21Jan2016&diff=3660
Community Support/Minutes 21Jan2016
2016-01-21T21:16:59Z
<p>Frizou: Created page with "=DAViCal PROJECT MEETING, called for 2016-01-21, 19:00 UTC= ==People involved in the meeting:== Jim Fenton, Cyril Giraud, Narcis Garcia, Frank Martin, Tuxick, Gorka Begin t..."</p>
<hr />
<div>=DAViCal PROJECT MEETING, called for 2016-01-21, 19:00 UTC=<br />
<br />
==People involved in the meeting:==<br />
Jim Fenton, Cyril Giraud, Narcis Garcia, Frank Martin, Tuxick, Gorka<br />
<br />
<br />
Begin time: 19:06 UTC<br />
<br />
=1. Project infrastructure=<br />
<br />
==1.1. Website and documentation==<br />
<br />
Navigating on http://wiki.davical.org may switch to http://davical.dhits.nl (same Wiki content, but confusing). Corrected by Tuxick on the fly.<br />
<br />
We also discussed getting rid of the /index.php/ in the middle of the wiki URLs; Tuxick will investigate rewrite rules to do that.<br />
<br />
==1.2. Source code==<br />
<br />
Florian and Cyril will improve scripting of translation process.<br />
<br />
An opensource tool to make documentation from code and code comments should be selected. phpdoc and php-apigen are in short list.<br />
<br />
===1.2.1 Git===<br />
<br />
==1.3. Downloads and binary repositories==<br />
<br />
===1.3.1 Debian/DEB Packages===<br />
<br />
===1.3.2 RedHat/RPM Packages===<br />
<br />
==1.4. Localization==<br />
<br />
<br />
=2. Development=<br />
<br />
==2.1. Tickets or bug reports==<br />
<br />
==2.2. Patches or updates==<br />
<br />
==2.3. New features or versions==<br />
<br />
<br />
=3.Project community=<br />
<br />
==3.1 Mailing list and meetings==<br />
<br />
==3.2. Roles==<br />
<br />
==3.3. Communication with Andrew McMillan==<br />
<br />
<br />
=4. Off topics=<br />
<br />
Next meeting Thursday March 10 at 19:00 UTC.<br />
<br />
Meeting adjourned 21:07 UTC.</div>
Frizou
https://wiki.davical.org/index.php?title=Community_Support/Minutes_10Dec2015&diff=3659
Community Support/Minutes 10Dec2015
2016-01-21T21:15:23Z
<p>Frizou: Created page with "=DAViCal PROJECT MEETING, called for 2015-12-10, 19:00 UTC= ==People involved in the meeting:== Jim Fenton, tuxick, gorka, ibeardslee, cyril, Frank Martin, hauke Begin time:..."</p>
<hr />
<div>=DAViCal PROJECT MEETING, called for 2015-12-10, 19:00 UTC=<br />
<br />
==People involved in the meeting:==<br />
Jim Fenton, tuxick, gorka, ibeardslee, cyril, Frank Martin, hauke<br />
<br />
Begin time: 19:13 UTC<br />
<br />
=1. Project infrastructure=<br />
<br />
==1.1. Website and documentation==<br />
<br />
We're trying to sort out language support on the wiki -- some progress but we still don't have links between multiple languages of the same page.<br />
<br />
Frank will assign 'documentation' tags to related Issues.<br />
<br />
==1.2. Source code==<br />
<br />
===1.2.1 Git===<br />
gorka merged #20<br />
Jim will merge #19 and associated AWL fix after incrementing AWL version number.<br />
<br />
==1.3. Downloads and binary repositories==<br />
<br />
===1.3.1 Debian/DEB Packages===<br />
<br />
===1.3.2 RedHat/RPM Packages===<br />
<br />
==1.4. Localization==<br />
<br />
<br />
=2. Development=<br />
<br />
==2.1. Tickets or bug reports==<br />
<br />
==2.2. Patches or updates==<br />
<br />
==2.3. New features or versions==<br />
<br />
<br />
=3.Project community=<br />
<br />
==3.1 Mailing list and meetings==<br />
<br />
Next meeting 2016-01-21 at 19:00 UTC.<br />
<br />
<br />
==3.2. Roles==<br />
<br />
==3.3. Communication with Andrew McMillan==<br />
<br />
Jim met Andrew few weeks ago!<br />
<br />
<br />
=4. Off topics=<br />
<br />
Meeting adjourned 22:06 UTC.</div>
Frizou
https://wiki.davical.org/index.php?title=Community_Support&diff=3658
Community Support
2016-01-21T21:13:09Z
<p>Frizou: /* Minutes of Previous Meetings */</p>
<hr />
<div>== Community Support ==<br />
<br />
Beginning in February 2014, interested members of the DAViCal community began organizing (with the concurrence of Andrew McMillan, the primary author of DAViCal) a community support model for DAViCal because of continued limitations in the time Andrew is able to dedicate to the project. The meetings are held on the #davical '''IRC''' channel on [https://webirc.oftc.net:8443/ irc.oftc.net] (the usual DAViCal IRC channel).<br />
<br />
Meeting minutes are taken using the '''Gobby''' collaborative editor:<br />
<br />
* Host: assemblies.actiu.info:23101<br />
* Password: davical<br />
* Client software: http://gobby.github.io/<br />
* [http://www.actiu.info/gobby/gobby-channels_en.pdf Quick guide] (PDF).<br />
<br />
Debian and Ubuntu desktop users may use the package gobby-infinote from built-in repositories. The Gobby package from Android repositories has no<br />
relationship with the exposed collaborative software.<br />
<br />
'''Next scheduled meeting:''' '''Thursday, 10 March 2016, at 19:00 UTC'''<br />
<br />
== Minutes of Previous Meetings ==<br />
<br />
[[Community_Support/Minutes_21Jan2016|Minutes from 21 January 2016]]<br />
<br />
----<br />
<br />
[[Community_Support/Minutes_10Dec2015|Minutes from 10 December 2015]]<br />
<br />
[[Community_Support/Minutes_05Nov2015|Minutes from 05 November 2015]]<br />
<br />
[[Community_Support/Minutes_01Oct2015|Minutes from 01 October 2015]]<br />
<br />
[[Community_Support/Minutes_29June2015|Minutes from 29 June 2015]]<br />
<br />
[[Community_Support/Minutes_18May2015|Minutes from 18 May 2015]]<br />
<br />
[[Community_Support/Minutes_23Mar2015|Minutes from 23 March 2015]]<br />
<br />
[[Community_Support/Minutes_19Jan2015|Minutes from 19 January 2015]]<br />
<br />
----<br />
<br />
[[Community_Support/Minutes_15Dec2014|Minutes from 15 December 2014]]<br />
<br />
[[Community_Support/Minutes_10Nov2014|Minutes from 10 November 2014]]<br />
<br />
[[Community_Support/Minutes_20Oct2014|Minutes from 20 October 2014]]<br />
<br />
[[Community_Support/Minutes_06Oct2014|Minutes from 06 October 2014]]<br />
<br />
[[Community_Support/Minutes_22Sep2014|Minutes from 22 September 2014]]<br />
<br />
[[Community_Support/Minutes_25Jun2014|Minutes from 25 June 2014]]<br />
<br />
[[Community_Support/Minutes_11Jun2014|Minutes from 11 June 2014]]<br />
<br />
[[Community_Support/Minutes_27May2014|Minutes from 27 May 2014]]<br />
<br />
[[Community_Support/Minutes_14May2014|Minutes from 14 May 2014]]<br />
<br />
[[Community_Support/Minutes_30Apr2014|Minutes from 30 April 2014]]<br />
<br />
[[Community_Support/Minutes_09Apr2014|Minutes from 09 April 2014]]<br />
<br />
[[Community_Support/Minutes_25Mar2014|Minutes from 25 March 2014]]<br />
<br />
[[Community_Support/Minutes_11Mar2014|Minutes from 11 March 2014]]<br />
<br />
[[Community_Support/Minutes_18Feb2014|Minutes from 18 February 2014]]</div>
Frizou
https://wiki.davical.org/index.php?title=Community_Support&diff=3657
Community Support
2016-01-21T21:06:50Z
<p>Frizou: /* Minutes of Previous Meetings */</p>
<hr />
<div>== Community Support ==<br />
<br />
Beginning in February 2014, interested members of the DAViCal community began organizing (with the concurrence of Andrew McMillan, the primary author of DAViCal) a community support model for DAViCal because of continued limitations in the time Andrew is able to dedicate to the project. The meetings are held on the #davical '''IRC''' channel on [https://webirc.oftc.net:8443/ irc.oftc.net] (the usual DAViCal IRC channel).<br />
<br />
Meeting minutes are taken using the '''Gobby''' collaborative editor:<br />
<br />
* Host: assemblies.actiu.info:23101<br />
* Password: davical<br />
* Client software: http://gobby.github.io/<br />
* [http://www.actiu.info/gobby/gobby-channels_en.pdf Quick guide] (PDF).<br />
<br />
Debian and Ubuntu desktop users may use the package gobby-infinote from built-in repositories. The Gobby package from Android repositories has no<br />
relationship with the exposed collaborative software.<br />
<br />
'''Next scheduled meeting:''' '''Thursday, 10 March 2016, at 19:00 UTC'''<br />
<br />
== Minutes of Previous Meetings ==<br />
<br />
[[Community_Support/Minutes_21Jan2016|Minutes from 21 January 2016]]<br />
<br />
----<br />
<br />
[[Community_Support/Minutes_05Nov2015|Minutes from 05 November 2015]]<br />
<br />
[[Community_Support/Minutes_01Oct2015|Minutes from 01 October 2015]]<br />
<br />
[[Community_Support/Minutes_29June2015|Minutes from 29 June 2015]]<br />
<br />
[[Community_Support/Minutes_18May2015|Minutes from 18 May 2015]]<br />
<br />
[[Community_Support/Minutes_23Mar2015|Minutes from 23 March 2015]]<br />
<br />
[[Community_Support/Minutes_19Jan2015|Minutes from 19 January 2015]]<br />
<br />
----<br />
<br />
[[Community_Support/Minutes_15Dec2014|Minutes from 15 December 2014]]<br />
<br />
[[Community_Support/Minutes_10Nov2014|Minutes from 10 November 2014]]<br />
<br />
[[Community_Support/Minutes_20Oct2014|Minutes from 20 October 2014]]<br />
<br />
[[Community_Support/Minutes_06Oct2014|Minutes from 06 October 2014]]<br />
<br />
[[Community_Support/Minutes_22Sep2014|Minutes from 22 September 2014]]<br />
<br />
[[Community_Support/Minutes_25Jun2014|Minutes from 25 June 2014]]<br />
<br />
[[Community_Support/Minutes_11Jun2014|Minutes from 11 June 2014]]<br />
<br />
[[Community_Support/Minutes_27May2014|Minutes from 27 May 2014]]<br />
<br />
[[Community_Support/Minutes_14May2014|Minutes from 14 May 2014]]<br />
<br />
[[Community_Support/Minutes_30Apr2014|Minutes from 30 April 2014]]<br />
<br />
[[Community_Support/Minutes_09Apr2014|Minutes from 09 April 2014]]<br />
<br />
[[Community_Support/Minutes_25Mar2014|Minutes from 25 March 2014]]<br />
<br />
[[Community_Support/Minutes_11Mar2014|Minutes from 11 March 2014]]<br />
<br />
[[Community_Support/Minutes_18Feb2014|Minutes from 18 February 2014]]</div>
Frizou
https://wiki.davical.org/index.php?title=Community_Support&diff=3656
Community Support
2016-01-21T21:06:22Z
<p>Frizou: </p>
<hr />
<div>== Community Support ==<br />
<br />
Beginning in February 2014, interested members of the DAViCal community began organizing (with the concurrence of Andrew McMillan, the primary author of DAViCal) a community support model for DAViCal because of continued limitations in the time Andrew is able to dedicate to the project. The meetings are held on the #davical '''IRC''' channel on [https://webirc.oftc.net:8443/ irc.oftc.net] (the usual DAViCal IRC channel).<br />
<br />
Meeting minutes are taken using the '''Gobby''' collaborative editor:<br />
<br />
* Host: assemblies.actiu.info:23101<br />
* Password: davical<br />
* Client software: http://gobby.github.io/<br />
* [http://www.actiu.info/gobby/gobby-channels_en.pdf Quick guide] (PDF).<br />
<br />
Debian and Ubuntu desktop users may use the package gobby-infinote from built-in repositories. The Gobby package from Android repositories has no<br />
relationship with the exposed collaborative software.<br />
<br />
'''Next scheduled meeting:''' '''Thursday, 10 March 2016, at 19:00 UTC'''<br />
<br />
== Minutes of Previous Meetings ==<br />
<br />
[[Community_Support/Minutes_21Jan2016|Minutes from 21 January 2016]]<br />
<br />
[[Community_Support/Minutes_05Nov2015|Minutes from 05 November 2015]]<br />
<br />
[[Community_Support/Minutes_01Oct2015|Minutes from 01 October 2015]]<br />
<br />
[[Community_Support/Minutes_29June2015|Minutes from 29 June 2015]]<br />
<br />
[[Community_Support/Minutes_18May2015|Minutes from 18 May 2015]]<br />
<br />
[[Community_Support/Minutes_23Mar2015|Minutes from 23 March 2015]]<br />
<br />
[[Community_Support/Minutes_19Jan2015|Minutes from 19 January 2015]]<br />
<br />
----<br />
<br />
[[Community_Support/Minutes_15Dec2014|Minutes from 15 December 2014]]<br />
<br />
[[Community_Support/Minutes_10Nov2014|Minutes from 10 November 2014]]<br />
<br />
[[Community_Support/Minutes_20Oct2014|Minutes from 20 October 2014]]<br />
<br />
[[Community_Support/Minutes_06Oct2014|Minutes from 06 October 2014]]<br />
<br />
[[Community_Support/Minutes_22Sep2014|Minutes from 22 September 2014]]<br />
<br />
[[Community_Support/Minutes_25Jun2014|Minutes from 25 June 2014]]<br />
<br />
[[Community_Support/Minutes_11Jun2014|Minutes from 11 June 2014]]<br />
<br />
[[Community_Support/Minutes_27May2014|Minutes from 27 May 2014]]<br />
<br />
[[Community_Support/Minutes_14May2014|Minutes from 14 May 2014]]<br />
<br />
[[Community_Support/Minutes_30Apr2014|Minutes from 30 April 2014]]<br />
<br />
[[Community_Support/Minutes_09Apr2014|Minutes from 09 April 2014]]<br />
<br />
[[Community_Support/Minutes_25Mar2014|Minutes from 25 March 2014]]<br />
<br />
[[Community_Support/Minutes_11Mar2014|Minutes from 11 March 2014]]<br />
<br />
[[Community_Support/Minutes_18Feb2014|Minutes from 18 February 2014]]</div>
Frizou
https://wiki.davical.org/index.php?title=Fr:Translating_DAViCal&diff=3655
Fr:Translating DAViCal
2016-01-21T21:02:51Z
<p>Frizou: Bascule de OpenOffice vers LibreOffice</p>
<hr />
<div>{{Languages|Translating DAViCal}}<br />
{{Trans/fr|Translating DAViCal}}<br />
Si vous souhaitez traduire DAViCal dans d'autres langues, vous pouvez télécharger le fichier de base de définitions des langues depuis le dépôts GIT.<br />
<br />
Le fichier DAViCal <tt>messages.pot</tt> de base se trouve ici:<br />
<br />
[https://github.com/DAViCal/davical/raw/master/po/messages.pot https://github.com/DAViCal/davical/raw/master/po/messages.pot]<br />
<br />
Vous pouvez voir tous les fichiers traduits ici: [https://github.com/DAViCal/davical/tree/master/po https://github.com/DAViCal/davical/tree/master/po] et ensuite cliquer sur le liens {{{raw}}} pour télécharger chacun d'eux. Chaque fois qu'un champ est mis à jour dans le code, celui-ci sera ajouté directement au fichiers de traduction déjà existants.<br />
<br />
Sauvegardez ceci dans un fichier que vous pourrez modifier dans un éditeur supportant UTF-8, comme VIM, EMacs ou [http://fr.libreoffice.org LibreOffice] Writer.<br />
<br />
== Edition avec Transifex ==<br />
{{TransifexStats}}<br />
<br />
C'est probablement la méthode la plus simple à moins que vous ne soyez un traducteur expérimenté:<br />
* allez sur [http://www.transifex.net/projects/p/davical/ le projet DAViCal chez Transifex] est créer vous-même un compte.<br />
* Demander à rejoindre une équipe de traduction pour votre langue, ou pour commencer une nouvelle s'il n'ya pas déjà un.<br />
* Commencez à traduire les phrases dans la langue de votre choix.<br />
<br />
Juste au cas où vous vous poseriez la question, il y a des stats sur la droite indiquant quelles langues sont à jour et celles nécessitant encore du travail.<br />
<br />
'''Some thoughts about where it is most useful to put in a little effort:<br />
* Translations showing less than 50% could really do with some help.<br />
* If you can translate even 10% you can provide useful clues to people who are not able to use one of the more translated languages.<br />
* Languages that are more than 80% translated are already well served by moderately active translators and need little help.<br />
* If you're a native speaker, a quick review of the main translators work is always useful.'''<br />
<br />
== Édition avec VIM ==<br />
<br />
Vous devez vous assurer d'utiliser l'encodage UTF-8, par exemple en ajoutant cette ligne à votre fichier ~/.vimrc:<br />
<br />
<pre>set enc=UTF-8<br />
</pre><br />
<br />
Sous Win32 vous pouvez utiliser '''''(en)'''''[ftp://ftp.vim.org/pub/vim/pc/gvim70.exe Gvim] pour windows 7 qui a plus de raccourci clavier à la windows. Vous devez le configurer en mode UTF-8,IIRC. Utilisez la fenêtres Edit|Settings pour cela. Recherchez la ligne qui contient "set enc=" <br />
<br />
Sinon sous Linux, Os X, Windows ou autre, dans GVim vous devriez être de capable de taper {{{:set enc=UTF-8}}} pour passer en UTF-8.<br />
<br />
== Édition avec LibreOffice ==<br />
<br />
Si vous utilisez LibreOffice Writer, vous pouvez sauvegarder les fichiers en tant que "Texte - Choisir l'encodage", cochez l'option "Editer les paramètres du filtre" et sauvegardez le fichier en tant que "Unicode (UTF-8)" avec saut de paragraphe "LF".<br />
<br />
== Édition avec EMacs ==<br />
<br />
Si vous utilisez EMacs, utilisez C-x RET f et spécifiez utf-8 en tant que code système pour sauvegarder.<br />
<br />
== Autres moyen d'éditer ces fichiers ==<br />
<br />
Si vous pouvez dites nous comment modifier ces fichiers d'une autre manière, nous apprécierons dans savoir plus à ce sujet!<br />
{{ Ã relire}}</div>
Frizou
https://wiki.davical.org/index.php?title=Fr:Main_Page&diff=3654
Fr:Main Page
2016-01-21T20:57:30Z
<p>Frizou: </p>
<hr />
<div>{{languages|Main Page}}<br />
<div style="width:80%"><p style="font-weight:bold;font-size:2.5em;color:#103050;text-align:center;">Wiki DAViCal</p></div><br />
Ce Wiki a pour but de fournir des informations et de l'aide concernant le serveur CalDAV et CardDAV DAViCal. Les pages sont regroupées par catégorie:<br />
{| style="width: 100%; border-spacing:15px;border-collapse:separate"<br />
|- valign="top"<br />
|style="width:25%;border: 1px solid rgb(191, 238, 255); background-color: rgb(239, 251, 255);"| '''A propos de DAViCal'''<br />
* [[Fr:Features|Caractéristiques]]<br />
* [[Fr:Getting Help|Obtenir de l'aide]]<br />
* [[Fr:CalDAV Clients|Clients CalDAV]]<br />
* [[Fr:Multiple Calendars|Calendriers multiples]]<br />
* [[Fr:Free Busy|Libre/occupé]]<br />
* [[Fr:CardDAV|CardDAV]]<br />
* [[Fr:Useful Links|Liens utiles]]<br />
|style="width:25%;border: 1px solid rgb(255, 199, 191); background-color: rgb(255, 241, 239);"|'''Documentation Administrateur'''<br />
* [[Fr:Installation Stuff|Installation]]<br />
* [[Fr:Downloading|Téléchargement]]<br />
* [[Fr:Configuration|Configuration]]<br />
* [[Fr:Upgrading|Mettre à jour]]<br />
* [[Fr:Backups|Sauvegarde]]<br />
* [[Fr:Frequently Asked Questions|Foire aux questions]]<br />
* [[Fr:Release Notes|Notes de publication]]<br />
* [[Fr:Support|Support]]<br />
|style="width:25%;border: 1px solid #8CACBB; background-color: #EEEEFF;"| '''Documentation pour les développeurs'''<br />
* [[Fr:Developer Setup|Configuration développeur]]<br />
* [[Fr:Pluggable Authentication|Authentification externe]]<br />
* [[Fr:User Contributions|Contributions d'utilisateurs]]<br />
* [[Fr:RFC Compliance|Respect des RFC]]<br />
|style="width:25%;border: 1px solid rgb(255, 255, 102); background-color: rgb(255, 250, 229);"| '''Participer à DAViCal sans coder'''<br />
* [[Fr:Translating DAViCal|Traduire DAViCal]]<br />
* [[Fr:Helping with DAViCal|Contribuer à DAViCal]] <br />
* [[Fr:Provide some Data|Fournir des données]]<br />
* [[Fr:Suggest Features|Proposez de nouvelles fonctions]]<br />
* [[Fr:Editing the Wiki|Participer au Wiki]]<br />
* [[Fr:Community Support|Communauté]]<br />
|}<br />
<br />
La dernière version stable de DAViCal est la [[Release_Notes/1.1.4|1.1.4]] (en anglais).</div>
Frizou
https://wiki.davical.org/index.php?title=Translating_DAViCal&diff=3653
Translating DAViCal
2016-01-21T20:48:24Z
<p>Frizou: Move from Open to Libre Office</p>
<hr />
<div>{{Languages|Translating DAViCal}}<br />
If you would like to translate DAViCal into a different language, you can download the language definitions base file from our Git repository here: <br />
<br />
The base DAViCal <tt>messages.pot</tt> file can be fetched from: [https://github.com/DAViCal/davical/raw/master/po/messages.pot https://github.com/DAViCal/davical/raw/master/po/messages.pot]<br />
<br />
Or you can see all of the translation files here: [https://github.com/DAViCal/davical/tree/master/po https://github.com/DAViCal/davical/tree/master/po] and then click on any file and then the {{{raw}}} link to download it. Each time the strings are updated in the code the new strings will be merged into the existing translations. <br />
<br />
Save that to a file which you edit in some editor that can to UTF-8, such as VIM, EMacs or [http://www.libreoffice.org LibreOffice] Writer. <br />
<br />
== Editing with Transifex ==<br />
{{TransifexStats}}<br />
<br />
This is probably the easiest method unless you're an experienced translator:<br />
* Go to [http://www.transifex.net/projects/p/davical/ the DAViCal project on Transifex] and create yourself an account.<br />
* Request to join a translation team for your chosen language, or to start a new one if there isn't one already.<br />
* Start translating strings in your language of choice.<br />
<br />
Just in case you were wondering, there are some stats over to the right showing what languages are up to date and what ones need work.<br />
<br />
Some thoughts about where it is most useful to put in a little effort:<br />
* Translations showing less than 50% could really do with some help.<br />
* If you can translate even 10% you can provide useful clues to people who are not able to use one of the more translated languages.<br />
* Languages that are more than 80% translated are already well served by moderately active translators and need little help.<br />
* If you're a native speaker, a quick review of the main translators work is always useful.<br />
----<br />
[[Transifex CLI and xgettext mini how-to]] (DEPRECATED)<br />
<br />
== Editing with VIM ==<br />
<br />
You will need to make sure that you are using UTF-8 encoding, such as by adding this line to your ~/.vimrc file: <br />
<br />
<pre>set enc=UTF-8<br />
</pre><br />
<br />
Under Win32 you can use [ftp://ftp.vim.org/pub/vim/pc/gvim70.exe Gvim] for windows 7 which has more windows-like keybindings. You'll need to set it to use UTF-8, IIRC. Use Edit|Settings Window to do this. Search for the line containing "set enc=" <br />
<br />
Alternatively, in Linux, OS X, Windows or anything else, inside GVim you should be able to type {{{:set enc=UTF-8}}} to switch to UTF-8. <br />
<br />
== Editing with LibreOffice ==<br />
<br />
If you use LibreOffice Writer, you can save the file as "Text Encoded", make sure the "Edit Filter Settings" option is checked and that the file is saved as "UTF-8" with "LF line endings".<br />
<br />
== Editing with EMacs ==<br />
<br />
If you use Emacs, you can use C-x RET f and specify utf-8 as coding system for saving file.<br />
<br />
== Other ways of editing this file ==<br />
<br />
If you can tell us how to edit these files in other ways, we would love to know about that too!</div>
Frizou
https://wiki.davical.org/index.php?title=Translating_DAViCal&diff=3652
Translating DAViCal
2016-01-21T20:46:46Z
<p>Frizou: /* Editing with Transifex */</p>
<hr />
<div>{{Languages|Translating DAViCal}}<br />
If you would like to translate DAViCal into a different language, you can download the language definitions base file from our Git repository here: <br />
<br />
The base DAViCal <tt>messages.pot</tt> file can be fetched from: [https://github.com/DAViCal/davical/raw/master/po/messages.pot https://github.com/DAViCal/davical/raw/master/po/messages.pot]<br />
<br />
Or you can see all of the translation files here: [https://github.com/DAViCal/davical/tree/master/po https://github.com/DAViCal/davical/tree/master/po] and then click on any file and then the {{{raw}}} link to download it. Each time the strings are updated in the code the new strings will be merged into the existing translations. <br />
<br />
Save that to a file which you edit in some editor that can to UTF-8, such as VIM, EMacs or [http://www.openoffice.org OpenOffice.org] Writer. <br />
<br />
== Editing with Transifex ==<br />
{{TransifexStats}}<br />
<br />
This is probably the easiest method unless you're an experienced translator:<br />
* Go to [http://www.transifex.net/projects/p/davical/ the DAViCal project on Transifex] and create yourself an account.<br />
* Request to join a translation team for your chosen language, or to start a new one if there isn't one already.<br />
* Start translating strings in your language of choice.<br />
<br />
Just in case you were wondering, there are some stats over to the right showing what languages are up to date and what ones need work.<br />
<br />
Some thoughts about where it is most useful to put in a little effort:<br />
* Translations showing less than 50% could really do with some help.<br />
* If you can translate even 10% you can provide useful clues to people who are not able to use one of the more translated languages.<br />
* Languages that are more than 80% translated are already well served by moderately active translators and need little help.<br />
* If you're a native speaker, a quick review of the main translators work is always useful.<br />
----<br />
[[Transifex CLI and xgettext mini how-to]] (DEPRECATED)<br />
<br />
== Editing with VIM ==<br />
<br />
You will need to make sure that you are using UTF-8 encoding, such as by adding this line to your ~/.vimrc file: <br />
<br />
<pre>set enc=UTF-8<br />
</pre><br />
<br />
Under Win32 you can use [ftp://ftp.vim.org/pub/vim/pc/gvim70.exe Gvim] for windows 7 which has more windows-like keybindings. You'll need to set it to use UTF-8, IIRC. Use Edit|Settings Window to do this. Search for the line containing "set enc=" <br />
<br />
Alternatively, in Linux, OS X, Windows or anything else, inside GVim you should be able to type {{{:set enc=UTF-8}}} to switch to UTF-8. <br />
<br />
== Editing with LibreOffice ==<br />
<br />
If you use LibreOffice Writer, you can save the file as "Text Encoded", make sure the "Edit Filter Settings" option is checked and that the file is saved as "UTF-8" with "LF line endings".<br />
<br />
== Editing with EMacs ==<br />
<br />
If you use Emacs, you can use C-x RET f and specify utf-8 as coding system for saving file.<br />
<br />
== Other ways of editing this file ==<br />
<br />
If you can tell us how to edit these files in other ways, we would love to know about that too!</div>
Frizou
https://wiki.davical.org/index.php?title=Translating_DAViCal&diff=3651
Translating DAViCal
2016-01-21T20:45:42Z
<p>Frizou: /* Editing with OpenOffice.org */</p>
<hr />
<div>{{Languages|Translating DAViCal}}<br />
If you would like to translate DAViCal into a different language, you can download the language definitions base file from our Git repository here: <br />
<br />
The base DAViCal <tt>messages.pot</tt> file can be fetched from: [https://github.com/DAViCal/davical/raw/master/po/messages.pot https://github.com/DAViCal/davical/raw/master/po/messages.pot]<br />
<br />
Or you can see all of the translation files here: [https://github.com/DAViCal/davical/tree/master/po https://github.com/DAViCal/davical/tree/master/po] and then click on any file and then the {{{raw}}} link to download it. Each time the strings are updated in the code the new strings will be merged into the existing translations. <br />
<br />
Save that to a file which you edit in some editor that can to UTF-8, such as VIM, EMacs or [http://www.openoffice.org OpenOffice.org] Writer. <br />
<br />
== Editing with Transifex ==<br />
{{TransifexStats}}<br />
<br />
This is probably the easiest method unless you're an experienced translator:<br />
* Go to [http://www.transifex.net/projects/p/davical/ the DAViCal project on Transifex] and create yourself an account.<br />
* Request to join a translation team for your chosen language, or to start a new one if there isn't one already.<br />
* Start translating strings in your language of choice.<br />
<br />
Just in case you were wondering, there are some stats over to the right showing what languages are up to date and what ones need work.<br />
<br />
Some thoughts about where it is most useful to put in a little effort:<br />
* Translations showing less than 50% could really do with some help.<br />
* If you can translate even 10% you can provide useful clues to people who are not able to use one of the more translated languages.<br />
* Languages that are more than 80% translated are already well served by moderately active translators and need little help.<br />
* If you're a native speaker, a quick review of the main translators work is always useful.<br />
----<br />
[[Transifex CLI and xgettext mini how-to]]<br />
<br />
== Editing with VIM ==<br />
<br />
You will need to make sure that you are using UTF-8 encoding, such as by adding this line to your ~/.vimrc file: <br />
<br />
<pre>set enc=UTF-8<br />
</pre><br />
<br />
Under Win32 you can use [ftp://ftp.vim.org/pub/vim/pc/gvim70.exe Gvim] for windows 7 which has more windows-like keybindings. You'll need to set it to use UTF-8, IIRC. Use Edit|Settings Window to do this. Search for the line containing "set enc=" <br />
<br />
Alternatively, in Linux, OS X, Windows or anything else, inside GVim you should be able to type {{{:set enc=UTF-8}}} to switch to UTF-8. <br />
<br />
== Editing with LibreOffice ==<br />
<br />
If you use LibreOffice Writer, you can save the file as "Text Encoded", make sure the "Edit Filter Settings" option is checked and that the file is saved as "UTF-8" with "LF line endings".<br />
<br />
== Editing with EMacs ==<br />
<br />
If you use Emacs, you can use C-x RET f and specify utf-8 as coding system for saving file.<br />
<br />
== Other ways of editing this file ==<br />
<br />
If you can tell us how to edit these files in other ways, we would love to know about that too!</div>
Frizou
https://wiki.davical.org/index.php?title=Transifex_CLI_and_xgettext_mini_how-to&diff=3639
Transifex CLI and xgettext mini how-to
2016-01-10T12:37:17Z
<p>Frizou: </p>
<hr />
<div>'''DEPRECATED'''<br />
<br />
A merge between this page and pre-existing documentation under git repository is in progress.<br />
https://github.com/DAViCal/davical/tree/master/docs/translation.rst<br />
<br />
<br />
<br />
'''DAViCal: working with Transifex'''<br />
<br />
Transifex provides a CLI tool to synchronize translations from the web. It's called tx.<br />
<br />
=== Installation ===<br />
<br />
Some Linux distros provide a transifex-client package, but it's usually an outdated<br />
version. For instance, Ubuntu 12.04 repos offer transifex-client v0.6, but the<br />
latest release of transifex client is 0.10.<br />
<br />
Installing the latest version of transifex client can be done with pip:<br />
<br />
# pip install transifex-client<br />
<br />
If you want to upgrade, just run:<br />
<br />
# pip install --upgrade transifex-client<br />
<br />
=== Client configuration ===<br />
<br />
Set up your Transifex account details at ~/.transifexrc :<br />
<br />
<nowiki>[https://www.transifex.com]</nowiki><br />
hostname = https://www.transifex.com<br />
password = <your_clear_password><br />
token =<br />
username = <your_username><br />
<br />
Make sure you give it 0600 permissions.<br />
<br />
=== Project configuration ===<br />
<br />
Transifex client will know how to synchronize DAViCal translations by reading<br />
the .tx/config file inside the project root directory.<br />
<br />
These are the contents of the file:<br />
<br />
[main]<br />
host = https://www.transifex.com<br />
<br />
[davical.messagespot]<br />
file_filter = po/<lang>.po<br />
source_file = po/messages.pot<br />
source_lang = en<br />
type = PO<br />
<br />
=== Pulling translations from the web ===<br />
<br />
tx supports downloading latest translations from Transifex for every registered<br />
language:<br />
<br />
$ tx pull -a<br />
New translations found for the following languages: ca, ko_KR, id_ID, cs_CZ, ar, sk_SK, fi<br />
Pulling translations for resource davical.messagespot (source: po/messages.pot)<br />
-> fr: po/fr.po<br />
-> pt_BR: po/pt_BR.po<br />
-> pt_PT: po/pt_PT.po<br />
-> de: po/de.po<br />
-> it: po/it.po<br />
-> hu: po/hu.po<br />
-> et: po/et.po<br />
-> es_MX: po/es_MX.po<br />
-> ja: po/ja.po<br />
-> ru: po/ru.po<br />
-> nl: po/nl.po<br />
-> es_VE: po/es_VE.po<br />
-> sv: po/sv.po<br />
-> es_AR: po/es_AR.po<br />
-> es_ES: po/es_ES.po<br />
-> nb_NO: po/nb_NO.po<br />
-> pl: po/pl.po<br />
Pulling new translations for resource davical.messagespot (source: po/messages.pot)<br />
-> ca: po/ca.po<br />
-> ko_KR: po/ko_KR.po<br />
-> id_ID: po/id_ID.po<br />
-> cs_CZ: po/cs_CZ.po<br />
-> ar: po/ar.po<br />
-> sk_SK: po/sk_SK.po<br />
-> fi: po/fi.po<br />
Done.<br />
<br />
=== Extracting English strings (messages.pot) ===<br />
<br />
As DAViCal uses gettext translation files, the tool to extract base strings (in English) from<br />
its source code is gettext.<br />
<br />
DAViCal uses a custom function called `translate()` instead of the default `_()`, so our xgettext<br />
call needs some additional parameters:<br />
<br />
$ xgettext -o po/messages.pot -L php -j --keyword=translate $(find htdocs inc scripts -name '*.php')<br />
<br />
This generates a new po/messages.pot, merging (-j) with existing strings.<br />
<br />
<br />
=== Uploading English strings to Transifex ===<br />
<br />
To upload a new messages.pot to Transifex the tx client can be used as follows:<br />
<br />
$ tx push -s<br />
<br />
The '-s' switch tells tx to upload the source files.</div>
Frizou
https://wiki.davical.org/index.php?title=Fr:Community_Support&diff=3612
Fr:Community Support
2015-12-10T20:18:01Z
<p>Frizou: Lien hebergement Gobby mis à jour</p>
<hr />
<div>== Communauté ==<br />
<br />
Début février 2014, les membres de la communauté DAViCal ont commencé à s'organiser (avec le soutien de Andrew McMillan, le développeur initial de DAViCal) sous forme de communauté de développement du fait du temps limité que Andrew pouvait consacrer au projet. Les réunions se tiennent en anglais sur le canal IRC #davical de irc.oftc.net (canal IRC habituel de DAViCal).<br />
<br />
Le compte-rendu de réunion est réalisé en parallèle avec l'éditeur collaboratif Gobby :<br />
<br />
Serveur : assemblies.actiu.info:23101<br />
<br />Mot de passe: davical<br />
<br />Logiciel client: https://gobby.github.io/<br />
<br />
Les utilisateurs Debian et Ubuntu installent le paquet gobby-infinote depuis les dépôts officiels. Le paquet Gobby des dépôts Android n'a rien à voir avec le logiciel collaboratif dont nous parlons.<br />
<br />
'''Prochaine réunion:''' [[Community_Support|Voir la page en anglais, seule mise à jour]]<br />
<br />
== Comptes-rendus des réunions précédentes (en anglais) ==<br />
<br />
[[Community_Support|Voir la page en anglais, seule mise à jour]]</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3595
Raspberry Pi2 Raspbian
2015-11-11T20:48:21Z
<p>Frizou: /* SW installation guide (under construction) */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_latest<br />
unzip 2015-09-24-raspbian-jessie.zip<br />
md5sum 2015-09-24-raspbian-jessie.img<br />
# a24eed8b6338940013cdcd5a74a3935d 2015-09-24-raspbian-jessie.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2015-09-24-raspbian-jessie.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide (under construction) =<br />
(adapted from [Debian_shared])<br />
<br />
(3201140 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE='en_GB'<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales<br />
sudo apt-get install davical davical-doc<br />
<br />
(3277004 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql-${MediumPgVersion} reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS ${DatabaseName};" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS ${DBUsername_dba};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_dba}.pgdump"<br />
echo "DROP USER IF EXISTS ${DBUsername_app};" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file ${DBUsername_app}.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file ${DatabaseName}.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql-${MediumPgVersion} reload<br />
<br />
Create or restore configuration file as /etc/davical/caldav.example.net-conf.php (for a virtualhost ''caldav.example.net'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8';<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/caldav.example.net-conf.php<br />
<br />
Create or restore Apache virtualhost with its profile content as in this example:<br />
<VirtualHost *:80 *:8008 *:8800><br />
ServerName caldav.example.net<br />
DocumentRoot /usr/share/davical/htdocs<br />
DirectoryIndex index.php index.html<br />
Alias /images/ /usr/share/davical/htdocs/images/<br />
<Directory /usr/share/davical/htdocs/><br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
php_value include_path /usr/share/awl/inc<br />
php_value magic_quotes_gpc 0<br />
php_value magic_quotes_runtime 0<br />
php_value register_globals 0<br />
php_value error_reporting "E_ALL & ~E_NOTICE"<br />
php_value default_charset "utf-8"<br />
</VirtualHost><br />
(Apache may need to be configured in ports.conf to listen also ports 8008 and 8800)<br />
<br />
Enable Apache website:<br />
sudo a2ensite caldav.example.net<br />
<br />
==== Login to DAViCAL Admin ====<br />
<br />
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.</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3594
Raspberry Pi2 Raspbian
2015-11-10T20:39:18Z
<p>Frizou: /* SW installation guide */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_latest<br />
unzip 2015-09-24-raspbian-jessie.zip<br />
md5sum 2015-09-24-raspbian-jessie.img<br />
# a24eed8b6338940013cdcd5a74a3935d 2015-09-24-raspbian-jessie.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2015-09-24-raspbian-jessie.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide (under construction) =<br />
(adapted from [Debian_shared])<br />
<br />
(3201140 kb used on /)<br />
<br />
Install current DAViCal version with Jessie dependencies:<br />
sudo apt-get update<br />
sudo apt-get install locales<br />
export LANGUAGE='en_GB'<br />
export LC_ALL="en_GB.UTF-8"<br />
sudo dpkg-reconfigure locales<br />
sudo apt-get install davical davical-doc<br />
<br />
(3277004 kb used on /)<br />
<br />
To be continued...<br />
<br />
<br />
Prepare the DAViCal database values (please, for security reasons, choose your own values):<br />
DatabaseName=mycaldb<br />
DBUsername_dba=mycaluser_dba<br />
DBUsername_app=mycaluser_app<br />
DBPassword=12345<br />
AdminPassword=1234<br />
<br />
Add open permissions temporarily for the installation scripts:<br />
MediumPgVersion="$(psql --version | grep -ie "sql" | tr -s " " "\n" | tail --lines=1 | cut -f 1,2 -d ".")"<br />
PgConfig="/etc/postgresql/${MediumPgVersion}/main/pg_hba.conf"<br />
sudo mv "$PgConfig" "${PgConfig}.davical-bak"<br />
sudo cp -a "${PgConfig}.davical-bak" "$PgConfig"<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba trust" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app trust" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql-${MediumPgVersion} reload<br />
<br />
Apply a temporary patch to creation script:<br />
CScript="/usr/share/davical/dba/create-database.sh"<br />
sudo mv "$CScript" "${CScript}.davical-bak"<br />
sudo cp -a "${CScript}.davical-bak" "$CScript"<br />
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"<br />
<br />
Apply a temporary patch to update script:<br />
UScript="/usr/share/davical/dba/update-davical-database"<br />
sudo mv "$UScript" "${UScript}.davical-bak"<br />
sudo cp -a "${UScript}.davical-bak" "$UScript"<br />
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"<br />
<br />
'''(only fresh install)''' Run main installation script and take note of the shown password for the 'admin' user:<br />
sudo su -l postgres -c "$CScript" "$DatabaseName" "$AdminPassword"<br />
<br />
'''(only restoration of a backup)''' Restore data and run update script:<br />
echo "DROP DATABASE IF EXISTS mycaldb;" | sudo su -l postgres -c psql<br />
echo "DROP USER IF EXISTS mycaluser_dba;" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file mycaluser_dba.pgdump"<br />
echo "DROP USER IF EXISTS mycaluser_app;" | sudo su -l postgres -c psql<br />
sudo su -l postgres -c "psql --quiet --file mycaluser_app.pgdump"<br />
sudo su -l postgres -c "psql --quiet --file mycaldb.pgdump"<br />
sudo su -l postgres -c "$UScript"<br />
<br />
Restore installation scripts to original:<br />
sudo mv "${UScript}.davical-bak" "$UScript"<br />
sudo mv "${CScript}.davical-bak" "$CScript"<br />
<br />
'''(only fresh install)''' Set password authentication for the database:<br />
echo "ALTER USER $DBUsername_dba WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
echo "ALTER USER $DBUsername_app WITH PASSWORD '${DBPassword}';" | sudo su -l postgres -c psql<br />
<br />
Allow these authenticated access to PostgreSql:<br />
echo "# Permissions for the DAViCal CMS" | sudo tee "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_dba password" | sudo tee --append "$PgConfig"<br />
echo "local $DatabaseName $DBUsername_app password" | sudo tee --append "$PgConfig"<br />
echo "" | sudo tee --append "$PgConfig"<br />
sudo cat "${PgConfig}.davical-bak" | sudo tee --append "$PgConfig"<br />
# Service name can be only "postgresql" or more:<br />
sudo service postgresql-${MediumPgVersion} reload<br />
<br />
Create or restore configuration file as /etc/davical/caldav.example.net-conf.php (for a virtualhost ''caldav.example.net'') with its content as in the following example:<br />
<?php<br />
$c->admin_email = 'admin@example.net';<br />
$c->system_name = "My CalDAV Server";<br />
$c->enable_row_linking = true;<br />
$c->default_locale = 'en_US.UTF-8';<br />
<br />
$c->pg_connect[] = 'dbname=mycaldb port=5432 user=mycaluser_app password=12345';<br />
Avoid permissions issues:<br />
sudo chmod a+r /etc/davical/caldav.example.net-conf.php<br />
<br />
Create or restore Apache virtualhost with its profile content as in this example:<br />
<VirtualHost *:80 *:8008 *:8800><br />
ServerName caldav.example.net<br />
DocumentRoot /usr/share/davical/htdocs<br />
DirectoryIndex index.php index.html<br />
Alias /images/ /usr/share/davical/htdocs/images/<br />
<Directory /usr/share/davical/htdocs/><br />
AllowOverride None<br />
Order allow,deny<br />
Allow from all<br />
</Directory><br />
php_value include_path /usr/share/awl/inc<br />
php_value magic_quotes_gpc 0<br />
php_value magic_quotes_runtime 0<br />
php_value register_globals 0<br />
php_value error_reporting "E_ALL & ~E_NOTICE"<br />
php_value default_charset "utf-8"<br />
</VirtualHost><br />
(Apache may need to be configured in ports.conf to listen also ports 8008 and 8800)<br />
<br />
Enable Apache website:<br />
sudo a2ensite caldav.example.net<br />
<br />
==== Login to DAViCAL Admin ====<br />
<br />
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.</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3593
Raspberry Pi2 Raspbian
2015-11-08T13:18:50Z
<p>Frizou: /* Connecting Raspberry Pi to LAN and boot */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_latest<br />
unzip 2015-09-24-raspbian-jessie.zip<br />
md5sum 2015-09-24-raspbian-jessie.img<br />
# a24eed8b6338940013cdcd5a74a3935d 2015-09-24-raspbian-jessie.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2015-09-24-raspbian-jessie.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
= SW installation guide =<br />
To be continued...</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3592
Raspberry Pi2 Raspbian
2015-11-08T13:18:28Z
<p>Frizou: /* Connecting Raspberry Pi to LAN and boot */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_latest<br />
unzip 2015-09-24-raspbian-jessie.zip<br />
md5sum 2015-09-24-raspbian-jessie.img<br />
# a24eed8b6338940013cdcd5a74a3935d 2015-09-24-raspbian-jessie.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2015-09-24-raspbian-jessie.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
* get your linux computer IP address<br />
ifconfig<br />
# inet addr: 192.168.x.y<br />
* try addresses 192.168.x.2 to 192.168.x.254 around y<br />
* connect to your Raspberry Pi<br />
ssh -Y pi@192.168.x.z<br />
# password: raspberry<br />
<br />
If you fail guessing your Raspberry IP address:<br />
* connect USB mouse and Keyboard + HDMI display<br />
* launch a terminal<br />
<br />
Then, you should write down a paper your Raspberry Mac address:<br />
ifconfig<br />
# HWaddr aa:bb:cc:dd:ee:ff<br />
<br />
And configure your box router to assign a static local IP address to your Raspberry. Static DHCP reservation assigns a local IP address to a Mac HWaddr.<br />
Some boxes need a reboot to make static DHCP reservations active.<br />
<br />
To be continued...<br />
<br />
= SW installation guide =<br />
To be continued...</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3591
Raspberry Pi2 Raspbian
2015-11-08T12:46:44Z
<p>Frizou: /* Preparing Raspberry Pi micro-SD card from a linux computer */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_latest<br />
unzip 2015-09-24-raspbian-jessie.zip<br />
md5sum 2015-09-24-raspbian-jessie.img<br />
# a24eed8b6338940013cdcd5a74a3935d 2015-09-24-raspbian-jessie.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2015-09-24-raspbian-jessie.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd and gparted commands with sudo<br />
* expand your raspberry / partition to full micro-SD card<br />
gparted<br />
# select micro-SD drive<br />
# right click on / partition and expand it to full size<br />
# click on apply<br />
# remove micro-SD card from linux computer<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
<br />
<br />
To be continued...<br />
<br />
<br />
= SW installation guide =<br />
To be continued...</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3590
Raspberry Pi2 Raspbian
2015-11-08T12:37:52Z
<p>Frizou: /* Preparing Raspberry Pi micro-SD card from a linux computer */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_latest<br />
unzip 2015-09-24-raspbian-jessie.zip<br />
md5sum 2015-09-24-raspbian-jessie.img<br />
# a24eed8b6338940013cdcd5a74a3935d 2015-09-24-raspbian-jessie.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd?<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd?<br />
dd bs=2M if=2015-09-24-raspbian-jessie.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd command with sudo<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
<br />
<br />
To be continued...<br />
<br />
<br />
= SW installation guide =<br />
To be continued...</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3589
Raspberry Pi2 Raspbian
2015-11-08T12:36:59Z
<p>Frizou: /* What you don't need but can be useful for 5 minutes */</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_latest<br />
unzip 2015-09-24-raspbian-jessie.zip<br />
md5sum 2015-09-24-raspbian-jessie.img<br />
# a24eed8b6338940013cdcd5a74a3935d 2015-09-24-raspbian-jessie.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd[a-z]<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd[a-z]<br />
dd bs=2M if=2015-09-24-raspbian-jessie.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd command with sudo<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
<br />
<br />
To be continued...<br />
<br />
<br />
= SW installation guide =<br />
To be continued...</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3588
Raspberry Pi2 Raspbian
2015-11-07T20:06:49Z
<p>Frizou: Under construction</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains how to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
It assume an other linux computer is available on the LAN with an Internet connexion.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
<br />
= HW and network installation guide =<br />
== Before starting, what you need ==<br />
* a Raspberry with RJ45 LAN connector (Pi 2 model B for example)<br />
* a Raspberry Pi Case (optional, but advised)<br />
* a 8 Go micro-SD card<br />
* a Raspberry Pi universal power supply (or equivalent)<br />
* an internet box with a free RJ45 connexion<br />
* an Ethernet cable (RJ45)<br />
* an other computer with an internet connexion and a micro-SD card adapter<br />
See distributors on Raspberry shop page: https://www.raspberrypi.org/products/<br />
<br />
== What you don't need but can be useful for 5 minutes ==<br />
* an USB keyboard<br />
* an USB mouse<br />
* an HDMI display<br />
<br />
== Preparing Raspberry Pi micro-SD card from a linux computer ==<br />
* download Raspbian image from https://www.raspberrypi.org/downloads/raspbian/<br />
wget https://downloads.raspberrypi.org/raspbian_latest<br />
unzip 2015-09-24-raspbian-jessie.zip<br />
md5sum 2015-09-24-raspbian-jessie.img<br />
# a24eed8b6338940013cdcd5a74a3935d 2015-09-24-raspbian-jessie.img<br />
* flash your micro-SD card (carefully identify micro-SD card device letter and replace sdX with correct drive!)<br />
# before micro-SD card connexion, have a look to your computer drives (to preserve)<br />
ls -l /dev/sd[a-z]<br />
# after micro-SD card connexion, have a look to the new micro-SD card drive (to write to)<br />
ls -l /dev/sd[a-z]<br />
dd bs=2M if=2015-09-24-raspbian-jessie.img of=/dev/sdX<br />
sync<br />
# if root required, you probably need to prefix dd command with sudo<br />
<br />
== Connecting Raspberry Pi to LAN and boot ==<br />
Okay, you need a RJ45 cable between Raspberry and your box, insert micro-SD card into your Raspberry and plug on power supply. You can check:<br />
* near micro-SD card, red light ON<br />
* green light blinking few seconds and then OFF<br />
* near RJ45 connector yellow and red lights ON<br />
If red and green lights are ON near micro-SD card, you may have a problem with your SD-card (missing, wrongly inserted, badly flashed, ...).<br />
<br />
Now, you just have to guess your Raspberry Pi IP address!<br />
What you can try:<br />
* have a look to your box administration page<br />
<br />
<br />
To be continued...<br />
<br />
<br />
= SW installation guide =<br />
To be continued...</div>
Frizou
https://wiki.davical.org/index.php?title=Raspberry_Pi2_Raspbian&diff=3587
Raspberry Pi2 Raspbian
2015-11-07T17:02:51Z
<p>Frizou: New - underconstruction</p>
<hr />
<div>'''UNDER CONSTRUCTION'''<br />
<br />
This guide is intended to people who want a lightweight calendar server at home, behind an internet box, up 24h/24h, with very low consumption, and chose a cheap Raspberry Pi. This guide has been written according to Raspberry Pi 2 model B but shall be working also with others versions.<br />
This guide explains who to install DaviCal calendar server and optionally InfCloud CalDAV/CardDAV web clients.<br />
<br />
'''Hardware tested:'''<br />
* 2015-11-07: Raspberry Pi 2 model B<br />
<br />
'''System tested:'''<br />
* 2015-11-07: Raspbian jessie released on 2015-09-24<br />
<br />
'''Software versions tested:'''<br />
* 2015-11-07: TBD ''DAViCal xxx, PostgreSql xxx, InfCloud xxx''<br />
<br />
== Install guide ==<br />
To be continued...</div>
Frizou
https://wiki.davical.org/index.php?title=Installation_Stuff&diff=3586
Installation Stuff
2015-11-07T16:35:07Z
<p>Frizou: /* Other Platforms */</p>
<hr />
<div>{{TOCright}}<br />
This section is a collection point for installation related details. However, it is '''NOT''' where the general installation instructions are kept - those you'll always find on the [http://davical.org/installation.php DAViCal project website].<br />
<br />
== Installation Overview ==<br />
<br />
* [[Installation Guide Update]] <br />
* [[Installation Experiences]]<br />
* [[DAViCal Dependencies]]<br />
* [[Basic Davical Setup Script]]<br />
* [[Setup Failure Codes]]<br />
<br />
== Configuring Supporting Software ==<br />
<br />
* [[Apache Config]] <br />
* [[PHP Config]] <br />
* [[PostgreSQL Config]]<br />
* [[Nginx Config]] (unsupported)<br />
* [[Using Lighttpd rather than Apache]]<br />
<br />
== Miscellaneous ==<br />
<br />
* [[SRV Records]] - Configuring DNS to provide SRV records.<br />
* [[Well-known URLs]] - Configuring DAViCal & Apache to provide appropriate responses to requests for 'well-known' URLs as defined in {{Well-known URLs RFC}}<br />
<br />
== Distribution Specifics ==<br />
<br />
Also, notes regarding installation on different Linux or Unix distributions: <br />
* [[Debian|Generic Debian in a dedicated server]] (and Mepis, Sidux ...)<br />
* [[Debian shared|Debian/Ubuntu in a shared server]] (and derivatives)<br />
* [[RPM]] (Red Hat, Fedora, SuSE and other RPM based distributions <br />
* [[Gentoo]] <br />
* [[OpenBSD]] <br />
* [[FreeBSD]]<br />
* [[NetBSD]]<br />
* [[DragonflyBSD]]<br />
* [[Windows With Apache]]<br />
* [[Ubuntu]]<br />
* [[Installations/Centos|Centos]]<br />
* [[Solaris]]<br />
<br />
== Other Platforms ==<br />
<br />
* [[Raspberry_Pi2_Raspbian]]<br />
* [http://wiki.makeitfit.ch/DAViCal_(Qnap_Linux) Installation on standard QNAP Firmware (ARM)]<br />
* [[Synology_DS211]]<br />
<br />
<br />
----<br />
If you are interested in contributing, you might want to look at [[Developer Setup]], or perhaps [[Translating DAViCal]] if you are interested in translating it.</div>
Frizou
https://wiki.davical.org/index.php?title=Developer_Setup&diff=3352
Developer Setup
2014-10-11T23:23:18Z
<p>Frizou: Updating links to new gitlab repo</p>
<hr />
<div>{{Languages|Developer Setup}}<br />
{{TOCright}}<br />
The setup for a developer of DAViCal can, of course, just be a normal setup. If you are interested in contributing code, however, there are some tricks to make it easier for you to do so. <br />
<br />
== Communication ==<br />
<br />
If you want to hack on something to do with DAViCal it's important to communicate with the other developers so we know what you're doing, and can suggest ways of approaching the problem that won't be impacted by other ongoing development. Or we can change our plans to make sure we don't step on your toes, and so on. Communication is very important.<br />
<br />
The best communication channels for developers are:<br />
<br />
* The IRC channel #davical on [http://www.oftc.net irc.oftc.net]<br />
* The developers mailing list http://lists.morphoss.com/listinfo/davical-dev<br />
<br />
This isn't a busy list, and the natives are friendly.<br />
<br />
== Revision Control ==<br />
<br />
We use the [https://gitlab.com/ "Git"] revision control system primarily, although you can also check the code out of the Subversion or CVS repositories on Sourceforge where all the commits should eventually be mirrored. <br />
<br />
To create a checkout of DAViCal, assuming you have Git installed, you can: <br />
<br />
git clone https://gitlab.com/davical-project/davical.git<br />
<br />
=== Updating Your Local Branch ===<br />
<br />
To update your local branch, merging remote changes into your local changes, you just need to: <br />
<br />
cd davical<br />
git pull<br />
<br />
=== Create a new local branch for your own work ===<br />
<br />
git branch myhacks<br />
<br />
You may wish to switch to your newly created branch<br />
<br />
git checkout myhacks<br />
<br />
Occasionally you might want to fetch from the remote head branch and rebase your changes against it:<br />
<br />
git fetch<br />
git rebase master<br />
<br />
=== Sending A Patch ===<br />
<br />
If you have a particular patch which you wish to send me, you can use the git-format-patch command to produce e-mail directly to me, such as: <br />
<br />
git format-patch --stdout myhacks@{1} | mail proposed-patches-AT-davical.org<br />
<br />
<br />
That will send the most recent commit on the branch 'myhacks' (i.e. myhacks@{1} refers to the most recent commit - see git-rev-parse man page for exhaustive details of Git references).<br />
<br />
<br />
Anohter way to sent patches is via git pull requests.<br />
<br />
<br />
=== Browsing the Git Repository ===<br />
<br />
The gitlab.com Git repository is also available using gitweb, so you can access the DAViCal project via a web interface at: <br />
* https://gitlab.com/davical-project/davical.git - The DAViCal code base <br />
* https://gitlab.com/davical-project/awl.git - The code for Andrew's Web Libraries (AWL) <br />
<br />
=== Make-ing changes ===<br />
<br />
aptitude install build-essential gettext<br />
cd ../davical_working_copy<br />
make all<br />
<br />
== Apache Setup ==<br />
<br />
=== Running from the Development Code ===<br />
There are several ways to run from the development code, but the easiest is probably to use a VirtualHost setup on your development machine, with a hosts file entry on the system with your web browser and/or CalDAV client.<br />
<br />
To do this you need to set the following in your Apache configuration:<br />
<br />
DocumentRoot /path/to/davical/htdocs<br />
ServerName hostname<br />
ServerAlias hostname.domain.foo<br />
DirectoryIndex index.php index.html<br />
php_value include_path /path/to/awl/inc<br />
php_value magic_quotes_gpc 0<br />
php_value register_globals 0<br />
<br />
=== Regression Testing Virtual Hosts ===<br />
The regression testing for DAViCal expects that there will be a virtual host which responds to URLs like ''<nowiki>http://mycaldav/</nowiki>'' and some regression tests also look for "''<nowiki>http://myempty/davical/...</nowiki>'' for regression testing operation in a subdirectory. Those names are likely to change to more sensible ones like ''<nowiki>http://davical-regression/</nowiki>'' and ''<nowiki>http://davical-regression-sub/</nowiki>'' which will be set up in the same way. <br />
<br />
One way to configure this is to add entries to your /etc/hosts file: <br />
<br />
127.0.0.1 localhost mycaldav myempty<br />
<br />
Then you need to define your virtual hosts using those entries. They could look something like: <br />
<br />
<VirtualHost 127.0.0.1 ><br />
DocumentRoot /home/user/projects/davical/htdocs<br />
ServerName mycaldav<br />
ServerAlias mycaldav.localhost<br />
<br />
DirectoryIndex index.php index.html<br />
php_value include_path /home/user/projects/awl/inc<br />
php_value magic_quotes_gpc 0<br />
php_value register_globals 0<br />
<br />
# This is useful for browsing the docs locally<br />
AliasMatch ^/docs(.*)$ /home/user/projects/davical/docs/website$1<br />
<br />
# This style of rewriting is tested in the regression tests.<br />
# Enable these two lines when debugging rewriting. <br />
# RewriteLog /tmp/rewrite.log<br />
# RewriteLogLevel 4<br />
RewriteEngine On<br />
<br />
# Not if it's the root URL<br />
RewriteCond %{REQUEST_URI} !^/$<br />
<br />
# Not if it explicitly specifies a .php program, stylesheet or image<br />
RewriteCond %{REQUEST_URI} !\.(php|css|png|gif|js|jpg)<br />
<br />
# Not if it is the docs alias above.<br />
RewriteCond %{REQUEST_URI} !^/docs<br />
RewriteRule ^(.*)$ /caldav.php$1 [NC,L]<br />
</VirtualHost><br />
<br />
<VirtualHost 127.0.0.1 ><br />
DocumentRoot /home/user/projects/empty<br />
ServerName myempty<br />
ServerAlias myempty.localhost<br />
<br />
DirectoryIndex index.php index.html<br />
<br />
php_value include_path /home/user/projects/awl/inc<br />
php_value magic_quotes_gpc 0<br />
php_value register_globals 0 <br />
</VirtualHost><br />
<br />
Note that you have to either copy or better link your htdocs folder to the empty folder for the myempty regression tests to pass. An ls on /home/user/projects/empty (or the folder of your choice) should contain an folder or symlink called davical, which should contain/point to the davical htdocs folder.<br />
<br />
You have to create DAViCAL configuration files for all of your testing / production vhosts running on the machine. For testing you need at least mycaldav-conf.php and myempty-conf.php.<br />
<br />
You should explicitely not set 'php_value default_charset "utf-8"' in your virtual hosts, as it might break DAViCAL functionality for Evolution. Same applies for 'AddDefaultCharset UTF-8' statements somewhere in your apache.conf or conf.d/charset configuration files.<br />
<br />
== DAViCal Configuration ==<br />
<br />
You will, of course, need some configuration of DAViCal. For development this is best placed in the file config/config.php so that you can edit it easily as a non-root user. The configuration file is pretty standard, but you should be aware of the error logging availability through setting "$c->dbg['something']" variables. <br />
<br />
For example: <br />
<br />
/** Every Damn Thing **/<br />
// $c->dbg['ALL'] = 1;<br />
<br />
/** Base Server Programs **/<br />
// $c->dbg['caldav'] = 1;<br />
// $c->dbg['ics'] = 1;<br />
// $c->dbg['freebusy'] = 1;<br />
<br />
/** HTTP Request Methods **/<br />
// $c->dbg['options'] = 1;<br />
// $c->dbg['report'] = 1;<br />
// $c->dbg['get'] = 1;<br />
// $c->dbg['put'] = 1;<br />
// $c->dbg['propfind'] = 1;<br />
<br />
/** AWL Objects **/<br />
// $c->dbg['icalendar'] = 1;<br />
// $c->dbg['user'] = 1;<br />
// $c->dbg['i18n'] = 1;<br />
// $c->dbg['querystring'] = 1;<br />
<br />
// use this setting for regression testing only, this influences the order<br />
// of results for some report queries, having strict result ordering off<br />
// might cause your regression test suite to display false results<br />
$c->strict_result_ordering = true;<br />
<br />
== Other Stuff ==<br />
<br />
===Running the Regression Tests===<br />
<br />
The regression tests are configured in {{{testing/regression.conf}}} and there is a base example configuration to guide you. Some of the regression tests confirm that elements of the system still work when DAViCal is operating in a subdirectory, rather than from the root of the virtual host, so you need an additional virtual host set up for these to work. <br />
<br />
Your user will need to have the ability to create/drop databases in order to run the regression tests, since the tests start by dropping the database, creating it from scratch, populating it with some sample data and then testing various caldav operations on it. <br />
<br />
===Building the API Docs===<br />
<br />
DAViCal (and AWL) objects are documented in-line using PHPDoc. Essentially you need to download the phpdoc application from PEAR and arrange for the phpdoc command to be somewhere in your path. The top-level Makefile in DAViCal should be able to work from that, but if you have problems get on irc.oftc.net #davical and ask for some help from an existing developer. <br />
<br />
===Tracking AWL as well===<br />
<br />
If you are tracking DAViCal source code it may be a good idea to track The AWL libraries at the same time. Although these libraries are used in other projects besides DAViCal there are often changes within the libraries which new versions of DAViCal will also depend on. Most released versions of DAViCal have depended on a version of AWL released at the same time, though there have been a few occasions of AWL releases without DAViCal releases, or vice-versa.<br />
<br />
These are also in a Git repository and can be checked out with: <br />
<br />
<pre>git clone https://gitlab.com/davical-project/awl.git<br />
</pre><br />
<br />
You will also need to change the php_include_path in your Apache Virtual Host definition (see above) to point at the checked out libraries, rather than pointing at the default location.</div>
Frizou
https://wiki.davical.org/index.php?title=Developer_Setup&diff=3351
Developer Setup
2014-10-11T23:21:07Z
<p>Frizou: Updating links to new gitlab repo</p>
<hr />
<div>{{Languages|Developer Setup}}<br />
{{TOCright}}<br />
The setup for a developer of DAViCal can, of course, just be a normal setup. If you are interested in contributing code, however, there are some tricks to make it easier for you to do so. <br />
<br />
== Communication ==<br />
<br />
If you want to hack on something to do with DAViCal it's important to communicate with the other developers so we know what you're doing, and can suggest ways of approaching the problem that won't be impacted by other ongoing development. Or we can change our plans to make sure we don't step on your toes, and so on. Communication is very important.<br />
<br />
The best communication channels for developers are:<br />
<br />
* The IRC channel #davical on [http://www.oftc.net irc.oftc.net]<br />
* The developers mailing list http://lists.morphoss.com/listinfo/davical-dev<br />
<br />
This isn't a busy list, and the natives are friendly.<br />
<br />
== Revision Control ==<br />
<br />
We use the [https://gitlab.com/ "Git"] revision control system primarily, although you can also check the code out of the Subversion or CVS repositories on Sourceforge where all the commits should eventually be mirrored. <br />
<br />
To create a checkout of DAViCal, assuming you have Git installed, you can: <br />
<br />
git clone https://gitlab.com/davical-project/davical.git<br />
<br />
=== Updating Your Local Branch ===<br />
<br />
To update your local branch, merging remote changes into your local changes, you just need to: <br />
<br />
cd davical<br />
git pull<br />
<br />
=== Create a new local branch for your own work ===<br />
<br />
git branch myhacks<br />
<br />
You may wish to switch to your newly created branch<br />
<br />
git checkout myhacks<br />
<br />
Occasionally you might want to fetch from the remote head branch and rebase your changes against it:<br />
<br />
git fetch<br />
git rebase master<br />
<br />
=== Sending A Patch ===<br />
<br />
If you have a particular patch which you wish to send me, you can use the git-format-patch command to produce e-mail directly to me, such as: <br />
<br />
git format-patch --stdout myhacks@{1} | mail proposed-patches-AT-davical.org<br />
<br />
<br />
That will send the most recent commit on the branch 'myhacks' (i.e. myhacks@{1} refers to the most recent commit - see git-rev-parse man page for exhaustive details of Git references).<br />
<br />
<br />
Anohter way to sent patches is via git pull requests.<br />
<br />
<br />
=== Browsing the Git Repository ===<br />
<br />
The gitlab.com Git repository is also available using gitweb, so you can access the DAViCal project via a web interface at: <br />
* https://gitlab.com/davical-project/davical.git - The DAViCal code base <br />
* https://gitlab.com/davical-project/awl.git - The code for Andrew's Web Libraries (AWL) <br />
<br />
=== Make-ing changes ===<br />
<br />
aptitude install build-essential gettext<br />
cd ../davical_working_copy<br />
make all<br />
<br />
== Apache Setup ==<br />
<br />
=== Running from the Development Code ===<br />
There are several ways to run from the development code, but the easiest is probably to use a VirtualHost setup on your development machine, with a hosts file entry on the system with your web browser and/or CalDAV client.<br />
<br />
To do this you need to set the following in your Apache configuration:<br />
<br />
DocumentRoot /path/to/davical/htdocs<br />
ServerName hostname<br />
ServerAlias hostname.domain.foo<br />
DirectoryIndex index.php index.html<br />
php_value include_path /path/to/awl/inc<br />
php_value magic_quotes_gpc 0<br />
php_value register_globals 0<br />
<br />
=== Regression Testing Virtual Hosts ===<br />
The regression testing for DAViCal expects that there will be a virtual host which responds to URLs like ''<nowiki>http://mycaldav/</nowiki>'' and some regression tests also look for "''<nowiki>http://myempty/davical/...</nowiki>'' for regression testing operation in a subdirectory. Those names are likely to change to more sensible ones like ''<nowiki>http://davical-regression/</nowiki>'' and ''<nowiki>http://davical-regression-sub/</nowiki>'' which will be set up in the same way. <br />
<br />
One way to configure this is to add entries to your /etc/hosts file: <br />
<br />
127.0.0.1 localhost mycaldav myempty<br />
<br />
Then you need to define your virtual hosts using those entries. They could look something like: <br />
<br />
<VirtualHost 127.0.0.1 ><br />
DocumentRoot /home/user/projects/davical/htdocs<br />
ServerName mycaldav<br />
ServerAlias mycaldav.localhost<br />
<br />
DirectoryIndex index.php index.html<br />
php_value include_path /home/user/projects/awl/inc<br />
php_value magic_quotes_gpc 0<br />
php_value register_globals 0<br />
<br />
# This is useful for browsing the docs locally<br />
AliasMatch ^/docs(.*)$ /home/user/projects/davical/docs/website$1<br />
<br />
# This style of rewriting is tested in the regression tests.<br />
# Enable these two lines when debugging rewriting. <br />
# RewriteLog /tmp/rewrite.log<br />
# RewriteLogLevel 4<br />
RewriteEngine On<br />
<br />
# Not if it's the root URL<br />
RewriteCond %{REQUEST_URI} !^/$<br />
<br />
# Not if it explicitly specifies a .php program, stylesheet or image<br />
RewriteCond %{REQUEST_URI} !\.(php|css|png|gif|js|jpg)<br />
<br />
# Not if it is the docs alias above.<br />
RewriteCond %{REQUEST_URI} !^/docs<br />
RewriteRule ^(.*)$ /caldav.php$1 [NC,L]<br />
</VirtualHost><br />
<br />
<VirtualHost 127.0.0.1 ><br />
DocumentRoot /home/user/projects/empty<br />
ServerName myempty<br />
ServerAlias myempty.localhost<br />
<br />
DirectoryIndex index.php index.html<br />
<br />
php_value include_path /home/user/projects/awl/inc<br />
php_value magic_quotes_gpc 0<br />
php_value register_globals 0 <br />
</VirtualHost><br />
<br />
Note that you have to either copy or better link your htdocs folder to the empty folder for the myempty regression tests to pass. An ls on /home/user/projects/empty (or the folder of your choice) should contain an folder or symlink called davical, which should contain/point to the davical htdocs folder.<br />
<br />
You have to create DAViCAL configuration files for all of your testing / production vhosts running on the machine. For testing you need at least mycaldav-conf.php and myempty-conf.php.<br />
<br />
You should explicitely not set 'php_value default_charset "utf-8"' in your virtual hosts, as it might break DAViCAL functionality for Evolution. Same applies for 'AddDefaultCharset UTF-8' statements somewhere in your apache.conf or conf.d/charset configuration files.<br />
<br />
== DAViCal Configuration ==<br />
<br />
You will, of course, need some configuration of DAViCal. For development this is best placed in the file config/config.php so that you can edit it easily as a non-root user. The configuration file is pretty standard, but you should be aware of the error logging availability through setting "$c->dbg['something']" variables. <br />
<br />
For example: <br />
<br />
/** Every Damn Thing **/<br />
// $c->dbg['ALL'] = 1;<br />
<br />
/** Base Server Programs **/<br />
// $c->dbg['caldav'] = 1;<br />
// $c->dbg['ics'] = 1;<br />
// $c->dbg['freebusy'] = 1;<br />
<br />
/** HTTP Request Methods **/<br />
// $c->dbg['options'] = 1;<br />
// $c->dbg['report'] = 1;<br />
// $c->dbg['get'] = 1;<br />
// $c->dbg['put'] = 1;<br />
// $c->dbg['propfind'] = 1;<br />
<br />
/** AWL Objects **/<br />
// $c->dbg['icalendar'] = 1;<br />
// $c->dbg['user'] = 1;<br />
// $c->dbg['i18n'] = 1;<br />
// $c->dbg['querystring'] = 1;<br />
<br />
// use this setting for regression testing only, this influences the order<br />
// of results for some report queries, having strict result ordering off<br />
// might cause your regression test suite to display false results<br />
$c->strict_result_ordering = true;<br />
<br />
== Other Stuff ==<br />
<br />
===Running the Regression Tests===<br />
<br />
The regression tests are configured in {{{testing/regression.conf}}} and there is a base example configuration to guide you. Some of the regression tests confirm that elements of the system still work when DAViCal is operating in a subdirectory, rather than from the root of the virtual host, so you need an additional virtual host set up for these to work. <br />
<br />
Your user will need to have the ability to create/drop databases in order to run the regression tests, since the tests start by dropping the database, creating it from scratch, populating it with some sample data and then testing various caldav operations on it. <br />
<br />
===Building the API Docs===<br />
<br />
DAViCal (and AWL) objects are documented in-line using PHPDoc. Essentially you need to download the phpdoc application from PEAR and arrange for the phpdoc command to be somewhere in your path. The top-level Makefile in DAViCal should be able to work from that, but if you have problems get on irc.oftc.net #davical and ask for some help from an existing developer. <br />
<br />
===Tracking AWL as well===<br />
<br />
If you are tracking DAViCal source code it may be a good idea to track The AWL libraries at the same time. Although these libraries are used in other projects besides DAViCal there are often changes within the libraries which new versions of DAViCal will also depend on. Most released versions of DAViCal have depended on a version of AWL released at the same time, though there have been a few occasions of AWL releases without DAViCal releases, or vice-versa.<br />
<br />
These are also in a Git repository and can be checked out with: <br />
<br />
<pre>git clone git://repo.or.cz/awl.git/<br />
</pre><br />
<br />
You will also need to change the php_include_path in your Apache Virtual Host definition (see above) to point at the checked out libraries, rather than pointing at the default location.</div>
Frizou
https://wiki.davical.org/index.php?title=Community_Support/Minutes_11Jun2014&diff=3285
Community Support/Minutes 11Jun2014
2014-06-11T19:57:16Z
<p>Frizou: </p>
<hr />
<div> [[Community Support/Minutes 27May2014|Previous one]] | [[Community Support/Minutes 25Jun2014|Next one]]<br />
__NOTOC__<br />
<br />
'''DAViCal PROJECT MEETING, called for 2014-06-11, 17:00 UTC'''<br />
<br />
: People involved in the meeting: <br />
: Jim Fenton, Cyril, gorka, phoo1234567, narcisgarcia, Tuxick<br />
<br />
: Begin time: 1712 UTC<br />
<br />
<br />
=== 1. Project infrastructure ===<br />
<br />
==== 1.1. Website and documentation ====<br />
* Jim Fenton made some minor changes to fix broken links and the like; pushed to GitLab.<br />
* Jim still needs to check with Andrew about the donate links.<br />
* Jim thinks we're ready for DNS switchover, will ask Andrew to do that.<br />
<br />
<br />
==== 1.2. Source code ====<br />
<br />
===== 1.2.1 Git =====<br />
* Gorka will create branches to allow Jim and others to push fixes from github, one branch per pull request.<br />
* phoo1234567 will send on mailing list a link to a great git tutorial.<br />
* Cyril will push translation changes on master branch according to Transifex status.<br />
<br />
==== 1.3. Downloads and binary repositories ====<br />
<br />
===== 1.3.1 Debian/DEB Packages =====<br />
<br />
===== 1.3.2 RedHat/RPM Packages =====<br />
* phoo1234567 is continuing to study RPM packaging.<br />
<br />
===== 1.3.3 Tar Package =====<br />
<br />
<br />
==== 1.4. Localization ====<br />
* Cyril opened 2 issues relating to translation in GitLab. These need to be addressed before pushing English text to translators on Transifex. Tuxick will look into making the necessary code changes.<br />
<br />
=== 2. Development ===<br />
<br />
==== 2.1. Tickets or bug reports ====<br />
* Motty Cruz reports a problem with iOS creating new calendars. Uses LDAP which may be related. Gorka will follow up with him.<br />
* Andrew McCallum reports issues using the inf-it code. Jim will follow up because he is using that experimentally (and since mate isn't here).<br />
<br />
==== 2.2. Patches or updates ====<br />
* We aren't sure if some of the pull requests or other commits have been addressed by mate locally. Gorka will check with him before porting the pull requests from GitHub.<br />
<br />
==== 2.3. New features or versions ====<br />
<br />
<br />
=== 3. Project community ===<br />
<br />
==== 3.1 Mailing list and meetings ====<br />
* Jim reminded everyone of the DAViCal developer list. No traffic there yet. http://sourceforge.net/p/davical/mailman/?source=navbar<br />
* Jim needs to update http://wiki.davical.org/w/DAViCal_Mailing_Lists with info on the new lists.<br />
* Next meeting: 1700 UTC 25 June<br />
* Language selection is broken on the wiki. <br />
<br />
==== 3.2. Roles ====<br />
<br />
==== 3.3. Communication with Andrew McMillan ====<br />
<br />
<br />
=== 4. Off topics ===<br />
<br />
Meeting adjourned 19:08 UTC.</div>
Frizou
https://wiki.davical.org/index.php?title=Community_Support/Minutes_27May2014&diff=3284
Community Support/Minutes 27May2014
2014-06-11T19:56:45Z
<p>Frizou: </p>
<hr />
<div> [[Community Support/Minutes 14May2014|Previous one]] | [[Community Support/Minutes 11Jun2014|Next one]]<br />
__NOTOC__<br />
<br />
'''DAViCal PROJECT MEETING, called for 2014-05-27, 17:00 UTC'''<br />
<br />
: People involved in the meeting: <br />
: Jim Fenton, phoo1234567, Cyril Giraud<br />
<br />
: Begin time: 1712 UTC<br />
<br />
=== 1. Project infrastructure ===<br />
<br />
==== 1.1. Website and documentation ====<br />
<br />
==== 1.2. Source code ====<br />
<br />
===== 1.2.1 Git =====<br />
* DAViCal project URL is https://gitlab.com/davical-project/davical.git<br />
* and AWL for DAViCal URL is https://gitlab.com/davical-project/awl.git<br />
* The DAViCal repository is 24 MB and includes test cases, documentation (.odt), and website. We should have a subset for people to download who just want what they need to run it.<br />
<br />
<br />
==== 1.3. Downloads and binary repositories ====<br />
<br />
===== 1.3.1 Debian/DEB Packages =====<br />
<br />
===== 1.3.2 RedHat/RPM Packages =====<br />
* phoo1234567 will look into RPM packaging for DAViCal.<br />
<br />
===== 1.3.3 Tar Package =====<br />
<br />
<br />
==== 1.4. Localization ====<br />
* Cyril will add an issue in gitlab to list PHP code updates needed for localization.<br />
<br />
=== 2. Development ===<br />
<br />
==== 2.1. Tickets or bug reports ====<br />
* Mailing list has been quiet. One new question came up on the Help forum on SourceForge; Jim will redirect the user to the mailing list.<br />
<br />
==== 2.2. Patches or updates ====<br />
<br />
==== 2.3. New features or versions ====<br />
<br />
<br />
=== 3.Project community ===<br />
<br />
==== 3.1 Mailing list and meetings ====<br />
* New mailing davical-dev and davical-commits lists are up but no traffic yet.<br />
* Meeting on Tuesday this time seems to have resulted in thin attendance. Those here can make it on Wednesday, so we'll try Wednesday next time (also so Jim can attend; conflict for next meeting if on Tuesday).<br />
<br />
* So next meeting will be Wednesday, 11 June at 1700 UTC.<br />
<br />
==== 3.2. Roles ====<br />
<br />
==== 3.3. Communication with Andrew McMillan ====<br />
* Jim to communicate with Andrew in the next few days, to discuss donations link, broken links (e.g., to Andrew's bio) on web page, and reconfirm status of AWL.<br />
<br />
<br />
=== 4. Off topics ===<br />
<br />
Meeting adjourned 18:06 UTC.</div>
Frizou