Hi,
I have take time to have a nice installation of GroupServer on Debian Wheezy on
a virtual machine (openvz container). Here how i did.
At the end of this tutorial we get an install of GS as system daemon, publicly
accessible using port 80, manageable on port 8080, interfaced with postfix.
* Install dependancies :
apt-get install python python2.7-dev python-virtualenv g++ build-essential
postgresql postgresql-server-dev-9.1 libpq-dev postfix postfix-dev redis-server
libjpeg62-dev zlib1g-dev swaks
* Create groupserver system user:
(sudo group ans password are needed by install script, they can be removed
after install process)
useradd -m -G sudo groupserver
passwd groupserver
* Download groupserver :
su groupserver
cd ~
wget
http://groupserver.org/sites/onlinegroups/Content/groupserver/downloads/groupserver-14.03.tar.gz
tar xzf groupserver-14.03.tar.gz
mv groupserver-14.03 groupserver
* Prepare your DNS :
Public site :
groups.domain.com A xxx.xxx.xxx.xxx (public IP of the host)
groups.domain.com MX groups.domain.com
Zope administration interface need a different domain, you can for exemple use
:
zmi.groups.domain.com A xxx.xxx.xxx.xxx (public IP of the host)
* Configure groupserver installer :
su groupserver
cd ~/groupserver
nano config.cfg
* Set theses parameters :
[config]
host = groups.domain.com
port = 8080
admin_email = <email obscured>
admin_password = admin
user_email = <email obscured>
user_password = user
support_email = <email obscured>
zope_host = zmi.groups.domain.com
zope_port = 8080
zope_admin = admin
zope_password = admin
pgsql_password = randompassword
relstorage_password = randompassword
* Configure postgreSQL :
su groupserver
sudo nano /etc/postgresql/9.1/main/postgresql.conf
Uncomment and set this parameter :
max_prepared_transactions = 1
Restart postgresql:
sudo service postgresql restart
* Patch GroupServer install script :
su groupserver
cd ~/groupserver
nano gs_install_ubuntu.sh
Add this line :
./bin/pip install "distribute == 0.6.36"
just before this one (at the end)
buildout -N
* Run install script
su groupserver
cd ~/groupserver
./gs_install_ubuntu.sh
(Take a moment)
* If problem occure during install
Before re-runing install, switch to system postgres user and delete created
databases and users :
sudo -u postgres
dropdb groupserver
dropdb groupserverzodb
dropuser gsadmin
dropuser gszodbadmin
You may also need to delete *.cfg files in /home/groupserver/groupserver/var
* Try groupserver
su groupserver
cd ~
./bin/instance fg
You should connect to public web gui using port 8080 :
http://groups.domain.com:8080
And Zope manager :
http://zmi.groups.domain.com:8080/manage
Ctrl+C to stop groupserver
* Configure apache proxy
Create apache VirtualHost :
nano /etc/apache2/sites-available/groups.domain.com
<VirtualHost *:80>
ServerAdmin <email obscured>
ServerName groups.domain.com
RewriteEngine on
RewriteRule ^/(.*)
http://groups.domain.com:8080/groupserver/Content/initial_site/VirtualHostBase/http/%{HTTP_HOST}
[L,P]
ProxyVia On
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel info
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
cd /etc/apache2/sites-enabled
ln -s 100-groups.domain.com ../sites-available/groups.domain.com
a2enmod rewrite proxy
service apache2 restart
* Try groupserver
You should connect to public web gui using port 80 :
http://groups.domain.com
And Zope manager using 8080:
http://zmi.groups.domain.com:8080/manage
* Configure postfix
Run
dpkg-reconfigure postfix
Choose "Internet site" and answer to questions
Whe mydestination is asked remove $myhostname
Edit postfix main.cf config file :
nano /etc/postfix/main.cf
Add hash:/etc/postfix/groupserver.aliases to alias_maps and alias_database
(comma as separator)
Add hash:/etc/postfix/groupserver.virtual to virtual_alias_maps
Add the line smtpd_authorized_verp_clients = 127.0.0.1, xxx.xxx.xxx.xxx (host
public ip)
As root copy some files generated by groupserver install process :
cd /home/groupserver
cp postfix_config/groupserver.* /etc/postfix
Patch a file
nano /etc/postfix/groupserver.virtual
Add @localhost after groupserver-automagic:
@groups.domain.com groupserver-automagic@localhost
Generate postfix hashes :
postmap /etc/postfix/groupserver.virtual
postalias /etc/postfix/groupserver.aliases
service postfix restart
* Try postfix :
Use GUI to create group, join users, send message
Use mail client to send a mail to your group
* Daemonize and run at boot :
nano /etc/init.d/groupserver
Past this : http://pastebin.com/R0RYmEh9
You may edit this file to change path where you put groupserver
chmod a+x /etc/init.d/groupserver
Try it :
service groupserver start
service groupserver stop
Add to system boot :
update-rc.d groupserver defaults
I have take time to have a nice installation of GroupServer on Debian Wheezy on
a virtual machine (openvz container). Here how i did.
At the end of this tutorial we get an install of GS as system daemon, publicly
accessible using port 80, manageable on port 8080, interfaced with postfix.
* Install dependancies :
apt-get install python python2.7-dev python-virtualenv g++ build-essential
postgresql postgresql-server-dev-9.1 libpq-dev postfix postfix-dev redis-server
libjpeg62-dev zlib1g-dev swaks
* Create groupserver system user:
(sudo group ans password are needed by install script, they can be removed
after install process)
useradd -m -G sudo groupserver
passwd groupserver
* Download groupserver :
su groupserver
cd ~
wget
http://groupserver.org/sites/onlinegroups/Content/groupserver/downloads/groupserver-14.03.tar.gz
tar xzf groupserver-14.03.tar.gz
mv groupserver-14.03 groupserver
* Prepare your DNS :
Public site :
groups.domain.com A xxx.xxx.xxx.xxx (public IP of the host)
groups.domain.com MX groups.domain.com
Zope administration interface need a different domain, you can for exemple use
:
zmi.groups.domain.com A xxx.xxx.xxx.xxx (public IP of the host)
* Configure groupserver installer :
su groupserver
cd ~/groupserver
nano config.cfg
* Set theses parameters :
[config]
host = groups.domain.com
port = 8080
admin_email = <email obscured>
admin_password = admin
user_email = <email obscured>
user_password = user
support_email = <email obscured>
zope_host = zmi.groups.domain.com
zope_port = 8080
zope_admin = admin
zope_password = admin
pgsql_password = randompassword
relstorage_password = randompassword
* Configure postgreSQL :
su groupserver
sudo nano /etc/postgresql/9.1/main/postgresql.conf
Uncomment and set this parameter :
max_prepared_transactions = 1
Restart postgresql:
sudo service postgresql restart
* Patch GroupServer install script :
su groupserver
cd ~/groupserver
nano gs_install_ubuntu.sh
Add this line :
./bin/pip install "distribute == 0.6.36"
just before this one (at the end)
buildout -N
* Run install script
su groupserver
cd ~/groupserver
./gs_install_ubuntu.sh
(Take a moment)
* If problem occure during install
Before re-runing install, switch to system postgres user and delete created
databases and users :
sudo -u postgres
dropdb groupserver
dropdb groupserverzodb
dropuser gsadmin
dropuser gszodbadmin
You may also need to delete *.cfg files in /home/groupserver/groupserver/var
* Try groupserver
su groupserver
cd ~
./bin/instance fg
You should connect to public web gui using port 8080 :
http://groups.domain.com:8080
And Zope manager :
http://zmi.groups.domain.com:8080/manage
Ctrl+C to stop groupserver
* Configure apache proxy
Create apache VirtualHost :
nano /etc/apache2/sites-available/groups.domain.com
<VirtualHost *:80>
ServerAdmin <email obscured>
ServerName groups.domain.com
RewriteEngine on
RewriteRule ^/(.*)
http://groups.domain.com:8080/groupserver/Content/initial_site/VirtualHostBase/http/%{HTTP_HOST}
[L,P]
ProxyVia On
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel info
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
cd /etc/apache2/sites-enabled
ln -s 100-groups.domain.com ../sites-available/groups.domain.com
a2enmod rewrite proxy
service apache2 restart
* Try groupserver
You should connect to public web gui using port 80 :
http://groups.domain.com
And Zope manager using 8080:
http://zmi.groups.domain.com:8080/manage
* Configure postfix
Run
dpkg-reconfigure postfix
Choose "Internet site" and answer to questions
Whe mydestination is asked remove $myhostname
Edit postfix main.cf config file :
nano /etc/postfix/main.cf
Add hash:/etc/postfix/groupserver.aliases to alias_maps and alias_database
(comma as separator)
Add hash:/etc/postfix/groupserver.virtual to virtual_alias_maps
Add the line smtpd_authorized_verp_clients = 127.0.0.1, xxx.xxx.xxx.xxx (host
public ip)
As root copy some files generated by groupserver install process :
cd /home/groupserver
cp postfix_config/groupserver.* /etc/postfix
Patch a file
nano /etc/postfix/groupserver.virtual
Add @localhost after groupserver-automagic:
@groups.domain.com groupserver-automagic@localhost
Generate postfix hashes :
postmap /etc/postfix/groupserver.virtual
postalias /etc/postfix/groupserver.aliases
service postfix restart
* Try postfix :
Use GUI to create group, join users, send message
Use mail client to send a mail to your group
* Daemonize and run at boot :
nano /etc/init.d/groupserver
Past this : http://pastebin.com/R0RYmEh9
You may edit this file to change path where you put groupserver
chmod a+x /etc/init.d/groupserver
Try it :
service groupserver start
service groupserver stop
Add to system boot :
update-rc.d groupserver defaults