Open Xchange

From Objectif Client Inc
Jump to navigation Jump to search

Installation

Web site Open-Xchange

Package Installation

  • Create a file "ox.list" into /etc/apt/sources.list.d/cat
  • Please validate and adjust Ubuntu version on the opensuse.org directory
echo "deb http://download.opensuse.org/repositories/server:/OX:/ox6.22:/frontend/xUbuntu_14.10/ /" > /etc/apt/sources.list.d/ox.list
echo "deb http://download.opensuse.org/repositories/server:/OX:/appsuite:/backend/xUbuntu_14.10/ /" >>  /etc/apt/sources.list.d/ox.list
  • Refresh package list
apt-get update
  • Install packages
 apt-get install open-xchange open-xchange-admin open-xchange-admin-soap open-xchange-authentication-database \
open-xchange-authorization-standard open-xchange-calendar-printing open-xchange-core open-xchange-dav open-xchange-drive open-xchange-freebusy \
open-xchange-grizzly open-xchange-gui open-xchange-gui-l10n open-xchange-gui-l10n-en-us open-xchange-gui-l10n-fr-ca open-xchange-gui-l10n-fr-fr \
open-xchange-gui-lang-fr-ca open-xchange-gui-loading-theme-default open-xchange-gui-login-theme-default \
open-xchange-gui-mail-accounts-plugin open-xchange-gui-mobile-redirect-plugin open-xchange-gui-themes-default \
open-xchange-imap open-xchange-indexing open-xchange-l10n-fr-ca open-xchange-mailfilter open-xchange-manage-group-resource open-xchange-messaging \
open-xchange-mobile-config open-xchange-oauth open-xchange-online-help-fr-fr open-xchange-osgi open-xchange-pop3 open-xchange-publish \
open-xchange-push-mailnotify open-xchange-smtp open-xchange-soap-cxf open-xchange-system open-xchange-themes-default \
open-xchange-unifiedinbox open-xchange-unifiedmail open-xchange-upsell-multiple-gui open-xchange-xerces-sun


Setup

Preparation

  • Add Open-Xchange in the path and open a session (or reopen)
echo PATH=$PATH:/opt/open-xchange/sbin/ >> ~/.bashrc && . ~/.bashrc
  • Remove localhost root password.
mysqladmin -u root -pCurrent_Password password ''


Create configdb Database

  • Init configuration database
/opt/open-xchange/sbin/initconfigdb --configdb-dbname=oxdata --configdb-host=localhost --configdb-port=3306 --configdb-user=openxchange --configdb-pass=openxchange_password -a --mysql-root-passwd=root_password
  • Add Basic Configuration
MAX_MEMORY_FOR_JAVAVM=1024
/opt/open-xchange/sbin/oxinstaller --no-license \
--servername=oxserver --configdb-pass=openxchange_password \
--master-pass=admin_master_password --network-listener-host=localhost --servermemory $MAX_MEMORY_FOR_JAVAVM
  • Adjust Mail server properties
vi /opt/open-xchange/etc/mail.properties
  • Since Java8 option MaxPermSize is not supported and you need to remove that option from "/opt/open-xchange/etc/ox-scriptconf.sh"

-- Replace

JAVA_XTRAOPTS="-Dsun.net.inetaddr.ttl=3600 -Dnetworkaddress.cache.ttl=3600 -Dnetworkaddress.cache.negative.ttl=10 -Dlogback.threadlocal.put.duplicate=false -server -Djava.awt.headless=true -XX:MaxPermSize=256m -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:NewRatio=3 -XX:+UseTLAB -XX:+DisableExplicitGC -Dosgi.compatibility.bootdelegation=false -XX:-OmitStackTraceInFastThrow -Xmx1024m"

-- by

 
JAVA_XTRAOPTS="-Dsun.net.inetaddr.ttl=3600 -Dnetworkaddress.cache.ttl=3600 -Dnetworkaddress.cache.negative.ttl=10 -Dlogback.threadlocal.put.duplicate=false -server -Djava.awt.headless=true -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:NewRatio=3 -XX:+UseTLAB -XX:+DisableExplicitGC -Dosgi.compatibility.bootdelegation=false -XX:-OmitStackTraceInFastThrow -Xmx1024m"
  • Restart Open-Xchange Service
service open-xchange restart
  • Validate if Open-Xchange is runnning
