forked from bricoleurs/bricolage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.MacOSX
232 lines (172 loc) · 7.53 KB
/
README.MacOSX
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
Bricolage Mac OS X/Darwin README
--------------------------------
Bricolage works well on Mac OS X, especially on version 10.2 or later, using
the version of Apache that comes preinstalled with OS X, or a custom-compiled
version.
PREREQUISITES
-------------
1. Xcode Tools (formerly Apple Developer Tools): You will be compiling
things, so you will need "make" and "gcc", which come in the Xcode
Tools. These tools come on the OS X DVD, or are available for
download from http://developer.apple.com after a free registration.
2. PostgreSQL: Installing PostgreSQL is outside the scope of this file,
though pretty much any method of installation will work. If you wish to
compile from source, see http://www.postgresql.org. If you want to use a
binary, see http://www.entropy.ch/software/macosx/postgresql/.
USING THE BUNDLED APACHE
------------------------
1. Run the following two commands so that the installer can find mod_perl:
sudo sed -Ei -e "s/#(AddModule mod_perl)/\1/" /etc/httpd/httpd.conf
sudo sed -Ei -e "s/#(LoadModule perl_module)/\1/" /etc/httpd/httpd.conf
2. Follow the standard instructions in INSTALL. Apache will be automatically
detected at /usr/sbin/httpd.
3. If you don't need mod_perl for other things on your machine, run the above
two commands in reverse to keep Apple's Apache installation from loading
mod_perl:
sudo sed -Ei -e "s/^(AddModule mod_perl)/#\1/" /etc/httpd/httpd.conf
sudo sed -Ei -e "s/^(LoadModule perl_module)/#\1/" /etc/httpd/httpd.conf
COMPILING APACHE YOURSELF
-------------------------
Complete details for building everything you need to run Bricolage on Mac OS X
10.2 will always be found at http://www.justatheory.com/computers/os/macosx/my_adventures.html
and on OS X 10.3 at http://wiki.bricolage.cc/bin/view/Bric/MacOSXPanther
"Build Your Own Apache Server with mod_perl"
http://www.macdevcenter.com/pub/a/mac/2002/11/05/apache_osx.html
"Build Your Own Apache Server with mod_perl and mod_ssl"
http://www.macdevcenter.com/pub/a/mac/2002/12/18/apache_modssl.html
Below is a summary of the instructions, for those who just need the barest of
hints for compiling and installing software.
PREPARATION
-----------
If you're planning to use mod_ssl for secure connections to your Mac OS X
Bricolage server, you'll need to download a couple of patches that help
mod_ssl to find Mac OS X's OpenSSL libraries and allow the compiler to
properly find libdbm while configuring Apache. The patches can be found here:
http://www.justatheory.com/computers/os/macosx/apache_dbm.patch
http://www.justatheory.com/computers/os/macosx/mod_ssl_dylib.patch
Other files and libraries you'll need to download are as follows:
From http://www.apache.org/dist/httpd/, download the latest Apache 1.3
sources.
From http://www.modssl.org/source/ download the mod_ssl sources. Make sure
that the second half of the version number is the same as the version of
Apache you downloaded. For example, if you downloaded apache_1.3.41.tar.gz,
then the mod_ssl sources you want will be something like
mod_ssl-2.x.x-1.3.41.tar.gz.
From ftp://ftp.cpan.org/pub/CPAN/src/, download perl-5.8.x.tar.gz.
From http://perl.apache.org/dist/, download the the sources for latest 1.x
version of mod_perl.
From http://www.apache.org/dist/httpd/libapreq/, download libapreq-1.1.tar.gz.
From http://expat.sourceforge.net/, download the sources for the latest
version of the expat libraries.
From http://search.cpan.org/, download the latest version of XML::Parser.
From ftp://ftp.gnu.org/pub/gnu/readline/, download the latest readline
sources.
From http://www.ca.postgresql.org/ftpsite/latest/, download the latest
PostgreSQL sources.
INSTALLATION SUMMARY
--------------------
All examples here assume that you've unpackaged all of the above source
tarballs into /usr/local/src, e.g., with the command
tar zxvf sources.tar.gz
Note that if you've never installed anything in /usr/local before, you must
install at least one library (expat is a good candidate) before installing Perl.
This is so that Perl will pick up on the existence of /usr/local/lib
and /usr/local/include and make sure that modules that need access
to the library files in these directories will be able to find them.
You should be fine if you follow the steps outlined here.
1. Install expat:
% cd expat-VERSION/
% ./configure
% make
% make install
% cd ..
2. Install readline (omit the perl line on Mac OS X 10.1):
% cd readline-4.x
% perl -i.bak -p -e \
"s/SHLIB_LIBS=.*/SHLIB_LIBS='-lSystem -lncurses -lcc_dynamic'/g" \
support/shobj-conf
% ./configure
% make
% make install
3. Install Perl. For Perl 5.8.x, do this:
% cd perl-5.8.x/
% export LC_ALL=C # or setenv LC_ALL C
% export LANG="en_US" # or setenv LANG en_US
% sh Configure -des -Dprefix=/usr/local -Uinstallusrbinperl
% make
% make test # Will be a few expected and documented failures
% make install
% cd ..
4. Patch Apache:
% cd apache_1.3.xx
% patch -p0 < ../apache_dbm.patch
% cd ..
5. Configure mod_ssl (Optional -- Required for SSL support):
% cd mod_ssl-VERSION/
% patch -p0 < ../mod_ssl_dylib.patch
% ./configure --with-apache=/usr/local/src/apache_1.3.xx
% cd ..
6. Install mod_perl:
% cd mod_perl-1.xx
% /usr/local/bin/perl Makefile.PL \
NO_HTTPD=1 \
USE_APACI=1 \
PREP_HTTPD=1 \
EVERYTHING=1
% make
% make install
% cd ..
7. Install Apache:
% cd apache_1.3.xx/
% SSL_BASE=/usr/local/src/openssl-VERSION/ \
./configure \
--with-layout=Apache \
--enable-module=ssl \ # Optional.
--enable-module=so \
--activate-module=src/modules/perl/libperl.a \
--disable-shared=perl \
--without-execstrip
% make
% make certificate # Optional -- to make SSL certificate. Read messages.
% make install
% cd ..
8. Install libapreq:
% cd libapreq-1.1
% ./configure --with-apache-includes=/usr/local/apache/include
% make
% make install
% /usr/local/bin/perl Makefile.PL
% make
% make test
% make install
% cd ..
9. Install XML::Parser:
% cd XML-Parser-VERSION/
% /usr/local/bin/perl Makefile.PL EXPATLIBPATH=/usr/local/lib \
EXPATINCPATH=/usr/local/include
% make
% make test
% make install
% cd ..
OTHER ISSUES
LWP: We recommend that you install the Perl LWP library manually, and when it
prompts for whether to install the "HEAD" convenience program, say "No". This
will prevent LWP from overwriting the existing "head" program, which is needed
by many configure scripts.
PostgreSQL: You'll need to use NetInfo to create the "postgres" user and the
"postgres" group. Most likely you can copy the "nobody" or "mysql" user and
group for this purpose. Also, when you've completed installation as documented
in the main README file, you'll need to run this command so that DBD::Pg will
be able to use the PostgreSQL libraries:
% ranlib /usr/local/pgsql/lib/libpq.a
Consult http://developer.apple.com/internet/opensource/postgres.html for more
a detailed description of how to install and configure PostgreSQL.
DURING INSTALLATION
While running "make", you'll be prompted to answer a series of
questions. Provided you've followed the directions here and installed and
configured Apache, most of the defaults should be fine. There are a couple of
things to watch for, however:
* When you're prompted to confirm the location of Apache, do not accept
"/usr/sbin/httpd" if that's what is offered. That is the Apple Apache
installation. You'll need to enter in the path to the special Apache
you've compiled, e.g., "/usr/local/apache/bin/httpd".