[OGo-MacOSX] Up and running on MacOSX !!
Alexander Lamb
macosx@opengroupware.org
Fri, 21 Apr 2006 16:25:18 +0200
Well,
The last thing that didn't work was the classical "images don't show".
I tried to add an Alias line in my httpd.conf file:
Alias /OpenGroupware11.woa/WebServerResources/ "/GNUstep/
WebServerResources/"
However this didn't make it. Maybe because /GNUstep/
WebServerResources/ is already a link?
Nervemind, I simply created an OpenGrouware11.woa directory in /
Library/WebServer/Documents and linked to the WebServerResources in
my GNUstep tree. I hope there is nothing else to do.
Anyhow, I updated my small documentation to reflect this. It is at
the end of this email.
Now I am going to start testing the functionnalities and post bugs if
I find some!
Thanks,
Alex
====
OpenGroupware MacOSX Install:
1: Postgres install and initial config
======================================
Download it from www.entropy.ch
It's easy, it's a package.
Then follow instructions on site to create a postgres user and start
the database server.
You can also install a package which shall create a StartupItem in /
Library to start postgres upon startup of the system.
Now, you need to create a database for OGo. If you create a database
called OGo with a user OGo and no password, the OGo server will login
automatically without needing any additionnal setup.
First become postgres (if you are continuing from the steps described
on the entropy site, you are probably already postgres):
su - postgres
Then create a OGo user:
/usr/local/bin/createuser OGo
(answer no to the three questions: is a super user, can create
databases, can create roles)
Finally create the database (named OGo with owner OGo):
/usr/local/bin/createdb -O OGo OGo
To check the database exists, you can simply connect to it:
/usr/local/bin/psql OGo
If you are doing this from your postgres account (suggested) you will
be a superuser for this database and see the following prompt:
OGo=#
You can quit typing "\q"
Now exit from your postgres account:
exit
And try to connect again to the database, but this time you will need
to identify yourself:
/usr/local/bin/psql -U OGo
No password is needed (we didn't set one on purpose) so you will see
the following prompt:
OGo=>
Quit by typing "\q"
2: Create a workspace and download the source for SOPE and OGo
==============================================================
For example create : $HOME/_Workspace
Then get the SOPE package:
for example, the latest release of SOPE (as of 19th of april 2006)
svn co http://svn.opengroupware.org/SOPE/releases/4.5.6-morecore/
$HOME/_Workspace/SOPE-4.5.6
and the latest release of OGo
svn co http://svn.opengroupware.org/OpenGroupware.org/releases/1.1.3-
moveon/ $HOME/_Workspace/OGo-1.1.3
4: Compile the source
=====================
Although the distribution contains xcode projects, in order to
compile and run OGo, you need to compile it in the GNUstep way. This
will ensure the libraries are compiled and installed in the correct
place for OGo.
4.1: Preparing the make environment
===================================
There are two things important here. The first is to decide where the
GNUstep directory is going to be installed. You could put it in your
home but since it will be used for libraries, etc... I recommend
simply puting at the root of your disk (like /opt or /usr). The
second important thing is to specify apple-apple-nil for the library-
combo option. This will indicate you are using the Cocoa libraries
instead of the GNUstep libraries for a certain number of foundation
functions.
So, from your SOPE directory:
cd gnustep-make
./configure --prefix=/GNUstep \
--without-system-root \
--with-network-root=/GNUstep \
--with-local-root=/GNUstep \
--with-user-root=/GNUstep \
--with-library-combo=apple-apple-nil
Now you can build your GNUstep environment:
make install
You can see a /GNUstep directory at the root of your disk.
Now, run:
source /GNUstep/Library/Makefiles/GNUstep.sh
(assuming you put GNUstep at the root of your disk).
In order to have environment variables correctly set, it is a good
idea to add that line to your .bashrc file in your home directory (or
in any home which might have to compile or run OGo).
4.2: Compile and install SOPE
=============================
First go to the SOPE directory.
Then run configure:
./configure --disable-strip --enable-debug --with-gnustep
Then make:
make all
Then make install (if you are installing in the GNUstep tree you
created yourself, you shouldn't need to sudo):
make install
The install will add (in your GNUstep tree):
Library/GDLAdaptors-4.5/...
Library/SaxDrivers-4.5/...
Library/SaxMappings/...
Library/SoProducts-4.5/...
Library/WOxElemBuilders-4.5/...
Library/Headers/manydirectoriesfullofheaders...
Library/Libraries/manylibraries...
Library/Libraries/Resources/NGObjWeb/...
Library/Makefiles/woapp.make
Library/Makefiles/wobundle.make
Library/Makefiles/Additional/ngobjweb.make
Library/Tools/connect-EOAdaptor
Library/Tools/domxml
Library/Tools/gcs_cat
Library/Tools/gcs_gensql
Library/Tools/gcs_ls
Library/Tools/gcs_mkdir
Library/Tools/gcs_recreatequick
Library/Tools/ldap2dsml
Library/Tools/ldapchkpwd
Library/Tools/ldapls
Library/Tools/load-EOAdaptor
Library/Tools/rss2plist1
Library/Tools/rss2plist2
Library/Tools/rssparse
Library/Tools/saxxml
Library/Tools/sope-4.5
Library/Tools/testqp
Library/Tools/wod
Library/Tools/xmln
Library/Tools/xmlrpc_call
4.3: Compile and install OGo
============================
First go to the OGo directory.
Then run configure:
./configure --disable-strip --enable-debug --with-gnustep
Then make:
make all
You might see some warnings such as
Linking bundle PrefsUI ...
/usr/bin/ld: warning can't open dynamic library:
libLSFoundation_d.dylib.5.3 referenced from: ../ZSBackend/./
shared_debug_obj/libZSBackend_d.dylib (checking for undefined symbols
may be affected) (No such file or directory, errno = 2)
/usr/bin/ld: warning can't open dynamic library: libNGLdap_d.dylib.
4.5 referenced from: ../ZSBackend/./shared_debug_obj/
libZSBackend_d.dylib (checking for undefined symbols may be affected)
(No such file or directory, errno = 2)
or
Linking bundle LSAddress ...
/usr/bin/ld: warning can't open dynamic library: libNGiCal_d.dylib.
4.5 referenced from: ././shared_debug_obj/libLSAddress_d.dylib
(checking for undefined symbols may be affected) (No such file or
directory, errno = 2)
But it doesn't seem to be important...
Then install:
make install
The install process moved some files to your GNUstep tree:
OpenGroupware.org-1.1/...
Library/Headers/LSFoundation/...
Library/Headers/OGoAccounts/...
Library/Headers/OGoBase/...
Library/Headers/OGoContacts/...
Library/Headers/OGoDatabaseProject/...
Library/Headers/OGoDocuments/...
Library/Headers/OGoFileSystemProject/...
Library/Headers/OGoFoundation/...
Library/Headers/OGoJobs/...
Library/Headers/OGoProject/...
Library/Headers/OGoRawDatabase/...
Library/Headers/OGoScheduler/...
Library/Headers/OGoSchedulerTools/...
Library/Headers/OGoWebMail/...
Library/Libraries/...
Library/Libraries/Resources/OGoScheduler/...
Tools/load-LSModel
Tools/ogo-webui-1.1
5: Create the OGo database schema
=================================
So, now everything is in place, we can create the Postgres database
schema.
Again become a postgres user:
su - postgres
Then go to the directory containing the scripts (in the OGo source
tree):
cd the_path_to_ogo/Database/PostgreSQL
Connect to the database OGo as user OGo and run the script:
/usr/local/bin/psql -h localhost OGo OGo < pg-build-schema.psql
6: Enable OGo to find its resources
===================================
From the command line (as usuall):
pushd $GNUSTEP_USER_ROOT
ln -s the_path_to_the_ogo_sources/OGo-1.1.3/WebUI/Resources .
(don't forget the final "." and don't add a trailing "/" to Resources)
ln -s the_path_to_the_ogo_sources/OGo-1.1.3/Themes/WebServerResources .
ln -s the_path_to_the_ogo_sources/_Workspace/OGo-1.1.3/WebUI/
Templates Library/OpenGroupware.org-1.1/Templates
You can now see a in your GNUstep root, a link to Resources, another
one to WebServerResources and one to Templates in Library/
OpenGroupware.org-1.1
7: Build the Apache adaptor
===========================
The adaptor is in your SOPE source:
cd path_to_sope/SOPE-4.5/sope-appserver/mod_ngobjweb
You will need to edit the GNUMakeFile (make a backup first) and
comment out the following lines:
# lowercase are commandline args (eg make apxs=/usr/bin/apxs)
#ifneq ($(apxs),no)
#ifneq ($(apxs),yes)
#ifneq ($(apxs),)
#APXS=$(apxs)
#else
#APXS=$(shell which apxs 2>/dev/null)
#endif
#else
#APXS=$(shell which apxs 2>/dev/null)
#endif
#else
#APXS=
#endif
# lowercase are commandline args (eg make apr=/usr/bin/apr)
#ifneq ($(apr),no)
#ifneq ($(apr),yes)
#ifneq ($(apr),)
#APR=$(apr)
#else
#APR=$(shell which apr-config 2>/dev/null)
#endif
#else
#APR=$(shell which apr-config 2>/dev/null)
#endif
#else
#APR=
#endif
#ifeq ($(APXS),)
#APXS=$(shell which apxs2 2>/dev/null)
#ifeq ($(APXS),)
#APXS = $(APACHE)/sbin/apxs2
#endif
#endif
Then build the adaptor:
make
It should create (after a few warnings) a file called mod_ngobjweb.so
You need to copy it into the modules directory for Apache:
sudo cp mod_ngobjweb.so /usr/libexec/httpd
Then modify your httpd.conf file to make Apache load the module.
It is located in /etc/httpd
After the lines loading other modules, add:
LoadModule ngobjweb_module libexec/httpd/mod_ngobjweb.so
Same after the line adding the .c files:
AddModule ngobjweb_module.c
In order to have the module redirect calls correctly, you need to add
this to the end of the httpd.conf file:
<LocationMatch "^/OpenGroupware*">
SetHandler ngobjweb-adaptor
SetAppPort 20000
</LocationMatch>
8: Set some defaults
====================
The server needs to know where to find bundles.
Type when logged in as the user starting the server:
Defaults write NSGlobalDomain NGBundlePath \
'"/GNUstep/Library/OpenGroupware.org-1.1/Commands:/GNUstep/Library/
OpenGroupware.org-1.1/DataSources:/GNUstep/Library/
OpenGroupware.org-1.1/WebUI:/GNUstep/Library/OpenGroupware.org-1.1"'
Same for the images, so again from the command line:
ln -s /GNUstep/WebServerResources/ /Library/WebServer/Documents/
OpenGroupware11.woa/WebServerResources
9: Start the server!
====================
Make sure you stoped and started the Apache server (simplest through
the preferences panel "Sharing").
Then start from a terminal your OGo server:
/GNUstep/Tools/ogo-webui-1.1 -WOPort 20000 -WOHttpAllowHost localhost
Here, the parameter to -WOHttpAllowHost can be a list (e.g.
'(localhost, machine.domain.com, 192.168.1.4)')
10: Connect to the server
========================
In a browser, type
http://localhost/OpenGroupware
====