Installing OpenACS5 in MacOSX ----------------------------- ver 0.1, Svet Ivantchev, svet@efaber.net, 16 nov de 2003 ver 0.2, updated 21 nov 2003 Fink ---- If you don't have installed fink already install it from http://fink.sourceforge.net/. Then, use it to install readline: % fink install readline In my case this installed readline 4.3-5 and readline-shlibs 4.3-5 Actually using fink is not mandatory. If you prefer just install readline by hand but fink is very userful anyway :-). PostgreSQL ---------- Insalling PostgreSQL by hand: % tar zxvf ../postgresql-7.3.4.tar.gz % cd postgresql-7.3.4/ % ./configure --with-includes=/sw/include/ % make % sudo make install % sudo ranlib /usr/local/pgsql/lib/libpq.a Let create the master-user for PostgreSQL: % sudo niutil -create / /groups/postgres % sudo niutil -createprop / /groups/postgres gid 401 % sudo niutil -create / /users/postgres % sudo niutil -createprop / /users/postgres gid 401 % sudo niutil -createprop / /users/postgres uid 401 % sudo passwd postgres Prepara the diretory to be used for the database: % sudo mkdir /usr/local/pgsql/data % sudo chown postgres /usr/local/pgsql/data Now add /usr/local/pgsql/bin to your PATH. If you use the default tcsh use: % setenv PATH `echo $PATH`:/usr/local/pgsql/bin/ Now init the databse cluster for first time: % sudo -u postgres initdb --lc-collate=C -D /usr/local/pgsql/data Now, before starting PosgtreSQL I had to modify the configuration file: % sudo -u postgres vi /usr/local/pgsql/data/postgresql.conf ... at the end of the file find: --------------------------------------------------- LC_MESSAGES = 'es_ES' LC_MONETARY = 'es_ES' LC_NUMERIC = 'es_ES' LC_TIME = 'es_ES' --------------------------------------------------- and change all 'es_ES' to 'C': --------------------------------------------------- LC_MESSAGES = 'C' LC_MONETARY = 'C' LC_NUMERIC = 'C' LC_TIME = 'C' --------------------------------------------------- Start it: % sudo -u postgres /usr/local/pgsql/bin/postmaster -D /usr/local/pgsql/data From other shell: % sudo -u postgres createlang plpgsql template1 % sudo -u postgres createdb openacs % sudo -u postgres createuser openacs % sudo -u postgres psql openacs try: SELECT * from pg_language; So, Postgesql is o.k. Read Ref.1 about system tweaking. AOLserver --------- Using Mat Kovach's source distribution from http://openacs.org/doc/openacs-HEAD/individual-programs.html#source-aolserver % tar xzvf ../aolserver3.3oacs1.tar.gz % cd aolserver/ % vi aolserver/include/Makefile.global In the "Mac OS X" section: Add -flat_namespace to LDSO line: LDSO=$(LD) -bundle -undefined suppress -flat_namespace % ./conf-clean % sudo mkdir /usr/local/aolserver33 % sudo chown `whoami` /usr/local/aolserver33 % echo "/usr/local/aolserver33" >conf-inst % echo "make" >conf-make % setenv POSTGRES /usr/local/pgsql; ./conf This takes some time. To follow the progress, from other shell: % cd .../aolserver/log % tail -f aolserver.log % cp openacs/packages/acs-core-docs/www/files/nsd-postgres.txt /usr/local/aolserver33/bin/nsd-postgres % vi /usr/local/aolserver33/bin/nsd-postgres ... change /usr/local/aolserver/bin/nsd to /usr/local/aolserver33/bin/nsd % chmod 750 /usr/local/aolserver33/bin/nsd-postgres tDOM ---- Download tDOM from http://tdom.org/ % tar zxvf ../tDOM-0.7.8.tar.gz % cd tDOM-0.7.8/ % cd unix/ % vi CONFIG ... about line 28: uncomment and change to: -------------------------------------------------------- aolsrc="/Users/svet/OpenACS5/src/aolserver/aolserver" ../configure --enable-threads --disable-tdomalloc \ --with-aolserver=$aolsrc \ --with-tcl=$aolsrc/tcl8.3.2/unix -------------------------------------------------------- % sh CONFIG % vi Makefile ... search line starting with tdom_LIB_FILE (line 68) and change it from: tdom_LIB_FILE = libtdom0.7.8.dylib to: tdom_LIB_FILE = libtdom0.7.8.so ... search line starting with SHLIB_LD (line 159) and change it from: SHLIB_LD = cc -dynamiclib ${LDFLAGS} to: SHLIB_LD = cc -bundle -undefined suppress -flat_namespace ${LDFLAGS} % make % cp libtdom0.7.8.so /usr/local/aolserver33/bin/ % cd /usr/local/aolserver33/bin/ % ln -s libtdom0.7.8.so libtdom.so Now, let test the AOLserver. % vi /usr/local/aolserver33/sample-config.tcl ... line 35: add "set ext .so" % /usr/local/aolserver33/bin/nsd -f -t /usr/local/aolserver33/sample-config.tcl ... look for line Notice: nssock: listening on :8000 and try to connect to port 8000 from other terminal press Ctrl+C to stop it. OpenACS5 -------- % sudo niutil -create / /groups/web % sudo niutil -createprop / /groups/web gid 451 % sudo niutil -create / /users/service0 % sudo niutil -createprop / /users/service0 gid 451 % sudo niutil -createprop / /users/service0 uid 451 % sudo mkdir /web % sudo chgrp web /web % sudo chmod 770 /web % sudo chown `whoami` /web % cd /web % tar xzvf ~/OpenACS5/openacs-5.0.0a1.tar.gz % mv openacs service0 % sudo -u postgres createuser service0 % sudo -u service0 createdb -E UNICODE service0 % cd /web/service0/etc % vi config.tcl ... change serverroot and homedir ... change the stacksize to 131072 Start it for first time: % /usr/local/aolserver33/bin/nsd -f -u 451 -g 451 -t /web/service0/etc/config.tcl point your browser to http://127.0.0.1:8000 and follow the instructions After the installation and starting again the server there is one more thing to do which is specific to Mac OS X: log in as admin, go to http:///admin/site-map/ Look for "Set parameters" header below the table and then click on "Main Site" link. Now look for TmpDir parameter and change it from "/tmp" to "/var/tmp" Ref --- 1- http://borkware.com/rants/openacs/ 2- http://developer.apple.com/internet/macosx/postgres.html 3- http://openacs.org/doc/openacs-HEAD/aolserver.html Seee also: dotLRN installation log: http://www.efaber.net/personal/svet/OpenACS5-MacOSX-dotLRN-log.txt ................................................................................ Adding OpenFTS support: (unfinished) Go to PostgreSQL source dir and compile tsearch: % cd .../postgresql-7.3.4/contrib/tsearch/ % make % sudo make install Download OpenFTS (http://openacs.org/doc/openacs-HEAD/individual-programs.html#openfts-download) and uncompress it: % tar zxvf ../Search-OpenFTS-tcl-0.3.2.tar.gz % cd Search-OpenFTS-tcl-0.3.2/ % vi configure ... change Rhapsody to Darwin % ./configure --with-aolserver-src=/Users/svet/OpenACS5/src/aolserver/aolserver --with-tcl=/Users/svet/OpenACS5/src/aolserver/aolserver/tcl8.3.2/unix Edit the Makefiles as Stan indicates in his' post (Ref 1): ../parser/Makefile ../dict/Makefile ../dict/snowball/Makefile ../aolserver/Makefile % cd aolserver % make % cp nsfts.so /usr/local/aolserver33/bin/ % cd .. % cp -r pgsql_contrib_openfts ../postgresql-7.3.4/contrib % cd ../postgresql-7.3.4/contrib/pgsql_contrib_openfts/ % make % sudo make install % sudo -u service0 psql -f ~svet/OpenACS5/src/postgresql-7.3.4/contrib/tsearch/tsearch.sql service0 % sudo -u service0 psql -f ~svet/OpenACS5/src/postgresql-7.3.4/contrib/pgsql_contrib_openfts/openfts.sql service0 Now enable nsfts module: % vi /web/service0/etc/config.tcl ... uncomment nsfts line Start AOLserver as usual. Log in, go to "Package Manager", install "OpenFTS Driver 4.2", restart. Go to Site Map (/admin/site-map/), add folder, "openfts", "New", mount, OpenFTS Driver. parameters, in my case change to "/Users/svet/OpenACS5/src/Search-OpenFTS-tcl-0.3.2/" --- Site Map, add folder, "search", "New". new application, type "search", select "Search", "New" Restart Follow the instructions from the end of http://openacs.org/doc/openacs-HEAD/install-full-text-search.html#install-openfts Ref: http://openacs.org/forums/message-view?message_id=135574 ................................................................................