ps -aef | grep open-xchange

and

netstat -atpn | grep java

You should get something like

tcp6       0      0 127.0.0.1:8009          :::*                    LISTEN      11632/java      
tcp6       0      0 127.0.0.1:1099          :::*                    LISTEN      11632/java      
tcp6       0      0 127.0.0.1:9999          :::*                    LISTEN      11632/java      
tcp6       0      0 :::36697                :::*                    LISTEN      11632/java      
tcp6       0      0 127.0.0.1:5701          :::*                    LISTEN      11632/java 

Register Server

  • Register the local server
/opt/open-xchange/sbin/registerserver -n oxserver -A oxadminmaster -P admin_master_password


Setup File Repository

  • Create directory and adjust security
mkdir /var/opt/filestore
chown open-xchange:open-xchange /var/opt/filestore


  • Register Repository
/opt/open-xchange/sbin/registerfilestore -A oxadminmaster -P admin_master_password \
-t file:/var/opt/filestore -s 1000000


Register Groupware Database

Template:Anchor

/opt/open-xchange/sbin/registerdatabase -A oxadminmaster -P admin_master_password \
-n oxdatabase -p db_password -m true


Create context

/opt/open-xchange/sbin/createcontext -A oxadminmaster -P admin_master_password -c 1 \
-u oxadmin -d "Context Admin" -g Admin -s User -p admin_password -L defaultcontext \
-e oxadmin@example.com -q 1024 --access-combination-name=groupware_standard


Create Users

/opt/open-xchange/sbin/createuser -A oxadmin -P admin_password -c 1 -u nicolas -d "Nicolas Rollin" \
-g Nicolas -s Rollin -p password -e nicolas.rollin@objclt.ca \
--imaplogin nicolas --imapserver imap.objclt.ca --smtpserver smtp.objclt.ca

Apache Setup

  • Enable Apache module
a2enmod proxy proxy_http proxy_balancer expires deflate headers rewrite mime setenvif lbmethod_byrequests

Manage Users

Gui Interface

Peter’s OX Admin GUI

Connect with oxadminmaster

Command Line

Create user

/opt/open-xchange/sbin/createuser -c 1 -A oxadmin -P admin_password -u testuser -d "Test User" -g Test -s User -p secret -e testuser@example.com --imaplogin testuser --imapserver 127.0.0.1 --smtpserver 127.0.0.1 

Change user password

/opt/open-xchange# /opt/open-xchange/sbin/changeuser -c 1 -A oxadmin -P admin_password -u thomas -p 'user_password'

Lost of admin password

1- #  /etc/init.d/mysql stop
2- #  /etc/init.d/mysql start --skip-grant-tables --user=root
3- #  mysql -u root     (or mysql -u root -p   in case a password is needed)
4- >  use oxdatabase_6;  ( open exchange database)
5- # In another shell I used larsrohr's command echo -n "newpassword" | openssl dgst -sha1 -binary | openssl base64
6- copy into buffer the output
7- back in the mysql shell >  UPDATE user SET userPassword=('newhashhere') WHERE cid=1 and id=2;
8- >  FLUSH PRIVILEGES;
9- >  quit

TroubleShooting

Missing Constraint

/var/log/open-xchange/open-xchange-osgi.log

  • Message "!MESSAGE Startup error"
  • "The System Bundle could not be resolved: Missing Constraint: Bundle-RequiredExecutionEnvironment: J2SE-1.5"
    1. Install JDK 8 from Oracle
    2. Force the usage of this new Jdk by updating /opt/open-xchange/lib/oxfunctions.sh

Before

set +e

JAVA_BIN=

ox_set_JAVA_BIN() {
    JAVA_BIN=$(which java)

    if [ -z "$JAVA_BIN" ]; then
        local jb=$JAVA_HOME/bin/java
        if [ -x $jb ]; then
            JAVA_BIN=$jb
        fi
    fi

After

set +e

JAVA_BIN=

ox_set_JAVA_BIN() {
    JAVA_BIN=$(which java)

###Nr001 Begin
    JAVA_BIN=/opt/java/jdk1.8.0_91/bin/java
###Nr001 End

    if [ -z "$JAVA_BIN" ]; then
        local jb=$JAVA_HOME/bin/java
        if [ -x $jb ]; then
            JAVA_BIN=$jb
        fi
    fi