-
Notifications
You must be signed in to change notification settings - Fork 51
Installation tips
Installing Bricolage on Debian and Ubuntu (a very nice debian clone) is fairly easy using the apt package manager. You may need to add in the universe repository into /etc/apt/sources.list. Apache2 is now the only supported version of Apache under Ubuntu 8.04 LTS and Debian 5 so that’s what we’re using.
From a base installation you should run
apt-get install libunix-syslog-perl libdbi-perl liberror-perl libcache-cache-perl libdigest-sha1-perl libmime-perl libxml-writer-perl libimage-info-perl libmldbm-perl libparams-validate-perl libexception-class-perl libclass-container-perl libhtml-mason-perl libapache-session-perl libxml-parser-perl libxml-simple-perl libio-stringy-perl libsoap-lite-perl libtest-class-perl libparams-validate-perl libdatetime-perl libdatetime-timezone-perl libossp-uuid-perl liblist-moreutils-perl libtext-diff-perl libterm-readpassword-perl libimager-perl libcrypt-ssleay-perl libnet-ssh-perl libmodule-build-perl libterm-readline-perl-perl libxml-dom-perl libpod-simple-perl libcache-mmap-perl libhttp-browserdetect-perl libmasonx-interp-withcallbacks-perl libparams-callbackrequest-perl libtest-mockmodule-perl libtext-diff-perl libtext-worddiff-perl libexpat1 libexpat1-dev apache2 libapache2-mod-perl2 libapache2-mod-apreq2 apache2-mpm-prefork libapache2-request-perl xml-core
The above includes the libimager package and its dependents that will allow you to use the thumbnail preview code in your search results, see bricolage.conf for more details. It also installs some basic SSL stuff in preparation for installing Net::SFTP via CPAN if you want to later (see Net::SFTP note below).
Then either use postgres:
apt-get install postgresql libpg-perl libdbd-pg-perl postgresql-server-dev-8.3
or use mysql :
apt-get install mysql-server libdbd-mysql-perl
The packages below are also required for installing bricolage manually. You should uninstall them when finished.
apt-get install binutils cpp gcc make (and libpq-dev if using postgres)
You should edit pg_hba.conf in /etc/postgresql-8.X to allow root to login to postgres for the installation, needs local trust access.
You also need to run “a2enmod apreq” at the command prompt.
You also need to install the following CPAN modules:
- Test::File::Contents (download via CPAN but uses Build not make)
- Text::LevenshteinXS
- Text::Diff::HTML
The instructions above only apply for version 1.11 as 1.10 doesn’t support Apache2 or mysql.
Once you’ve installed bricolage manually, if you want it to auto start on machine boot then symlink bin/bric_apachectl to /etc/init.d and do a “sudo update-rc.d bric_apachectl defaults 92”. Note that you will need to edit the bric_apachectl file to tell it where your BRICOLAGE_ROOT is if you didn’t use /usr/local/bricolage.
Net::SFTP
requires Math::GMP
, which in turn requires libgmp3-dev
. You may need to install this prior to installing Net::SFTP
— if this is not insalled, the error message generated by the CPAN installer is not particularly helpful, so its requirement may not be obvious.
sudo apt-get install libgmp3-dev
Installed 1.10.2 successfully on Red Hat Enterprise Linux AS release 4 (Nahant Update 3).
Before installing any modules from CPAN make sure to run:
$ export LANG='en_US'
Otherwise several modules will fail for strange reasons.
The following rpms you will want to install before running CPAN
- libxml2-devel
- db4-devel
- gmp-devel
- expat-devel
You will need to install the CPAN modules below.
To install any of the SFTP moving modules, Math::Pari is required. The package needs pari installed. When the module is installed via CPAN pari should download and install automatically after confirming you wish this done.
An additional module to speed up publishing over SSH:
- Math::BigInt::GMP
To install Bricolage without root permissions you can in principal follow the normal Bricolage installation instructions.
The easiest way is to just compile and install everything as the same normal user, i.e., Perl, mod_perl, Apache, PostgreSQL and Bricolage. Doing this with PostgreSQL seemed the most important thing to me, because Bricolage tries to change the effective UID into the postgres user during install. The other software could probably also be done with setting more openly permissions on files and directories.
Choose a prefix, eg., ~USERNAME/usr/local and use it everywhere, e.g. with ./configure —prefix=/home/USERNAME/usr/local, and as library path in your CPAN config, etc.
During PostgreSQL I needed to do some things manually and a bit different than the install instructions said. I did
./configure --prefix=/home/USERNAME/usr/local --enable-multibyte=UNICODE --with-pgport=5433 # non-default port
make
make check
make install
mkdir -p /home/USERNAME/usr/local/pgsql/data
mkdir -p /home/USERNAME/usr/local/pgsql/logs
/home/USERNAME/usr/local/bin/initdb -D /home/USERNAME/usr/local/pgsql/data
/home/USERNAME/usr/local/bin/pg_ctl -D /home/USERNAME/usr/local/pgsql/data -l /home/USERNAME/usr/local/pgsql/logs/postgresql.log start
/home/USERNAME/usr/local/bin/createdb testdb # to test whether
/home/USERNAME/usr/local/bin/psql testdb # it works
Ar latest before the Bricolage install itself prepend your install directory before your PATH (export PATH=/home/USERNAME/usr/local/bin:${PATH}), it makes the default config programs (especially for PostgreSQL and Apache) directly found and you save a lot of explicit commandline arguments.
I chose to install every CPAN module manually via the CPAN shell, not Bricolage’s make cpan.
Then Bricolage itself. Here are some dialogs in Bricolage which might be interesting:
perl Makefile.PL
make
Found PostgreSQL's pg_config at '/home/USERNAME/usr/local/bin/pg_config'.
Is this correct? [yes]
Found Apache server binary at '/home/USERNAME/usr/local/bin/httpd'.
Is this correct? [yes]
Postgres Database Server Port Number (default is unset, i.e., 5432) [] 5433
Postgres Root Username [postgres] USERNAME
Are you sure you want to use 'USERNAME'? [yes]
Postgres Root Password (leave empty for no password):
Postgres System Username [USERNAME]
Bricolage Database Name [bric]
Bricolage Root Directory [/usr/local/bricolage] /home/USERNAME/usr/local/bricolage
make test
make install
This process must (usually) be run as root.
Continue as non-root user? [yes]
# Start/Test
BRICOLAGE_ROOT=/home/USERNAME/usr/local/bricolage /home/USERNAME/usr/local/bin/bric_apachectl start
During make install ignore the lots of warnings about failing chown commands, because that’s only possible for root but already ok for us.
Done. You should be able to connect to your apache’s port. For non-root users this must not be smaller than 1024.