The following article will guide you through the installation of SOGo. For this setup we used one of our Debian 6 virtual servers.
What is SOGo?
SOGo is a free and modern scalable groupware server. It offers shared calendars, address books, and emails through your favourite Web browser and by using a native client such as Mozilla Thunderbird and Lightning.
Ok, let’s start with the set-up.
1. Start a screen session
# screen -U -S sogo
2. Apache has to be installed, so install it if you haven’t already:
# apt-get install apache2
3. Make sure your system is up-to-date:
# apt-get update # apt-get dist-upgrade
4. Add SOGo repository to your sources:
# echo -e "# sogo repo\ndeb http://inverse.ca/debian squeeze squeeze\n" >> /etc/apt/sources.list # apt-key adv --keyserver keys.gnupg.net --recv-key 0x810273C4 # apt-get update
5. Install SOGo and some necessary applications by executing:
# apt-get install sogo sope4.9-gdl1-mysql mysql-server memcached rpl
6. Remove the tmpreader warning:
# rpl 'SHOWWARNING=true' 'SHOWWARNING=false' /etc/tmpreaper.conf
7. Set-up memcached:
# rpl '127.0.0.1' localhost /etc/memcached.conf
8. Set-up MySQL:
# mysql_secure_installation
9. Restart MySQL and memcached:
# service mysql restart # service memcached restart
10. Create a database to be used by SOGo
# mysql -u root -p mysql> CREATE DATABASE sogoDB; mysql> GRANT ALL ON sogoDB.* TO 'sogoUSER'@'localhost' IDENTIFIED BY '<MY_SECRET_PASS>'; mysql> USE sogoDB; mysql> CREATE TABLE sogo_users (c_uid VARCHAR(10) PRIMARY KEY, c_name VARCHAR(10), c_password VARCHAR(32), c_cn VARCHAR(128), mail VARCHAR(128)); mysql> INSERT INTO sogo_users VALUES ('dan', 'dan', MD5('<MY_SECRET_PASS>'), 'Dan User', 'dan@example.com'); mysql> \q
11. SOGo configuration has to be done as user “sogo” under its HOME_DIR
# su - sogo -s /bin/bash # defaults write sogod SOGoTimeZone "US/Central" # defaults write sogod SOGoMailDomain "example.com" # defaults write sogod SOGoLanguage "English" # defaults write sogod SOGoUserSources '({canAuthenticate = YES; displayName = "SOGo Users"; id = users; isAddressBook = YES; type = sql; userPasswordAlgorithm = md5; viewURL ="mysql://sogoUSER:<MY_SECRET_PASS>@127.0.0.1:3306/sogoDB/sogo_users";})' # defaults write sogod SOGoProfileURL 'mysql://sogoUSER:<MY_SECRET_PASS>@127.0.0.1:3306/sogoDB/sogo_user_profile' # defaults write sogod OCSFolderInfoURL 'mysql://sogoUSER:<MY_SECRET_PASS>@127.0.0.1:3306/sogoDB/sogo_folder_info' # defaults write sogod OCSSessionsFolderURL 'mysql://sogoUSER:<MY_SECRET_PASS>@127.0.0.1:3306/sogoDB/sogo_sessions_folder' # defaults write sogod SOGoAppointmentSendEMailNotifications YES # defaults write sogod SOGoLoginModule Calendar # defaults write sogod SOGoSieveScriptsEnabled YES # defaults write sogod SOGoSieveServer sieve://localhost:4190 # defaults write sogod SOGoVacationEnabled YES # defaults write sogod SOGoMailMessageCheck every_5_minutes # defaults write sogod SOGoFirstDayOfWeek 1 # defaults write sogod SOGoSuperUsernames '( "admin" )' # defaults write sogod SOGoDraftsFolderName "INBOX.Drafts" # defaults write sogod SOGoSentFolderName "INBOX.Sent" # defaults write sogod SOGoTrashFolderName "INBOX.Trash" # defaults write sogod NGImap4ConnectionStringSeparator "." # exit
12. Set-up SOGo apache configuration file:
# cp /etc/apache2/conf.d/SOGo.conf /root/ # sed -i 's#yourhostname#example.com#g' /etc/apache2/conf.d/SOGo.conf # sed -i 's#"x-webobjects-server-port" "443"#"x-webobjects-server-port" "80"#' /etc/apache2/conf.d/SOGo.conf # sed -i 's#https#http#' /etc/apache2/conf.d/SOGo.conf
13. Enable some neccessary Apache modules:
# a2enmod proxy proxy_http headers rewrite
14. Restart SOGo and Apache
# service sogo restart # service apache2 restart
15. Open your SOGo instance at http://example.com/SOGo
Of course you don’t have to do any of this if you use one of our Linux VPS hosting services, in which case you can simply ask our expert linux admins to install this for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.
I like your tutorial.
Especially the fact, that you recommend a distribution upgrade in Step 3.
For container based VPS this is the fastest and most reliable method to ruin your system. completely.
YMMD :-)
dist-upgrade
will not upgrade to a new Debian release. It will upgrade all packages and dependencies with newer versions if available and may remove/install some packages in order to satisfy the chain.In fact, if you take a look at Debian’s official page about Keeping your Debian system up-to-date you will see the usage of
dist-upgrade
In order to do a distribution (release) upgrade, you need to change the release in your
sources.list
and no, it will not ruin your system.Hi,
Thanks for this post.
I followed it all along but cannot connect to the SOGo portal.
Could you tell me where I can modify accounts/passwords for this ?
Thanks a lot.
More information about how to use/configure SOGo you can find at http://www.sogo.nu/files/docs/SOGo%20Installation%20Guide.pdf
Hello, thank you for the guide. At step 5, the returned message is “unable to locate package rpl”. I am attempting to install SOGo on Debian 8.2 x64. Any advice is greatly appreciated, thanks again!
Hey Carl, we successfully installed rpl on a Debian 8.2 x86_64 version. Can you try to run ‘apt-get update’ before ‘apt-get install rpl’ ?