Par défaut tous les paquets du système sont en testing, seuls certains paquets choisis explicitement sont en unstable. Mettre en place ce système est très simple avec apt. Il s'agit d'écrire des règles de priorité pour le choix des versions des paquets par rapport aux repositories disponibles. Cette technique s'appelle le pinning.
Package: * Pin: release o=Debian,a=testing,l=Debian-Security Pin-Priority: 990 Package: * Pin: release a=testing Pin-Priority: 990 Package: * Pin: release a=unstable Pin-Priority: 60
TODO : ajouter le lien vers la page de debian pour les sueil sur les niveaux de priorité
Ajout du repository de sogo dans la configuration d'apt :
$ sudo vi /etc/apt/sources.list
Ajouter la ligne suivante :
# Sogo repository
deb http://inverse.ca/debian/ squeeze main
$ sudo aptitude update $ sudo aptitude install sogo
Se connecter avec le user sogo
$ su - sogo
TODO : expliquer GNUStep TODO : expliquer que domain.org est un domain d'exemple
Ajouter des options de configuration
$ defaults write sogod SOGoServerTimeZone "Europe/Paris" $ defaults write sogod WOParsersUseUTF8 YES $ defaults write sogod WOMessageUseUTF8 YES $ defaults write sogod SOGoDefaultMailDomain "domain.org" $ defaults write sogod NGUseUTF8AsURLEncoding YES $ defaults write sogod SOGoDefaultLanguage English $ defaults write sogod SOGoAppointmentSendEMailNotifications YES $ defaults write sogod SOGoFoldersSendEMailNotifications YES $ defaults write sogod SOGoACLsSendEMailNotifications YES $ defaults write sogod WOPort 20000 $ defaults write sogod WOApplicationRedirectURL “https://www.domain.org”
TODO : Ajouter la correction du bug phpldapadmin
$ defaults write sogod SOGoAuthenticationMethod LDAP
$ defaults write sogod SOGoUserSources '({CNFieldName = cn;
IDFieldName = uid; UIDFieldName = uid; IMAPHostFieldName = mailHost;
baseDN = "ou=person,dc=spartacusse,dc=fr";
canAuthenticate = YES; displayName =
"Shared Addresses"; hostname = "localhost"; id = public;
isAddressBook = YES; port=389})'
TODO : vérifier la signification de canAuthenticate
su - postgres
createuser --no-superuser --no-createdb --no-createrole
--encrypted --pwprompt sogo
Lors de la demande de mot de passe entrer “sogo”
createdb -O sogo sogo
Dans le fichier de configuration pg_hba.conf de postgres, ajouter :
host sogo sogo md5
Le fichier de configuration est situé dans le répertoire /etc/postgresql/8.4/main
$ su – sogo
$ defaults write sogod SOGoProfileURL
'postgresql://sogo:sogo@localhost:5432/sogo/sogo_user_profile'
$ defaults write sogod OCSFolderInfoURL
'postgresql://sogo:sogo@localhost:5432/sogo/sogo_folder_info'
Un fichier d'exemple de configuration est fourni :
/usr/share/doc/sogo/examples/SOGo.conf
Configuration en ssl
<IfModule mod_ssl.c>
<VirtualHost xxx.xxx.xxx.xxx:443>
ServerAdmin webmaster@domain.org
ServerName www.domain.org
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/www.domain.org.cert.pem
SSLCertificateKeyFile /etc/apache2/ssl/www.domain.org.key.pem
# Sogo
Alias /SOGo.woa/WebServerResources/ /usr/lib/GNUstep/SOGo/WebServerResources/
Alias /SOGo/WebServerResources/ /usr/lib/GNUstep/SOGo/WebServerResources/
AliasMatch /SOGo/so/ControlPanel/Products/(.*)/Resources/(.*) /usr/lib/GNUstep/SOGo/$1.SOGo/Resources/$2
<LocationMatch "^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*jpg">
SetHandler default-handler
</LocationMatch>
<LocationMatch "^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*png">
SetHandler default-handler
</LocationMatch>
<LocationMatch "^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*gif">
SetHandler default-handler
</LocationMatch>
<LocationMatch "^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*css">
SetHandler default-handler
</LocationMatch>
<LocationMatch "^/SOGo/so/ControlPanel/Products/.*UI/Resources/.*js">
SetHandler default-handler
</LocationMatch>
ProxyRequests Off
SetEnv proxy-nokeepalive 1
ProxyPreserveHost On
ProxyPass /SOGo balancer://sogocluster/SOGo
<Proxy balancer://sogocluster>
RequestHeader set "x-webobjects-server-protocol" "HTTP/1.0"
RequestHeader set "x-webobjects-remote-host" "127.0.0.1"
## adjust the following to your configuration
RequestHeader set "x-webobjects-server-port" "443"
RequestHeader set "x-webobjects-server-name" "www.domain.org"
RequestHeader set "x-webobjects-server-url" "https://www.domain.org"
## When using proxy-side autentication, you need to uncomment and
## adjust the following line:
# RequestHeader set "x-webobjects-remote-user" "%{REMOTE_USER}e"
BalancerMember http://127.0.0.1:20000 retry=1 max=1 timeout=120
## If you enable those, don't forget the enable the spawning of multiple SOGo
## processes. With Redhat-based distributions, this is done by setting the
## "PREFORK" variable in /etc/sysconfig/sogo to the amount of processes.
## In Debian-based distributions, you should do the same in the
## /etc/default/sogo file instead.
# BalancerMember http://127.0.0.1:20001 retry=1 max=1 timeout=120
# BalancerMember http://127.0.0.1:20002 retry=1 max=1 timeout=120
ProxySet lbmethod=byrequests maxattempts=1
Order allow,deny
Allow from all
</Proxy>
</VirtualHost>
</IfModule>
$ sudo a2ensite org.domain.www
$ sudo a2enmod ssl
$ sudo a2enmod proxy
$ sudo a2enmod proxy_balancer
$ sudo a2enmod proxy_http
$ sudo a2enmod proxy_html
$ sudo /etc/init.d/apache2 restart