Installing and Hacking dadaIMC

For my own benefit, and hopefully the benefit of others, this is a quick and dirty summary of how to intall and hack dadaIMC.

The configuration we will build will strive to be as generic and neutral as possible, so it may coexist with other setups in the greatest number of environments (Slackware, Red Hat, Debian, Darwin, BSD/OS, Solaris, etc.). Some of the configure options during the build process are specific to modern GNU/Linux or POSIX-compliant systems (threading, shared libraries, particular options and/or features, etc.); if your environment is different, I'm assuming that you're smart enough to consult the software's documentation and that you're accustomed enough to your environment to not have to rely 100% on the general process I outline below. The environment we will build won't even be specific to dadaIMC, so as to allow us to easily set up and evaluate other CMSes (content management systems) and OPSes (open publishing systems) along side dadaIMC.

This lil' tutorial will assume you're building everything as a normal user, and that you wish for everything to be installed into the /opt directory.

Building the Prerequisite Software

Creating the build environment

$ mkdir ~/src
$ cd ~/src

Getting, building, and installing OpenSSL 0.9.7

$ wget http://www.openssl.org/source/openssl-0.9.7.tar.gz
$ tar zxvf openssl-0.9.7.tar.gz && rm -f openssl-0.9.7.tar.gz
$ cd openssl-0.9.7/
$ ./config --openssldir=/opt/openssl threads zlib-dynamic shared
$ make && make test && su -c 'make install'
$ cd -

Now that you've got the newest OpenSSL built under /opt/openssl, you'll want to configure your system to start usin' it. You probably won't be able to uninstall your old OpenSSL library, as a few of your applications are probably built against it (unless, of course, you want to recompile all those applications to use the new library; but I'll leave those details up to you).

Do the following to setup OpenSSL for use by other applications:

$ su -
# if [ -f /etc/ld.so.conf ]; then
    echo /opt/openssl/lib >> /etc/ld.so.conf && ldconfig
  else
    for i in $('ls' -1 /opt/openssl/lib); do
      ln -s /opt/openssl/lib/$i /usr/local/lib/$i
    done
    ldconfig
  fi
# for i in $('ls' -1 /opt/openssl/include); do
    ln -s /opt/openssl/include/$i /usr/local/include/$i
  done
# for i in $('ls' -1 /opt/openssl/bin); do
    ln -s /opt/openssl/bin/$i /usr/local/bin/$i
  done
# ^D

Some systems (e.g., RPM-based systems like Red Hat), OpenSSL's shared libraries libssl.so and libcrypto.so are linked as lib*.so.2 (or, sometimes, lib*.so.1). When you compile OpenSSL from source, they're linked as lib*.so.0, which has a lower major version number than what may already be on your system. If such is the case, cd into /usr/openssl/lib (or, depending upon your configuration, /usr/local/lib) and do an ln -s libssl.so.0.9.7 libssl.so.3 && ln -s libcrypto.so.0.9.7 libcrypto.so.3 && ldconfig.

Getting, building, and installing Perl 5.8.0

Perl isn't used specifically by dadaIMC, but it is a general tool used by several of the other components we'll be working with. It is also used by several popular CGI scripts, should you want to incorporate their functionality into the site.

$ wget http://cpan.org/src/stable.tar.gz
$ tar zxvf stable.tar.gz && rm -f stable.tar.gz
$ cd perl-5.8.0/
$ sh Configure -Dprefix=/opt/perl -Uinstallusrbinperl -Dusethreads \ 
               -Dusemorebits -Duseperlio -Duseshrplib
$ make && make test && su -c 'make install'
$ cd -

Now that you've got the newest Perl built under /opt/perl, you may want to replace the old Perl already on your system with this new installation of Perl. On my Red Hat 7.3 box, that equates to an rpm -e $(rpm -qa | grep ^perl) --nodeps. Or you can leave the previous version of Perl in place (which may be a better option for less experienced users), and have the two installations of Perl coexist. Assuming the old version of Perl is, say, 5.6.1 installed under /usr, you could do the following:

$ su -
# if [ ! -f /usr/bin/perl5.6.1 ]; then
    mv /usr/bin/perl /usr/bin/perl5.6.1
  fi
# for i in $('ls' -1 /opt/perl/bin); do
    rm -f /usr/bin/$i
    ln -s /opt/perl/bin/$i /usr/local/bin/$i
  done
# ^D

Getting, building, and installing Python 2.2.2

Python isn't used specifically by dadaIMC, but it is a general tool used by several of the other components we'll be working with. It is also used by several popular CGI scripts, should you want to incorporate their functionality into the site.

$ wget http://www.python.org/ftp/python/2.2.2/Python-2.2.2.tgz
$ tar zxvf Python-2.2.2.tgz && rm -f Python-2.2.2.tgz
$ cd Python-2.2.2/
$ ./configure --prefix=/opt/python --with-gcc
$ make && make test && su -c 'make install'
$ cd -

Getting, building, and installing Apache HTTP Server 2.0.43

$ wget http://www.apache.org/dist/httpd/httpd-2.0.43.tar.gz
$ tar zxvf httpd-2.0.43.tar.gz && rm -f httpd-2.0.43.tar.gz
$ cd httpd-2.0.43/
$ ./configure --prefix=/opt/apache --with-mpm=worker \ 
              --enable-mods-shared="all ext_filter deflate ssl" \ 
              --with-ssl=/opt/openssl
$ make && su -c 'make install'
$ cd -

Getting, building, and installing PostgreSQL 7.3.1

The reason for installing PostgreSQL is: it is one o' the two database servers used commonly by CMS/OPS software. If you wish to only play with dadaIMC, you don't necessarily need to install PostgreSQL.

$ # FIXME: haven't gotten to this part yet; just added it
$ #        install in /opt/postgresql

$ wget ftp://ftp.postgresql.org/pub/v7.3.1/postgresql-7.3.1.tar.gz

Getting, building, and installing MySQL 4.0.8

MySQL is currently the only database server supported by dadaIMC; however, I plan on porting dadaIMC to PostgreSQL. MySQL is only happy on certain compilers, so you'll likely need to check into the MySQL's specifics for your environment. Some systems (specifically, those running certain versions of GCC, etc.) might just want to download prebuilt binaries from MySQL AB.

$ # FIXME: haven't gotten to this part yet
$ #        install in /opt/mysql

Getting, building, and installing PHP 4.3.0

$ wget http://www.php.net/distributions/php-4.3.0.tar.bz2
$ tar jxvf php-4.3.0.tar.bz2 && rm -f php-4.3.0.tar.bz2
$ cd php-4.3.0/
$ # FIXME: haven't gotten to this part yet
$ cd -

Getting and installing dadaIMC 0.94

$ wget http://www.dadaimc.org/dadaIMC.0-94.tar.gz
$ su -c 'tar zxvf dadaIMC.0-94.tar.gz -C /opt' \ 
  && rm -f dadaIMC.0-94.tar.gz

Configuring the Software

Configuring Apache HTTP Server

$ # FIXME: I'm in the process of finishing this document.
$ #        I'm just saving.
Topic revision: r12 - 13 Jan 2003, DerekPMoore
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback