SourceForge: opengroupware/opengroupware: opengroupware/INSTALL@19965d54963f
opengroupware/INSTALL
author Sebastian Reitenbach <sebastia@l00-bugdead-prods.de>
Wed Feb 01 12:58:12 2012 +0100 (3 months ago)
changeset 71 19965d54963f
parent 69 8c998b951e4b
permissions -rw-r--r--
we are opengroupware, not opengroupware.org anymore
     1 OpenGroupware.org Installation Guide
     2 ====================================
     3 
     4 
     5 Prerequisites
     6 =============
     7 
     8 - SOPE >= 1.3.11
     9   - download from: http://www.sogo.nu/english/downloads/backend.html
    10 - gnustep-make >= 2.6.1
    11   - download from: ftp://ftp.gnustep/org/pub/gnustep/core
    12 - libobjc2 (optional)
    13   - download from: http://download.gna.org/gnustep/
    14 - gnustep-base
    15   - when compiling with gcc < 4.6 or clang then gnustep-base >= 1.22.1
    16   - when compiling with gcc >= 4.6, then from svn
    17   - download from: ftp://ftp.gnustep/org/pub/gnustep/core
    18 - dependent packages: The names are from OpenSUSE 12.1, and may differ
    19   depending on your Linux distribution
    20 - libxml2/libxml2-devel
    21 - openldap2/openldap2-devel
    22 - postgresql/postgresql-devel
    23 - libffi/libffi-devel
    24 - apache2/apache2-devel and corresponding devel packages
    25 - libapr1/libapr1-devel
    26 
    27 Installing dependencies
    28 =======================
    29 If you OS/Distribution has packages of the required dependencies, then
    30 its recommended to install those. 
    31 Otherwise install the dependencies, following their installation instructions
    32 in the following order:
    33 
    34 libxml2/openldap2/postgresql
    35 libobjc2 (optional)
    36 gnustep-make
    37 gnustep-base
    38 SOPE
    39 
    40 Building
    41 ========
    42 
    43 If the prerequisites are properly fulfilled, building OpenGroupware.org is
    44 as simple as:
    45 
    46   $ ./configure
    47   $ make
    48 
    49 Installation should only take a couple of minutes/seconds, depending on the speed
    50 of your machine.
    51 
    52 In case make fails while building mod_ngobjweb, then its likely that it cannot
    53 find the apr-utils. You can specify those as parameters, for example on OpenSUSE:
    54   $ make APXS=/usr/bin/apr-1-config APXS=/usr/sbin/apxs2
    55 
    56 Installation:
    57 
    58   $ sudo make install
    59 
    60 Configuration
    61 =============
    62 
    63 TODO: write configuration guide for OGo
    64 
    65 - mod_ngobjweb setup
    66 - init script
    67 - starting OGo on the shell
    68 - ZideStore
    69 
    70 database
    71 ********
    72   su - postgres
    73   createuser OGo
    74   createdb   OGo
    75 
    76   psql -h localhost OGo OGo (must work)
    77     => if this doesn't work, you need to allow TCP/IP in pg_hba.conf, eg:
    78        "host OGo OGo 127.0.0.1 255.255.255.255 trust"
    79        (you should use appropriate password auth in deployments!)
    80 
    81   > ALTER ROLE "OGo" WITH PASSWORD  'abc123';
    82 
    83   cd Database/PostgreSQL/
    84   psql -h localhost OGo OGo < pg-build-schema.psql
    85 
    86 OGo system user
    87 ===============
    88 You should not run OGo as root, therefore create a system user:
    89 
    90  sudo groupadd ogo
    91  sudo useradd -d /var/opengroupware -g ogo ogo
    92  sudo mkdir /var/opengroupware
    93  sudo mkdir /var/log/opengroupware
    94  sudo chown ogo:ogo /var/opengroupware /var/log/opengroupware
    95 
    96 Apache Configuration
    97 ====================
    98 
    99 You have to edit your httpd.conf file, or whatever is appropriate for
   100 your OS/Distribution.
   101 
   102 Load the ngobjweb module:
   103 LoadModule ngobjweb_module    /usr/lib/apache/modules/mod_ngobjweb.so
   104 
   105 Then you can add the following to your VirtualHost entry:
   106 
   107 <IfModule ngobjweb_module.c>
   108   <LocationMatch "^/OpenGroupware55*">
   109     SetHandler NONE
   110   </LocationMatch>
   111   <LocationMatch "^/OpenGroupware*">
   112     SetAppPort 20000
   113     SetHandler ngobjweb-adaptor
   114   </LocationMatch>
   115   <LocationMatch ^/zidestore/*>
   116     SetAppPort 21000
   117     SetHandler ngobjweb-adaptor
   118   </LocationMatch>
   119   <LocationMatch ^/xmlrpcd/*>
   120     SetAppPort 22000
   121     SetHandler ngobjweb-adaptor
   122   </LocationMatch>
   123 </IfModule>
   124 
   125 Configuring OGo
   126 ===============
   127 
   128   as ogo system user do:
   129   $ defaults write ogo-webui WOPidFile /var/opengroupware/ogo-webui.pid
   130   $ defaults write ogo-zidestore WOPidFile /var/opengroupware/ogo-zidestore.pid
   131   $ defaults write ogo-xmlrpcd WOPidFile /var/opengroupware/ogo-xmlrpcd.pid
   132   $ defaults write ogo-webui WOLogFile /var/log/opengroupware/ogo-webui.log
   133   $ defaults write ogo-zidestore WOLogFile /var/log/opengroupware/ogo-zidestore.log
   134   $ defaults write ogo-xmlrpcd WOLogFile /var/log/opengroupware/ogo-xmlrpcd.log
   135   $ defaults write ogo-webui WOPort 20000
   136   $ defaults write ogo-zidestore WOPort 21000
   137   $ defaults write ogo-xmlrpcd WOPort 22000
   138   $ defaults write NSGlobalDomain imap_host 127.0.0.1
   139   $ defaults write NSGlobalDomain UseSkyrixLoginForImap YES
   140   $ defaults write NSGlobalDomain LDAPInitialBindSpecific YES
   141   $ defaults write NSGlobalDomain LDAPLoginAttributeName uid
   142   $ defaults write NSGlobalDomain LSAuthLDAPServerPort 389
   143   $ defaults write NSGlobalDomain LSAuthLDAPServerRoot ou=People,dc=MyDomain
   144   $ defaults write NSGlobalDomain LSAuthLDAPServer 127.0.0.1
   145   $ defaults write NSGlobalDomain LSConnectionDictionary \
   146     '{userName="OGo"; databaseName="OGo";hostName="localhost";password="abc123";}'
   147 
   148   For more information consult the WMOGAG (WiteMice OGo Admin Guide).
   149 
   150 Starting OGo
   151 ============
   152 
   153  $ sudo su - ogo
   154  $ /usr/local/sbin/ogo-webui
   155  $ /usr/local/sbin/ogo-zidestore
   156  $ /usr/local/sbin/ogo-xmlrpcd 
   157 
   158 init-scripts
   159 ============
   160 
   161 Init-Scripts depend on the actual platform, so you need to
   162 come up with an own. The templates used for the RPM packages can
   163 be found in:
   164   maintenance/rpm_buildenvironment/initscript_templates/
   165 
   166 Upgrading from older versions to 5.5
   167 ====================================
   168   NOTE: In case you had the commercial snsd running with old version
   169         of OGo, this will not work anymore. There may be a replacement
   170         in the future, but for now it is not supported.
   171 
   172   If you are upgrading, removing defaults should work fine if you use
   173   defaults values, thats is:
   174     defaults delete NSGlobalDomain LSModelName
   175     defaults delete NSGlobalDomain NGBundlePath
   176     defaults delete NSGlobalDomain LSAdaptor
   177 
   178   Since the names of the binaries do not have the version number
   179   included anymore, you may have to change the defaults to match
   180   the new names of the binaries.
   181 
   182 
   183 Documentation for new features
   184 ==============================
   185 
   186 Location based services
   187 =======================
   188 
   189 Show addresses on Google Maps
   190 +++++++++++++++++++++++++++++
   191 
   192 You can now show an address, or multiple addresses with markers on Google Maps, 
   193 via the Google Maps API. To do so, you have to register an KEY for your domain.
   194 You have to register your domain here: http://code.google.com/apis/maps/signup.html
   195 
   196 defaults write NSGlobalDomaon GoogleMapsURL http://maps.google.com/maps?file=api&v=2&key=<YOUR KEY GOES HERE>
   197 
   198 You have to define a center for the map, when multiple markers are shown:
   199 defaults write NSGLobalDomain NSGlobalDomain GoogleMapsCenterCoordinates 52.000,12.0000
   200 
   201 For each address shown on the MAP, OGo will create a little XML file, which is cached on the
   202 server. The web server should be able to read that directory, and the OGo system user
   203 should be able to write to that directory:
   204 defaults write NSGlobalDomain GoogleMapsXMLCoordinatesWebBaseURL https://www.l00-bugdead-prods.de/coordinates
   205 defaults write NSGlobalDomain GoogleMapsXMLCoordinatesFileBaseURL /var/www/htdocs/coordinates
   206 
   207 To be able to access location based services that needs the coordinates. OGo must be able to
   208 resolve the coordinates from the addresses via the Google Geocoding API.
   209 You have to define the following default:
   210 
   211 defaults write NSGlobalDomain GoogleGeocodingURL http://maps.google.com/maps/geo?q=$STREET$+$CITY$+$ZIP$+$COUNTRY$&output=csv&key=<YOUR KEY GOES HERE>
   212 
   213 To access location based services related to an address, you have to define the OGoAddressMapLinks default.
   214 Take this as an example:
   215 
   216 NSGlobalDomain OGoAddressMapLinks '{
   217     GeoCaching = {
   218         UseGoogleMapsAPI = YES;
   219         icon = "GeoCaching.png";
   220         target = "_new";
   221         url = "http://www.geocaching.com/seek/nearest.aspx?origin_lat=$LATITUDE$&origin_long=$LONGITUDE$";
   222     };
   223     GermanWeatherService = {
   224         UseGoogleMapsAPI = NO;
   225         icon = "Wetter.png";
   226         target = "_new";
   227         url = "http://wetter.rtl.de/shared/php/search_plz_ort.php?in=$ZIP$";
   228     };
   229     GoogleMaps = {
   230         UseGoogleMapsAPI = NO;
   231         icon = "GoogleMaps.png";
   232         target = "_new";
   233         url = "http://maps.google.de/maps?f=q&output=html&q=$COUNTRY$+$ZIP$+$CITY$+$STREET$&btnG=Maps-Suche";
   234     };
   235     OpenStreetMap = {
   236         UseGoogleMapsAPI = YES;
   237         icon = "OpenStreetMap.png";
   238         target = "_new";
   239         url = "http://www.openstreetmap.org/?lat=$LATITUDE$&lon=$LONGITUDE$&zoom=15&layers=B00FF";
   240     };
   241 }'
   242 
   243 Each entry in the list defines a location based service, the parameters are as follows:
   244  * UseGoogleMapsAPI: YES/NO - set to YES in case LAT/LON needs to be used to access the service, otherwise NO
   245  * icon: The name of the icon to be used for this service
   246    * a copy of the icon has to be placed into each Themes icon directory
   247  * target: the name of the new window/tab that will be opened
   248  * url: the URL to access the service
   249 
   250 
   251 CTI Integration with Asterisk
   252 =============================
   253 
   254 It is now possible to trigger phone calls via Asterisk PBX.
   255 
   256 Since the CTI integration is a plugin, there can be multiple dialers in the future, so for
   257 now you have to choose the AsteriskDialer:
   258 defaults write NSGlobalDomain CTIDialer AsteriskDialer
   259 
   260 In case you need to suffix the number to dial with something you can use the 
   261 CTIPersonTelephoneFieldSuffix, otherwise, leave it empty:
   262 defaults write NSGlobalDomain CTIPersonTelephoneFieldSuffix ''
   263 
   264 To define, weather your phones are IAX2, SIP or others, you have to specify 
   265 this in the CTIPersonTelephoneFieldPrefix default. This limits the group
   266 of possible telephones to one client type, but will possibly change in the
   267 future:
   268 defaults write NSGlobalDomain CTIPersonTelephoneFieldPrefix 'IAX2/'
   269 
   270 In case you need to add a 0 to dial out, you have to configure the following:
   271 defaults write NSGlobalDomain AsteriskDialOutPrefix '0'
   272 
   273 In case you need to differentiate when between outgoing and internal calls, i.e. 
   274 when you need to prefix the call with 0, you have to specify the lenght of internal
   275 extensions:
   276 
   277 defaults write NSGlobalDomain AsteriskInternalExtensionLength 4
   278 
   279 You have to specify the outgoing and internal contexts:
   280 defaults write NSGlobalDomain AsteriskOutgoingContext default
   281 defaults write NSGlobalDomain AsteriskInternalContext internal
   282 
   283 You have to set the CTIPreferTelephoneField default to YES when you want to use
   284 the numbers stored in a telephone field. Otherwise you have to define a mapping
   285 of computers IP addresses with telephones.
   286 defaults write NSGlobalDomain CTIPreferTelephoneField YES
   287 
   288 You have to define the telephone field you want to use:
   289 defaults write CTIPersonTelephoneField 04_tel_ext
   290 
   291 In case you chose a non standard telephone field, you have to define the 
   292 chosen telephone field in the LSTeleType default for the Person:
   293 
   294 NSGlobalDomain LSTeleType '{
   295     Enterprise = (
   296         "01_tel",
   297         "02_tel",
   298         "10_fax",
   299         "80_tel_parts",
   300         "81_fax_parts"
   301     );
   302     Person = (
   303         "01_tel",
   304         "02_tel",
   305         "03_tel_funk",
   306         "04_tel_ext",
   307         "05_tel_private",
   308         "10_fax",
   309         "15_fax_private"
   310     );
   311 }'
   312 
   313 The connection to the asterisk is configured using the AsteriskCommands and 
   314 the OGoAsteriskConnectionDictionary defaults:
   315 
   316 NSGlobalDomain OGoAsteriskConnectionDictionary '{
   317     hostName = "127.0.0.1";
   318     port = 5038;
   319 }'
   320 
   321 NSGlobalDomain AsteriskCommands '{
   322     Login = {
   323         Action = login;
   324         ExpectedResult = Success;
   325         Parameters = {
   326             Events = off;
   327             Secret = <YOUR AGI PASSWORD GOES HERE>;
   328             Username = <YOUR AGI USERNAME GOES HERE>;
   329         };
   330     };
   331     Originate = {
   332         Action = originate;
   333         ExpectedResult = Success;
   334         Parameters = {
   335             Channel = "";
   336             Context = default;
   337             Exten = "";
   338             Priority = 1;
   339             Timeout = 30000;
   340         };
   341     };
   342     Ping = {
   343         Action = ping;
   344         ExpectedResult = Pong;
   345     };
   346 }'
   347