/
Admin.pod
2876 lines (1901 loc) · 91.4 KB
/
Admin.pod
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
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
=head1 Name
Bric::Admin - Bricolage System Administration Guide.
=head1 Description
This guide is intended for the system administrator in charge of installing,
configuring, or tuning a Bricolage system.
=head1 Quick Installation Instructions
For the really impatient you can just download a VMWare image with Bricolage
already set up for you running under Ubuntu. See L<the
announcement|http://www.bricolagecms.org/news/announce/2008/06/01/vmware/> for
more details.
There are lots of hints and tips for installation at the L<Bricolage
Wiki|http://wiki.github.com/bricoleurs/bricolage/>, along with other tutorials
and useful bits.
Don't forget to read the README for your OS first for known issues and
helpful tips. These can be found in the root of the unpacked Bricolage tarball.
=over
=item 1
Install Perl 5.8.0 or greater.
=item 2
Install Apache 1.3.34 or greater -- or Apache 2.0.55 or greater -- with
mod_perl, mod_log_config, mod_mime, mod_alias.
On Apache 2 you will also need to install mod_apreq and make sure that it and
all the modules above appear in the list in the mods-enabled directory in your
apache2 base directory. You will also need to use the prefork mpm rather than
the threaded worker mpm in Apache 2.
For SSL also install mod_ssl or (on Apache 1 only apache-ssl).
=item 3
Install PostgreSQL 8.1 or greater or MySQL 5.0.3 or greater.
=item 4
In the Bricolage source directory:
perl Makefile.PL
make
make test
And then as root:
make install
=back
If you run into problems then read below for the details.
In order to prevent the Bricolage installer from asking any questions, simply
set the environment variable C<$INSTALL_VERBOSITY> to "QUIET":
make INSTALL_VERBOSITY=QUIET
make test
make INSTALL_VERBOSITY=QUIET install
Bricolage will do its best to discover most information by itself, and exit
with an error when it cannot. Default values will be selected from the
appropriate defaults file for your system. See F<inst/defaults> for a list of
supported systems. F<inst/defaults/standard> contains all of the default
values, and other system-specific files can override those values.
=head2 Installation Variables
You can override many of those values during the install by passing the
appropriate environment variables to C<make>. The supported environment
variables include:
=over
=item * BRICOLAGE_ROOT
The location where Bricolage should be installed. Defaults to
F</usr/local/bricoage>.
=item * BRICOLAGE_INSTALL_STYLE
One of two values describing where to install all of the Bricolage files:
=over
=item m
All files, including Perl libraries, temp files, programs, etc., will be
installed under C<$BRICOLAGE_ROOT>. This is the default and recommended
option.
=item s
Most files will be installed under C<$BRICOLAGE_ROOT>, but Perl libraries,
programs, and man pages will be stored where Perl libraries and scripts
usually go (e.g., F</usr/local/lib/perl>, F</usr/local/bin>, and
F</usr/local/man>), temporary files will be stored in the system temp
directory (e.g., C</tmp>, etc.
=back
=item * BRICOLAGE_TEMP_DIR
The location to use for temporary files when bricolage is running. Defaults to
C<$BRICOLAGE_ROOT/tmp>. Ignored when C<$BRICOLAGE_INSTALL_STYLE> is set to
"s".
=item * BRICOLAGE_MODULE_DIR
The directory under which to install Bricolage's Perl modules. Defaults to
C<$BRICOLAGE_ROOT/lib>. Ignored when C<$BRICOLAGE_INSTALL_STYLE> is set to
"s".
=item * BRICOLAGE_BIN_DIR
The directory under which to install Bricolage's programs. Defaults to
C<$BRICOLAGE_ROOT/bin>. Ignored when C<$BRICOLAGE_INSTALL_STYLE> is set to
"s".
=item * BRICOLAGE_MAN_DIR
The directory under which to install Bricolage's C<man> pages. Defaults to
C<$BRICOLAGE_ROOT/man>. Ignored when C<$BRICOLAGE_INSTALL_STYLE> is set to
"s".
=item * BRICOLAGE_COMP_ROOT
The directory under which to install Bricolage's UI Mason components. Defaults
to C<$BRICOLAGE_ROOT/comp>.
=item * BRICOLAGE_DATA_DIR
The directory for Bricolage to use for its UI Mason data. Defaults to
C<$BRICOLAGE_ROOT/data>.
=item * BRICOLAGE_LOG_DIR
The directory for Bricolage to use for its log files. Defaults to
C<$BRICOLAGE_ROOT/data>.
=item * BRICOLAGE_PID
The file name Bricolage should use for its PID file. Defaults to
C<$BRICOLAGE_ROOT/log/httpd.pid>.
=item * BRICOLAGE_DB_TYPE
The type of database to use. Must be one of the following:
=over
=item Pg
PostgreSQL. This is the default choice.
=item mysql
MySQL.
=back
=item * BRICOLAGE_PG_CONFIG_PATH
=item * BRICOLAGE_MYSQL_CONFIG_PATH
The path to the database config program. This would an implmentation of
C<pg_config> for PostgreSQL or C<mysql_config> for MySQL. Bricolage will try
to find the appropriate one to use for the default.
=item * BRICOLAGE_CREATE_DB
A boolean indicating whether or not the databse should be created. Defaults to
true. If you set this to a false value, the database should already exist and
the Bricolage database user will need to have permission to create objects in
it (tables, indexes, sequences, etc.).
=item * BRICOLAGE_PG_SUPERUSER
The name of the PostgreSQL super user. Defaults to "postgres".
=item * BRICOLAGE_PG_SUPERPASS
The password for the PostgreSQL super user. Defaults to an empty string, which
works for a locally-installed PostgreSQL using "trust" or "ident"
authentication.
=item * BRICOLAGE_PG_BECOME_USER
A boolean indicating whether or not the installer should become the PostgreSQL
system user (usually named "postgres") before connecting to the database and
making changes to it. Such is required if your PostgreSQL server uses ident
authentication, as is the default for Debian builds of PostgreSQL. Defaults to
false.
=item * BRICOLAGE_PG_BRICUSER
The name of the PostgreSQL user for Bricolage itself to use. Defaults to
"bric".
=item * BRICOLAGE_PG_DB
The name of the database for Bricolage to use. Defaults to "bric".
=item * BRICOLAGE_PG_HOSTNAME
The name of the host for the PostgreSQL database server. Defaults to
"localhost".
=item * BRICOLAGE_MYSQL_SUPERUSER
The name of the MySQL super user. Defaults to "root".
=item * BRICOLAGE_MYSQL_BRICUSER
The name of the MySQL user for Bricolage itself to use. Defaults to
"bric".
=item * BRICOLAGE_MYSQL_DB
The name of the database for Bricolage to use. Defaults to "bric".
=item * BRICOLAGE_HTTPD_VERSION
The version of Apache to use. Must be one of the following:
=over
=item apache
Apache 1.3.x. This is the default choice, although that's subject to change in
a future release.
=item apache2
Apache 2.x.
=back
=item * APACHE_EXE
=item * APACHE2_EXE
The base name of the Apache executable, usually "httpd", which happens to be
the default.
=item * APACHE_PATH
=item * APACHE2_PATH
A C<$PATH> environment variable-style list of directories to search for the
Apache executable. Defaults to the value returned by
C<File::Spec::Functions::path>.
=item *
=item * BRICOLAGE_SSL
A boolean value indicating whether or not Bricolage should use SSL. Defaults
to true if the detected Apache server supports SSL, and false if it does not.
=item * BRICOLAGE_SSL_CERT
The location of the SSL certificate file that Bricolage should use. Defaults
to F<$HTTPD_ROOT/conf/ssl.key/server.cert>, where C<$HTTPD_ROOT> is collected
from the C<httpd> executable.
=item * BRICOLAGE_SSL_KEY
The location of the SSL key file that Bricolage should use. Defaults to
F<$HTTPD_ROOT/conf/ssl.key/server.key>, where C<$HTTPD_ROOT> is collected from
the C<httpd> executable.
=item * BRICOLAGE_SSL_KEY
The location of the SSL key file that Bricolage should use.
=item * BRICOLAGE_APACHE_USER
The name of the Apache super user, usually "nobody" or "daemon".
=item * BRICOLAGE_APACHE_GROUP
The name of the Apache super user, usually "nobody" or "daemon".
=item * BRICOLAGE_APACHE_PORT
The port for Bricolage to use for its Apache server. Defaults to 80.
=item * BRICOLAGE_APACHE_SSL_PORT
The SSL port for Bricolage to use for its Apache server. Defaults to 443. This
option is ignored of SSL is not used.
=item * BRICOLAGE_APACHE_HOSTNAME
The host name that Bricolage should use when it configures itself to run on a
virtual host inside of Apache. Default to the value retuned by C<`hostname`>.
=item * EXPAT_PATH
A C<$PATH> environment variable-style list of directories to search for expat.
Defaults to the value returned by C<File::Spec::Functions::path>.
=back
=head1 Packages
Bricolage requires a lot of other components to be installed; here's a list of
them:
=over
=item *
Perl 5.8.0.
=item *
Perl Modules:
=begin installation
START MODULE LIST
=end installation
=over
=item Storable
=item Time::HiRes
=item Unix::Syslog
=item Net::Cmd
=item Devel::Symdump
=item DBI 1.49
=item Error
=item Cache::Cache
=item Cache::Mmap
=item Digest::MD5
=item Digest::SHA1 2.01
=item URI
=item HTML::Tagset
=item HTML::Parser
=item MIME::Base64
=item MIME::Tools
=item Mail::Address
=item XML::Writer
=item LWP
=item Image::Info
=item MLDBM
=item Params::Validate
=item Exception::Class 1.12
=item Class::Container 0.09
=item HTML::Mason 1.37
=item DB_File
=item Apache::Session 1.54
=item Test::Harness 2.03
=item Test::Simple
=item Test::MockModule 0.04
=item Test::File::Contents 0.02
=item Test::File
=item Text::Balanced
=item XML::Parser 2.34
=item XML::Simple
=item IO::Stringy
=item SOAP::Lite
=item File::Temp
=item Text::LevenshteinXS
=item Locale::Maketext
=item Test::Class 0.04
=item Params::CallbackRequest 1.16
=item MasonX::Interp::WithCallbacks 1.10
=item Safe 2.09
=item DateTime 0.21
=item DateTime::TimeZone 0.2601
=item Term::ReadPassword
=item Data::UUID
=item List::Util
=item List::MoreUtils
=item Text::Diff
=item Text::Diff::HTML 0.02
=item Text::WordDiff
=item URI::Escape
=item Scalar::Util
=item Clone
=item Imager
=item HTML::Template (optional)
=item HTML::Template::Expr (optional)
=item Template 2.14 (optional)
=item PHP::Interpreter (optional)
=item Encode (optional)
=item Pod::Simple (optional)
=item Test::Pod 1.42 (optional)
=item Net::FTPServer (optional)
=item Net::SSH2 0.28 (optional)
=item HTTP::DAV (optional)
=item Crypt::SSLeay (optional)
=item Text::Aspell (optional)
=item XML::DOM (optional)
=item CGI (optional)
=back
Note that you also have some required categories of modules, but you must pick
from among them. Depending on your choice of database, you will need to install
one of:
=begin installation
START DBD
=end installation
=over
=item DBD::Pg 1.22
=item DBD::mysql 3.0007
=back
And depending on whether you're using Apache 1 or Apache 2, you'll need to
install one of:
=begin installation
END DBD
START Apache
=end installation
=over
=item Apache::Request
=item Apache2::Request
=back
The fact that these are marked "(optional)" is just to help the installer
determine CPAN dependencies. Trust us, one or the other of these B<is>
required. Either one of these is optional, however:
=over
=item Apache::SizeLimit (optional)
=item Apache2::SizeLimit (optional)
=back
=begin installation
END Apache
END MODULE LIST
=end installation
=item *
Apache 1.3.34 or later or Apache 2.0.55 or later
=item *
mod_perl 2.xx or mod_perl 1.xx - Apache/Perl Integration
=item *
PostgreSQL 7.3.0 or MySQL 5.0.3
=item *
Expat 1.95.0
=item *
OpenSSL 0.9.6b (optional)
=item *
mod_ssl 2.8.4-1.3.xx - Apache Interface to OpenSSL (optional)
=item *
apache_ssl 1.3.xx+ssl_1.xx Apache SSL (optional)
=item *
mod_gzip - Gzip page compression (optional)
=item *
htmlArea 3.0 or later (optional)
=item *
Xinha WYSIWYG editor (optional)
=item *
FCKeditor WYSIWYG editor (optional)
=item *
JS-Quicktags WYSIWYG editor (optional)
=item *
GNU Aspell 0.50 or later (optional)
=back
=head1 Installation
Follow these instructions to prepare your system for Bricolage. If you're
upgrading from an older version of Bricolage see the L<"UPGRADING"> section
below.
=head2 Perl
The standard Perl installation should apply with no problems. If your
system comes with a package manager (ex. Redhat Linux RPM, FreeBSD
ports, etc.) then you can use that to install Perl.
Here is how to install Perl from source:
=over
=item *
Download the Perl source tarball from www.perl.com.
=item *
Gunzip and untar the sources.
=item *
Change to the source directory and execute these commands:
sh Configure -Umymalloc -Dinstallusrbinperl -des
make
make test
make install
For the curious, the options used with Configure above are:
=over
=item -Umymalloc
This Configure command will build perl without perl's malloc. This is
necessary to prevent segfaults with XML::Parser under mod_perl. This
is the default on most systems already.
=item -Dinstallusrbinperl
This Configure command will arrange for /usr/bin/perl to be linked to the
current version of perl. If you don't specify this command, configure will
prompt you to find out whether to link /usr/bin/perl to the current version of
perl. We strongly suggest that you answer "yes".
=item -des
This optional command tells Configure that you accept all the other defaults,
and it will therefore provide terse output during the configuration.
=back
=back
=head2 OpenSSL (optional)
You'll need to install OpenSSL if you want to use Bricolage's SSL
support to run a more secure server, otherwise you can skip this step.
Installation of OpenSSL follows the usual conventions. Here's an
example:
=over
=item *
Download the OpenSSL source tarball from www.openssl.org.
=item *
Gunzip and untar the sources.
=item *
Change into the source directory, read the INSTALL file to see if you need to
use any Configure commands, and execute these commands:
sh config <commands>
make
make test
=back
C<make install> generally isn't necessary because the sources will be compiled
into Apache, but may be necessary to generate your own test certificates or
certificates to be signed by a public certificate authority.
=head2 Apache SSL Support (Optional)
You'll need to install mod_ssl or apache_ssl if you want to use Bricolage's
SSL support to run a more secure server; otherwise you can skip this step.
=head3 Apache Interface to OpenSSL (mod_ssl)
Installation of mod_ssl follows the usual conventions. Here's an example:
=over
=item *
Download the mod_ssl source tarball from L<modssl.org|http://www.modssl.org/>.
=item *
Gunzip and untar the sources.
=item *
Change into the source directory, read the INSTALL file to see if you need to
use any Configure commands. The only one required here is C<--with-apache>, so
you'll need to have already downloaded, gunzipped, and untarred the Apache
sources (see below). If you already have a server certificate and a server
key, use the C<--with-crt> and C<--with-key> commands to point to them. You
might also want to consider including the optional MM library (see mod_ssl's
INSTALL file for details). Then, execute this command:
./configure --with-apache=/usr/local/src/bricolage/apache_1.3.xx
Where "apache_1.3.xx" represents the version of Apache you will be installing
(see the "Packages" section above for a recommended version number.
=back
C<make> and C<make install> aren't necessary because the sources will be
compiled into Apache.
=head3 Apache-SSL
=over
=item *
Download the apache_ssl source tarball from
L<apache-ssl.org|http://www.apache-ssl.org/>.
=item *
Copy the tarball into the apache directory, gunzip and untar.
=item *
Run the FixPatch script.
=item *
Now build Apache in the normal fashion. The only difference is the added
configuration directives for SSL, see SSLconf/conf/ for comprehensive
examples. Bricolage handles most of the configuration for you.
=back
=head2 Apache/Perl (mod_perl)
Installation of mod_perl follows the usual conventions for installing Perl
modules. It does require a number of Makefile.PL parameters, however. The most
important parameter is APACHE_SRC, which points to the Apache sources. You will
need to have already downloaded, gunzipped, and untarred the Apache sources
before compiling mod_perl. Here's the routine:
=over
=item *
Download the Apache source tarball from httpd.apache.org. Make sure
you choose the 1.3.x rather than the new 2.x version.
=item *
Download the mod_perl source tarball from perl.apache.org.
=item *
Gunzip and untar the Apache and mod_perl sources.
=item *
Change into the mod_perl source directory, read the INSTALL file to see if you
need to use any Configure commands other than those specified below. Then
execute the commands:
perl Makefile.PL \
APACHE_SRC=../apache_1.3.*/src \
DO_HTTPD=1 \
USE_APACI=1 \
PREP_HTTPD=1 \
EVERYTHING=1
make
make install
=back
=head2 Apache
Before continuing, consult the F<README.configure> file that comes with the
Apache distribution. It contains a very helpful (and short) bit of
documentation and covers a lot of good information, particularly with respect
to DSO use (a topic not covered here).
By now you've downloaded Apache and gunzipped and untarred its sources. There
are a lot of Configure commands supported by Apache. We recommend that you use
the following for Bricolage:
=over
=item --with-layout=Apache
This option selects the classical Apache path layout.
=item --disable-rule=EXPAT
This option prevents incompatibilities between Apache's implementation of the
Expat XML parser, and that used by Perl's XML::Parser module.
=item --enable-module=ssl (optional)
If you're including SSL support via mod_ssl, this option compiles it in.
=item --enable-module=rewrite
This option enables the mod_rewrite module that ships with the Apache
sources. While mod_rewrite is not currently used in Bricolage, it may be in
future versions.
=item --activate-module=src/modules/perl/libperl.a
This option compiles in mod_perl. The library it points to was installed by
the mod_perl make process.
=item --disable-shared=perl
This option ensures that mod_perl will be statically compiled into Apache,
rather than as a DSO.
=back
=over
=item *
The commands you'll execute, therefore, should look something like this:
./configure \
--with-layout=Apache \
--disable-rule=EXPAT \
--enable-module=rewrite \
--activate-module=src/modules/perl/libperl.a \
--disable-shared=perl
make
Or if you're planning to use mod_ssl:
./configure \
--with-layout=Apache \
--disable-rule=EXPAT \
--enable-module=ssl \
--enable-module=rewrite \
--activate-module=src/modules/perl/libperl.a \
--disable-shared=perl
make
=item *
If you plan to use SSL you'll need to install the SSL certificates
before you install Apache. If you compiled OpenSSL with the
C<--with-crt> and C<--with-key> commands, you can skip this step.
If you don't have a formal certificate from a certificate authority
such as VeriSign then you can make a dummy certificate with the
command:
make certificate TYPE=dummy
If you do have a formal certificate then can make a certificate with
the command:
make certificate TYPE=custom
Near the end of the certificate creation process, you will be prompted
to enter information for the certificate. Here you'll enter the
information for your certificate. See the OpenSSL documentation for a
description of the certificate data.
You'll be prompted to enter the certificate information twice. Afterward,
you'll see this prompt for each of the two new certificates:
Encrypt the private key now? [Y/n]:
Enter "n" to avoid having to type in a passphrase every time you start Apache.
Enter "y" if you really don't trust your system users.
=item *
Finally, install Apache:
make install
=item *
Don't forget to install the Apache::Session and Apache::Request perl modules
now (See "Perl Modules," above). If your Apache is in a non-standard loation,
you might need to set the C<APXS> environment variable while installing it so
that tests pass:
% export APXS=/some/nonstandard/apache/bin/apxs
=back
And you're done! You can test the installation by calling
/usr/local/apache/bin/apachectl configtest
=head2 PostgreSQL
PostgreSQL is an integral part of Bricolage: it's where all of your assets are
stored! Its installation is pretty straight-forward and typical, but it
requires a number of extra steps that one might not expect.
If you're using Redhat Linux you may already have Postgres installed. If so,
all you need to do to get it ready for use with Bricolage is edit your
postgresql.conf file (run C<locate postgresql.conf> to find it) and turn on
the tcpip_socket option:
tcpip_socket = true
Otherwise, here are the installation details:
=over
=item *
Download the PostgreSQL source tarball from www.postgresql.org.
=item *
Gunzip and untar the sources.
=item *
Create a new system user named "postgres". This is the user that will start the
PostgreSQL server. The startup scripts that come with PostgreSQL mostly seem to
expect that the postgres user will use the tcsh shell (note: I use bash with no
problem), so you may wish to set that shell now. Here's an example under Linux:
/usr/sbin/useradd -d /home/postgres postgres -s /bin/tcsh
=item *
Change into the source directory and read the INSTALL file to see if
you need to use any Configure commands. One Configure command is
required by Bricolage: C<--enable-multibyte=UNICODE>. Because Bric
stores all of its textual data in Unicode format, this command is not
optional. If you require the use of a different character set for your
installation, this can be configured as part of the system
preferences, via the Admin interface.
=item *
Install PostgreSQL:
./configure --enable-multibyte=UNICODE
make
make install
=item *
Now make a directory in which you want to keep your PostgreSQL databases,
including the Bricolage database. Make the "postgres" user the owner of that
directory. Think carefully about where you want this directory to be, and on
what partition. The Bricolage database will get to be quite large, and will
require a great deal of disk accessing, so we recommend you put it on its own
partition. This example just demonstrates the default:
mkdir /usr/local/pgsql/data
chown postgres /usr/local/pgsql/data
=item *
Initialize the PostgreSQL database. Be sure to pass the directory you just
created to the C<-D> command.
su - postgres -c "/usr/local/pgsql/bin/initdb --no-locale \
-D /usr/local/pgsql/data"
You might find it easier to set PostgreSQL default encoding for new databases
to UNICODE when initializing the database cluster, using the following
command instead of the former one:
su - postgres -c "/usr/local/pgsql/bin/initdb --no-locale \
--encoding UNICODE -D /usr/local/pgsql/data"
=item *
Start the PostgreSQL "postmaster". You can use one of the scripts in
contrib/start-scripts.
=item *
Make the PostgreSQL documentation. This step is optional, if you don't need the
docs or have them available elsewhere:
cd docs
make install
=item *