the individual the music the technology the business
software servers macintosh

The follow details the steps neccessary to build some of the software that runs on this server. It includes instructions for compiling and installing Postfix, UW-IMAP, PostgreSQL, and PHP for SMTP, IMAP, database, and web services respectively. This works on Mac OS X 10.3.2 with the current Developer Tools using GCC 3.3. There was an issue with Sabalotron that requires it to be built using GCC 2.95 but the instructions take this into account.

These instructions assume that each package is installed in the order listed (as some depend on those that precede it). Depending on your configuration, some commands will need to be run as root. Text that is monospaced may need to be copied from the HTML source to work correctly.

Services

SMTP

IMAP

Database

HTTP

SMTP (with Postfix) top

gawk (3.1.4)

download from http://ftp.gnu.org/gnu/gawk/

./configure

make

make install

db (4.2.52)

download from http://www.sleepycat.com/download/index.shtml

cd build_unix

../dist/configure --enable-java --enable-tcl --with-tcl=/System/Library/Frameworks/Tcl.framework

make

make install

ln -s /usr/local/BerkeleyDB.4.2/bin/* /usr/local/bin/

ln -s /usr/local/BerkeleyDB.4.2/include/* /usr/local/include/

ln -s /usr/local/BerkeleyDB.4.2/lib/* /usr/local/lib/

pcre (4.5)

download from ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/

./configure

make

make install

postfix (2.1.4)

download from http://ftp.porcupine.org/mirrors/postfix-release/index.html

make makefiles CCARGS="-DHAS_DB -DHAS_PCRE -I/usr/local/include" AUXLIBS="-L/usr/local/lib -ldb -lpcre"

make

mv /usr/sbin/sendmail /usr/sbin/sendmail.OFF

mv /usr/bin/newaliases /usr/bin/newaliases.OFF

mv /usr/bin/mailq /usr/bin/mailq.OFF

chmod 755 /usr/sbin/sendmail.OFF /usr/bin/newaliases.OFF /usr/bin/mailq.OFF

echo "postfix:*:26:26::0:0:Posfix User:/dev/null:/dev/null" | sudo niload passwd .

echo "postfix: root" | sudo niload aliases .

echo "postdrop:*:26:" | sudo niload group .

make install (or make upgrade)

IMAP (with UW-IMAP) top

imap-2004a

downlaod from ftp://ftp.cac.washington.edu/mail/

ed src/osdep/unix/env_unix.c

32c
static char *mailsubdir = ".mail";      /* mail subdirectory name */
.
wq

make osx

cp ipopd/ipop3d imapd/imapd /usr/local/libexec/

cp /etc/pam.d/chkpasswd /etc/pam.d/imap

cat > /etc/xinetd.d/imaps

service imaps
{
	disable = no
	socket_type = stream
	wait = no
	user = root
	groups = yes
	server = /usr/local/libexec/imapd
	flags = NOLIBWRAP
	only_from = localhost
	log_on_success += DURATION USERID
	log_on_failure += USERID
}

cat > /etc/xinetd.d/pop3s

service pop3s
{
	disable = no
	socket_type = stream
	wait = no
	user = root
	groups = yes
	server = /usr/local/libexec/ipop3d
	flags = NOLIBWRAP
	only_from = localhost
	log_on_success += DURATION USERID
	log_on_failure += USERID
}

cat > services

imaps 993/tcp
pop3s 995/tcp

niload services . < services

mkdir -p /usr/local/imap-2004/include /usr/local/imap-2004/lib

