Midgard Mind Reduction

2005-01-21 Midgard Mac OS X 10.3.7 installation

Preparations
************

Installed mysql via fink
$ export PATH=$PATH:/sw/bin
$ sudo /sw/bin/apt-get update
$ sudo /sw/bin/apt-get install mysql
$ sudo /sw/bin/apt-get install mysql12-dev

Installed expat via fink
$ sudo /sw/bin/apt-get install expat


Installed glib via fink
$ sudo /sw/bin/apt-get install glib
$ sudo /sw/bin/apt-get install glib2

Installed gettext via fink
$ sudo /sw/bin/apt-get install gettext

Instaalled dialog via fink
$ sudo /sw/bin/apt-get install dialog

After hours an hours of trying to figure everything out I found out that
there is a know issue with the Mac OS X packages not supporting dynamic libraries very well, so I compiled Apache2 from source and did the same thing with php.

Installed Apache-2.0.52 from source
$ ./configure --prefix=/usr/local/apache2 \
--enable-module=so \
--sysconfdir=/usr/local/apache2/conf \
--libexecdir=/usr/local/apache2/libexec
$ make
$ sudo make install

Installed php-4.3.10 from source
$ ./configure --prefix=/usr/local/php \
--with-mysql=/sw \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-iconv=/sw \
--with-iconv-dir=/sw \
--with-exif \
--with-xml
$ make
$ sudo make install
$ sudo cp php.ini-dist /usr/local/php/lib/php.ini
$ sudo /usr/local/apache2/bin/apachectl start

Added these lines to my httpd.conf:
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps

$ sudo /usr/local/apache2/bin/apachectl start

Placed a small script () to my document root to see if php is working properly.


So far so good! At this point I made sure everything was nice and cozy for Midgard.

The fun part starts here...

midgard-core
************

$ ./configure --prefix=/usr/local/midgard --with-mysql=/sw
$ make
$ sudo make install

midgard-apache2
***************
$ ./configure --with-apxs2=/usr/local/apache2/bin/apxs \
--with-midgard-config=/usr/local/midgard/bin/midgard-config
$ make
$ sudo make install

midgard-php4
************

$ sudo ./mkall --with-apxs=/usr/local/apache2/bin/apxs \
--with-apr-config=/sw/bin/apr-config \
--with-midgard=/usr/local/midgard/bin/midgard-config\
--with-php-config=/usr/local/php/bin/php-config

Added these to my php.ini:
extension=midgard.so
register_globals=on

midgartd-data
*************

$ sudo mkdir /usr/local/midgard/blobs
$ sudo chown nobody:noboby /usr/local/midgard/blobs
$ ./configure --with-apache-user=nobody \
--with-apache-group=nobody \
--with-blobdir=/usr/local/midgard/blobs \
--with-apxs=/usr/local/apache2/bin/apxs
--with-midgard-config=/usr/local/midgard/bin/midgard-config
$ sudo make install

Datagard needs to be ran twice. The first time for installing database and the second time for importin Aegir, Midcom, Spider-admin...and so on...
$ sudo /usr/local/midgard/bin/datagard/datagard

Something that has to be done
$ sudo chown nobody:nobody /usr/local/midgard/var/cache/midgard
$ sudo chmod 0771 /usr/local/midgard/var/cache/midgard

$ sudo /usr/local/apache2/bin/apachectl restart

Voila...I have Midgard on my Mac OS X

Helppoo ku heinän teko!

User comments

Post a comment

Commenting is allowed only for authenticated users