|
|
(13 intermediate revisions by 2 users not shown) |
Line 1: |
Line 1: |
− | ===Introduction=== | + | {{Languages}} |
− | The Radicale Project is a complete calendar and contact storing and manipulating solution. It can store multiple calendars and multiple address books.
| + | == Radicale for SME Server == |
| | | |
− | Calendar and contact manipulation is available from both local and distant accesses, possibly limited through authentication policies.
| + | === Maintainer === |
− | This HOWTO describes the installation procedure for installing Radicale around the Roundcube installation on an SME installation.
| + | [mailto:stephdl@de-labrusse.fr stephdl] Stéphane de Labrusse AKA [[User:stephdl|Stephdl]]<br /> |
− | Before installation
| + | kudo to JM LE CORGUILLE, for the idea and the code. |
− | On sme8, you need to install python26
| + | === Version === |
− | yum --enablerepo=ces-standard,epel --nogpgcheck install python26
| + | {{ #smeversion: smeserver-radicale }} |
− | Not need in sme9, python-2.6 is installed. But you have to do:
| + | [[Version::contrib9|stephdl]][[Has SME9::true| ]] |
− | ln -s /usr/bin/python2.6 /usr/bin/python26
| |
− | in order to use same init script as for sme8
| |
| | | |
− | ===Download & Install Radicale=== | + | === Description === |
− | {{Tip box| radicale is 'pip' compatible, that should be used instead of downloading each time a tar.gz}}
| + | This contribution for smeserver adds a caldav and a carddav server, the collection is located at /home/e-smith/files/radicale.<br /> |
− | mkdir -p /opt/roundcube/
| |
− | cd /opt/roundcube/
| |
− | wget –no-check-certificate http://pypi.python.org/packages/source/R/Radicale/Radicale-1.0.1.tar.gz
| |
− | tar xvfz Radicale-1.0.1.tar.gz
| |
− | rm -f Radicale-1.0.1.tar.gz
| |
− | mv Radicale-1.0.1 radicale
| |
− | mkdir -p /home/e-smith/files/.radicale/collections
| |
− | mkdir -p /etc/radicale
| |
− | mkdir -p /var/run/radicale
| |
| | | |
− | Next, you need to configure how you want the logs:
| + | Radicale is a caldav/carddav server written in python, smeserver-radicale use pip to install and upgrade it. http://radicale.org/ |
− | touch /etc/radicale/logging
| |
− | cat <<EOF > /etc/radicale/logging
| |
− | [loggers]
| |
− | keys=root
| |
− | level=NOTSET
| |
− |
| |
− | [logger_root]
| |
− | handlers=file
| |
− |
| |
− | [formatters]
| |
− | keys=simple
| |
− |
| |
− | [formatter_simple]
| |
− | format=%(asctime)s - %(name)s - %(levelname)s - %(message)s
| |
− |
| |
− | [handlers]
| |
− | keys=file
| |
− |
| |
− | [handler_file]
| |
− | class=handlers.TimedRotatingFileHandler
| |
− | interval=midnight
| |
− | backupCount=5
| |
− | formatter=simple
| |
− | level=ERROR
| |
− | args=('/var/log/radicale.log',)
| |
− | EOF
| |
− |
| |
− | Set Radicale to start on system startup
| |
− | To make Radicale start automagically, create
| |
− | vim /etc/rc.d/init.d/radicaled
| |
− | with the following content:
| |
− | #!/bin/sh
| |
− | #
| |
− | # chkconfig: - 88 10
| |
− | # description: Start/Stop the RADICALE server daemon
| |
− | #
| |
− | # This program is free software; you can redistribute it and/or modify
| |
− | # it under the terms of the GNU General Public License as published by
| |
− | # the Free Software Foundation; either version 2 of the License, or
| |
− | # (at your option) any later version.
| |
− | #
| |
− | # This program is distributed in the hope that it will be useful,
| |
− | # but WITHOUT ANY WARRANTY; without even the implied warranty of
| |
− | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
| |
− | # GNU General Public License for more details.
| |
− | #
| |
− | # You should have received a copy of the GNU General Public License
| |
− | # along with this program; if not, write to the Free Software
| |
− | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
| |
− | #
| |
− | # Copyright (C) 2015 JM LE CORGUILLE
| |
− | #
| |
− |
| |
− | # Source function library.
| |
− | . /etc/rc.d/init.d/functions
| |
− |
| |
− | PYTHON26=/usr/bin/python26
| |
− | RADICALE=/opt/roundcube/radicale/radicale.py
| |
− | LOCKF=/var/lock/radicale ##/var/run/radicale/radicale.pid
| |
− | CONFIG=/etc/radicale/config
| |
− |
| |
− | [ -f $PYTHON26 ] || exit 0
| |
− | [ -f $RADICALE ] || exit 0
| |
− | [ -f $CONFIG ] || exit 0
| |
− |
| |
− | RETVAL=0
| |
− |
| |
− | case "$1" in
| |
− | start)
| |
− | echo -n $"Starting RADICALE server: "
| |
− | cd /opt/roundcube/radicale/
| |
− | $PYTHON26 $RADICALE -C $CONFIG
| |
− | RETVAL=$?
| |
− | echo
| |
− | [ $RETVAL -eq 0 ] && touch $LOCKF &&
| |
− | ln -s /var/run/radicale/radicale.pid /var/run/radicale.pid 2>/dev/null
| |
− | ;;
| |
− | stop)
| |
− | echo -n $"Stopping RADICALE server: "
| |
− | killproc $PYTHON26 $RADICALE
| |
− | RETVAL=$?
| |
− | echo
| |
− | [ $RETVAL -eq 0 ] && rm -f $LOCKF
| |
− | ;;
| |
− | status)
| |
− | status radicale
| |
− | RETVAL=$?
| |
− | ;;
| |
− | restart)
| |
− | $0 stop
| |
− | sleep 3
| |
− | $0 start
| |
− | RETVAL=$?
| |
− | ;;
| |
− | *)
| |
− | echo $"Usage: $0 {start|stop|status|restart}"
| |
− | exit 1
| |
− | esac
| |
− |
| |
− | exit $RETVAL
| |
| | | |
− | complete it with:
| + | === Requirements === |
− | chmod 755 /etc/rc.d/init.d/radicaled
| + | You need to enable the [[epel]] and the [[stephdl]] repositories |
− | chkconfig --add radicaled
| |
− | ln -s /etc/rc.d/init.d/e-smith-service /etc/rc7.d/S88radicaled
| |
| | | |
− | ===Setup Radicale configuration=== | + | === Installation === |
− | mkdir -p /etc/e-smith/templates-custom/etc/radicale/config
| |
| | | |
− | Create
| + | <tabs container><tab name="For SME 10"> |
− | vim /etc/e-smith/templates-custom/etc/radicale/config/00setup | + | yum --enablerepo=smecontribs install smeserver-radicale |
| | | |
− | with the following content:
| + | nothing more to do on SME 10. |
− | # -*- mode: conf -*-
| |
− | # vim:ft=cfg
| |
− |
| |
− | # Config file for Radicale - A simple calendar server
| |
− | #
| |
− | # Place it into /etc/radicale/config (global)
| |
− | # or ~/.config/radicale/config (user)
| |
− | #
| |
− | # The current values are the default ones
| |
− |
| |
− |
| |
− | [server]
| |
− |
| |
− | # CalDAV server hostnames separated by a comma
| |
− | # IPv4 syntax: address:port
| |
− | # IPv6 syntax: [address]:port
| |
− | # For example: 0.0.0.0:9999, [::]:9999
| |
− | # IPv6 adresses are configured to only allow IPv6 connections
| |
− | #hosts = 0.0.0.0:5232
| |
| | | |
− | Create
| + | </tab> |
− | vim /etc/e-smith/templates-custom/etc/radicale/config/10hosts
| + | <tab name="For SME 9"> |
| + | This contrib is currently held in the [[epel]] and the [[stephdl]] repository, so the following commands will install the contribs on your smeserver. |
| | | |
− | with the following content:
| + | yum --enablerepo=epel,stephdl install smeserver-radicale |
− | { | |
− | my $rad_ports = $radicale{Port} || 5232;
| |
− | my $rad_ip = $LocalIP || 127.0.0.1;
| |
− | "hosts = $rad_ip:$rad_ports";
| |
− | }
| |
| | | |
− | Create
| + | You will then need to activate the database changes etc. |
− | vim /etc/e-smith/templates-custom/etc/radicale/config/20daemon
| + | The 'official' way is to perform |
− | with the following content:
| |
| | | |
− | # Daemon flag | + | signal-event radicale-update |
− | #daemon = False
| + | or a much more long event |
− | daemon = True
| + | signal-event console-save |
− |
| |
− | # File storing the PID in daemon mode
| |
− | #pid =
| |
− | pid = /var/run/radicale/radicale.pid
| |
− |
| |
− | # SSL flag, enable HTTPS protocol
| |
− | #ssl = False
| |
− | ssl = True | |
| | | |
− | # SSL certificate path
| + | Each time you launch this event and 'console-save' you will upgrade radicale and renew the ssl certificate if it is removed of /home/e-smith/files/radicale |
− | #certificate = /etc/apache2/ssl/server.crt
| |
| | | |
− | Create
| + | </tab> |
− | vim /etc/e-smith/templates-custom/etc/radicale/config/30crt
| + | </tabs> |
| | | |
− | with the following content:
| + | ===collections=== |
− | {
| + | For each user saved in the server-manager you will find a collections that it will own in /home/e-smith/files/radicale/collections. The folder is created at the first login and store all the carddav and caldav entries in two files (calendar.ics & addressbook.vcf). |
− | my $rad_name = $SystemName || "server";
| |
− | my $rad_domain = $DomainName;
| |
− | "certificate = /home/e-smith/ssl.crt/$rad_name.$rad_domain.crt";
| |
− | }
| |
| | | |
− | Create
| + | see them by |
− | vim /etc/e-smith/templates-custom/etc/radicale/config/40ssl | + | ls -la -R /home/e-smith/files/radicale/collections/ |
| | | |
− | with the following content:
| + | === database=== |
| + | # config show radicale |
| + | radicale=service |
| + | TCPPort=5232 |
| + | access=public |
| + | debug=False #or True for debugging purpose (logs are in /var/log/radicale/radicale.log) |
| + | status=enabled |
| | | |
− | # SSL private key
| + | after a change, do |
− | #key = /etc/apache2/ssl/server.key | + | signal-event radicale-update |
| | | |
− | Create
| + | ===Radicale Client Configuration=== |
− | vim /etc/e-smith/templates-custom/etc/radicale/config/50key
| + | {{Note box|Keep in mind that there is no frontend, you must use a caldav or a carddav client}} |
| | | |
− | with the following content:
| + | The URL for accessing the radicale server is: |
− | {
| |
− | my $rad_name = $SystemName || "server";
| |
− | my $rad_domain = $DomainName;
| |
− | "key = /home/e-smith/ssl.key/$rad_name.$rad_domain.key";
| |
− | }
| |
| | | |
− | Create
| + | https://<server_domain_name>:5232/'''USER'''/calendar.ics |
− | vim /etc/e-smith/templates-custom/etc/radicale/config/60fin | + | https://<server_domain_name>:5232/'''USER'''/addressbook.vcf |
| | | |
− | with the following content: | + | Where '''USER''' is the sme login for this user. You have no frontend, just a server, you can use lightning for caldav with thunderbird and the plugin sogo-connector for carddav. |
| | | |
− | # SSL Protocol used. See python's ssl module for available values
| + | === Uninstall === |
− | #protocol = PROTOCOL_SSLv23
| + | yum remove smeserver-radicale |
− |
| |
− | # Ciphers available. See python's ssl module for available ciphers
| |
− | #ciphers =
| |
− |
| |
− | # Reverse DNS to resolve client address in logs
| |
− | #dns_lookup = True
| |
− | dns_lookup = True
| |
− |
| |
− | # Root URL of Radicale (starting and ending with a slash)
| |
− | #base_prefix = /
| |
− |
| |
− | # Possibility to allow URLs cleaned by a HTTP server, without the base_prefix
| |
− | #can_skip_base_prefix = False
| |
− |
| |
− | # Message displayed in the client when a password is needed
| |
− | #realm = Radicale - Password Required
| |
− |
| |
− |
| |
− | [encoding]
| |
− |
| |
− | # Encoding for responding requests
| |
− | #request = utf-8
| |
− |
| |
− | # Encoding for storing local collections
| |
− | #stock = utf-8
| |
− |
| |
− |
| |
− | [well-known]
| |
− |
| |
− | # Path where /.well-known/caldav/ is redirected
| |
− | #caldav = '/%(user)s/caldav/'
| |
− | | |
− | # Path where /.well-known/carddav/ is redirected
| |
− | #carddav = '/%(user)s/carddav/'
| |
− |
| |
− |
| |
− | [auth]
| |
− |
| |
− | # Authentication method
| |
− | # Value: None | htpasswd | IMAP | LDAP | PAM | courier | http | remote_user | custom
| |
− | #type = None
| |
− | type = IMAP
| |
− |
| |
− | # Custom authentication handler
| |
− | # custom_handler =
| |
− |
| |
− | # Htpasswd filename
| |
− | #htpasswd_filename = /etc/radicale/users
| |
− |
| |
− | # Htpasswd encryption method
| |
− | # Value: plain | sha1 | ssha | crypt
| |
− | #htpasswd_encryption = crypt
| |
− |
| |
− | # LDAP server URL, with protocol and port
| |
− | #ldap_url = ldap://localhost:389/
| |
− |
| |
− | # LDAP base path
| |
− | #ldap_base = ou=users,dc=example,dc=com
| |
− |
| |
− | # LDAP login attribute
| |
− | #ldap_attribute = uid
| |
− |
| |
− | # LDAP filter string
| |
− | # placed as X in a query of the form (&(...)X)
| |
− | # example: (objectCategory=Person)(objectClass=User)(memberOf=cn=calenderusers,ou=users,dc=example,dc=org)
| |
− | # leave empty if no additional filter is needed
| |
− | #ldap_filter =
| |
− |
| |
− | # LDAP dn for initial login, used if LDAP server does not allow anonymous searches
| |
− | # Leave empty if searches are anonymous
| |
− | #ldap_binddn =
| |
− |
| |
− | # LDAP password for initial login, used with ldap_binddn
| |
− | #ldap_password =
| |
− |
| |
− | # LDAP scope of the search
| |
− | #ldap_scope = OneLevel
| |
− |
| |
− | # IMAP Configuration
| |
− | #imap_hostname = localhost
| |
− | #imap_port = 143
| |
− | #imap_ssl = False
| |
− | imap_hostname = localhost
| |
− | imap_port = 993
| |
− | imap_ssl = True
| |
− |
| |
− | # PAM group user should be member of
| |
− | #pam_group_membership =
| |
− |
| |
− | # Path to the Courier Authdaemon socket
| |
− | #courier_socket =
| |
− |
| |
− | # HTTP authentication request URL endpoint
| |
− | #http_url =
| |
− | # POST parameter to use for username
| |
− | #http_user_parameter =
| |
− | # POST parameter to use for password
| |
− | #http_password_parameter =
| |
− |
| |
− |
| |
− | [git]
| |
− |
| |
− | # Git default options
| |
− | #committer = Radicale <radicale@example.com>
| |
− |
| |
− |
| |
− | [rights]
| |
− |
| |
− | # Rights backend
| |
− | # Value: None | authenticated | owner_only | owner_write | from_file | custom
| |
− | #type = None
| |
− | type = owner_write
| |
− |
| |
− | # Custom rights handler
| |
− | # custom_handler =
| |
− |
| |
− | # File for rights management from_file
| |
− | #file = ~/.config/radicale/rights
| |
− |
| |
− |
| |
− | [storage]
| |
− |
| |
− | # Storage backend
| |
− | # -------
| |
− | # WARNING: ONLY "filesystem" IS DOCUMENTED AND TESTED,
| |
− | # OTHER BACKENDS ARE NOT READY FOR PRODUCTION.
| |
− | # -------
| |
− | # Value: filesystem | multifilesystem | database | custom
| |
− | #type = filesystem
| |
− |
| |
− | # Custom storage handler
| |
− | #custom_handler =
| |
− |
| |
− | # Folder for storing local collections, created if not present
| |
− | #filesystem_folder = ~/.config/radicale/collections
| |
− | filesystem_folder = /home/e-smith/files/.radicale/collections
| |
− |
| |
− | # Database URL for SQLAlchemy
| |
− | # dialect+driver://user:password@host/dbname[?key=value..]
| |
− | # For example: sqlite:///var/db/radicale.db, postgresql://user:password@localhost/radicale
| |
− | # See http://docs.sqlalchemy.org/en/rel_0_8/core/engines.html#sqlalchemy.create_engine
| |
− | #database_url =
| |
− |
| |
− |
| |
− | [logging]
| |
− |
| |
− | # Logging configuration file
| |
− | # If no config is given, simple information is printed on the standard output
| |
− | # For more information about the syntax of the configuration file, see:
| |
− | # http://docs.python.org/library/logging.config.html
| |
− | #config = /etc/radicale/logging
| |
− | config = /etc/radicale/logging
| |
− | # Set the default logging level to debug
| |
− | #debug = False
| |
− | # Store all environment variables (including those set in the shell)
| |
− | #full_environment = False
| |
− |
| |
− |
| |
− | [headers]
| |
− |
| |
− | # Additional HTTP headers
| |
− | #Access-Control-Allow-Origin = *#imap_hostname = localhost
| |
− |
| |
− | db configuration set radicale service Port 5232 status enabled
| |
− | expand-template /etc/radicale/config
| |
− |
| |
− | /etc/rc.d/init.d/radicaled start
| |
| | | |
− | ===Radicale Client Configuration=== | + | === Bugs === |
− | The URL for accessing the radicale server is:
| + | Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla] |
− | https://<server_domain_name>:5232/user/calendar.ics
| + | and select the smeserver-radicale component or use {{BugzillaFileBug|product=SME%20Contribs|component=smeserver-radicale|title=this link}}. |
− | https://<server_domain_name>:5232/user/addressbook.vcf
| |
− | Where user is the sme-login for this user
| |
| | | |
− | ===References=== | + | {{#bugzilla:columns=id,product,version,status,summary |sort=id|order=desc |component=smeserver-radicale|noresultsmessage="No open bugs found."}} |
− | radicale Documentation: http://radicale.org/
| |
− | roundcube Documentation: http://wiki.contribs.org/RoundCube
| |
| | | |
− | [[Category:Howto]] | + | |
| + | [[Category: Contrib]] |