cp src/c-client/*.h /usr/local/imap-2004/include/

cp src/c-client/*.c /usr/local/imap-2004/lib/

cp c-client/linkage.h /usr/local/imap-2004/include/

cp c-client/c-client.a /usr/local/imap-2004/lib/libc-client.a

cp src/osdep/unix/os_osx.h /usr/local/imap-2004/include/osdep.h

cp src/osdep/unix/os_osx.c /usr/local/imap-2004/lib/osdep.c

cp src/osdep/unix/env_unix.h /usr/local/imap-2004/include/

cp src/osdep/unix/env_unix.c /usr/local/imap-2004/lib/

chmod 644 /usr/local/imap-2004/include/*.h /usr/local/imap-2004/lib/*.c

ranlib /usr/local/imap-2004/lib/libc-client.a

pine (4.61)

download from ftp://ftp.cac.washington.edu/pine/

./build osx

cp bin/pine bin/pilot bin/pico /usr/local/bin/

cat > /usr/local/lib/pine.conf.fixed

mail-directory = .mail
Database (with PostgreSQL) top

bison (1.875)

download from http://ftp.gnu.org/gnu/bison/bison-1.875.tar.gz

./configure

make

make install

readline (5.0)

download from ftp://ftp.cwru.edu/pub/bash/

ed support/shobj-conf

151c
	SHLIB_LIBS='-lSystem -lncurses -lcc_dynamic'
.
wq

./configure

make

make install

rm /usr/local/lib/*.old

postgresql (7.4.5)

download from ftp://ftp3.us.postgresql.org/pub/postgresql

./configure --with-tcl --without-tk --with-perl --with-java --with-pam --with-rendezvous --with-openssl

make

make install

niutil -createprop . /users/uid=74 name postgres

niutil -createprop . /users/uid=74 _writers_passwd postgres

niutil -createprop . /users/uid=74 realname PostgreSQL

niutil -createprop . /groups/gid=74 name postgres

mkdir /usr/local/pgsql/data /usr/local/pgsql/log

chown postgres:postgres /usr/local/pgsql/data /usr/local/pgsql/log

unsetenv LANG

sudo -u postgres initdb -D /usr/local/pgsql/data -W

ed /usr/local/pgsql/data/pg_hba.conf

47,48c
local   all         postgres                                        md5
local   all         jesse                                           md5
local   www         www                                             trust
local   samegroup   all                                             md5
host    all         postgres     127.0.0.1        255.255.255.255   md5
host    samegroup   all          127.0.0.1        255.255.255.255   md5
.
wq

sudo -u postgres /usr/local/pgsql/bin/pg_ctl start -D /usr/local/pgsql/data -l /usr/local/pgsql/log/postgres.log

sudo -u postgres /usr/local/pgsql/bin/createuser -a -d -P jesse

sudo -u postgres /usr/local/pgsql/bin/createuser -A -D www

HTTP (with PHP) top

aspell (0.60.2)

download from ftp://ftp.gnu.org/gnu/aspell/

./configure

make

make install

lbxml (2.6.19)

download from ftp://xmlsoft.org/

./configure --prefix=/usr --with-zlib --with-readline --with-history --with-python=/System/Library/Frameworks/Python.framework/Versions/Current

make

make install

libxslt (1.1.14)

download from ftp://xmlsoft.org/

./configure --with-python=/System/Library/Frameworks/Python.framework/Versions/Current --with-libxml-include-prefix=/usr/include/libxml2

make

make install

libpng (1.2.8)

download from libpng (1.2.5)

cp scripts/makefile.darwin makefile

ed makefile

12,15c
ZLIBLIB=/usr/lib
ZLIBINC=/usr/include
.
wq

make test

make install

ranlib /usr/local/lib/libpng.a

jpeg (6B)

download from http://www.ijg.org/files/

cp ../libxml2-2.6.13/libtool .

./configure --enable-static --enable-shared

make

make install

expat (1.95.8)

download from http://sourceforge.net/projects/expat/

./configure

make

make install

Sablot (1.0.2)

download from http://www.gingerall.com/charlie/ga/xml/d_sab.xml?s=org

gcc_select 2

./configure --with-iconv --with-readline

make

make install

gcc_select 3.3

php (4.3.8)

download from php

./configure --with-apxs --with-config-file-path=/etc --disable-short-tags --with-openssl --with-zlib --with-zlib-dir=/usr --with-curl=/usr --enable-dba --with-db4 --enable-dbx --with-dom --with-dom-xslt --enable-exif --enable-ftp --with-gd --with-jpeg-dir=/usr/local --with-png-dir=/usr/local --with-iconv --with-imap=/usr/local/imap-2004 --with-kerberos=/usr --with-imap-ssl --with-java --with-ldap=/usr --enable-mbstring --with-iodbc=/usr --with-pgsql --with-pspell --with-libedit -with-readline --enable-sockets --enable-wddx --with-expat-dir=/usr/local --enable-xslt --with-xslt-sablot

ed Makefile

93c
EXTRA_LIBS = -lc-client -lssl -lcrypto -lsablot -lexpat -lexpat -lhistory -lreadline -lncurses -lpspell -laspell -lpq -liodbc -lldap -llber -lpam -lpng -lz -ljpeg -lxml2 -lxslt -lz -ldb-4.2 -lcurl -lz -lssl -lcrypto -lm -lcurl -lz -lssl -lcrypto -lz -lxml2 -lz -liconv -lm -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err -liodbc
.
wq

make

make install

news & updates
 
fresh & new

updated 4/27/16