Welcome to Cameron's ASC web page.
These notes were compiled from an install done on an x86-64 VM Lucid server edition. The VM was generated via the Ubuntu VM builder on a Karmic server and upgraded from Karmic to Lucid. Bricolage is a full featured content management system mentioned earlier.
Install packages
apt-get install postgresql postgresql-server-dev-8.4 apache2 apache2-mpm-prefork \ libapache2-mod-apreq2 unzip libaspell-dev apache2-prefork-dev libapache2-request-perl \ libapache2-mod-perl2 libexpat1-devEnable apache modules
# a2enmod apreq Enabling module apreq. Run '/etc/init.d/apache2 restart' to activate new configuration!Don't run apache now, in fact shut it down and disable it in init.d
# /etc/init.d/apache2 stop # sysv-rc-conf --level 2345 apache2 offConfigure CPAN
perl -MCPAN -e shell Would you like me to configure as much as possible automatically? [yes] ...lots of stuff scrolls by... cpan[1]> quit# vi /etc/perl/CPAN/Config.pm 'urllist' => [], 'urllist' => [q[http://mirrors.myserver.com/CPAN/]],Try an install
# perl Makefile.PL # make
.../usr/bin/perl inst/required.pl STANDARD inst/dbprobe_*.pl inst/htprobe_*.pl ==> Probing Required Software <== ==> Selecting Database <== Database (mysql, Pg): [Pg] ==> Finished Selecting Database <== ==> Selecting Apache version <== httpd version (apache, apache2): [apache] apache2 Are you sure you want to use 'apache2'? [yes] ==> Finished Selecting Apache version <== Looking for PostgreSQL with version >= 8.1.0... Found PostgreSQL's pg_config at '/usr/bin/pg_config'. Is this correct? [yes] Found acceptable version of Postgres: 8.4.4. Looking for Apache with version >= 2.0.55... Found Apache server binary at '/usr/sbin/apache2'. Is this correct? [yes] Found Apache executable at /usr/sbin/apache2. Found acceptable version of Apache: 2.2.14. Checking for preforking apache2 ... Found prefork built in module Looking for expat... Found expat at /usr/lib/libexpat.so. ==> Finished Probing Required Software <== /usr/bin/perl inst/modules.pl STANDARD ==> Probing Required Perl Modules <==
...Do you want to install the optional module Net::FTPServer? [no] yes Looking for Net::SSH2...not found. Do you want to install the optional module Net::SSH2? [no] yes Do you want to install the optional module Crypt::SSLeay? [no] yes Looking for Text::Aspell...not found. Do you want to install the optional module Text::Aspell? [no] yes Looking for XML::DOM...not found. Do you want to install the optional module XML::DOM? [no] yes Do you want to install the optional module Apache2::SizeLimit? [no] yes
...These modules will be automatically downloaded and installed using CPAN.pm during "make install". If this is what you want, press return or enter "yes" below. If not, enter "no" and install the modules above before running "make" again. Continue? [yes] ==> Finished Probing Required Perl Modules <== /usr/bin/perl inst/httpd.pl STANDARD ==> Probing Apache Configuration <==
Your Apache supports loadable modules (DSOs). Found Apache user: www-data Found Apache group: www-data Checking for required Apache modules... All required modules found. ==================================================================== Your Apache2 configuration suggested the following defaults. Press [return] to confirm each item or type an alternative. In most cases the default should be correct. Apache2 User: [www-data] Apache2 Group: [www-data] Apache2 Port: [80] Apache2 Server Name: [bricolage-20] Do you want to use SSL? [yes] Apache2 SSL Port: [443] SSL certificate file: [/etc/apache2/conf/ssl.crt/server.crt] SSL certificate key file: [/etc/apache2/conf/ssl.key/server.key] ==================================================================== ==> Finished Probing Apache Configuration <== /usr/bin/perl inst/database.pl STANDARD ==> Probing PostgreSQL Configuration <== Should the installer connect to the database as a super user? [yes] Postgres Super Username [postgres] Password for super user "postgres": Should the installer become the Postgres system user? This requires that the installer be run as root. [no] Bricolage Postgres Username [bric] Password for Postgres user "bric": No default is available for this question, please enter a value. Password for Postgres user "bric": No default is available for this question, please enter a value. Password for Postgres user "bric": Confirm password: Are you sure you want to use this password? [yes] Bricolage Database Name [bric] ==> Finished Probing PostgreSQL Configuration <== /usr/bin/perl inst/config.pl STANDARD ==> Gathering User Configuration <== ======================================================================== Bricolage comes with two sets of defaults. You'll have the opportunity to override these defaults but choosing wisely here will probably save you the trouble. Your choices are: s - "single" one installation for the entire system, with modules integrated into Perl's @INC directories m - "multi" an installation that lives entirely in a single directory, so that it can coexist with other installations on the same machine Your choice? [m] Bricolage Root Directory [/usr/local/bricolage] Temporary Directory [/usr/local/bricolage/tmp] Perl Module Directory [/usr/local/bricolage/lib] Executable Directory [/usr/local/bricolage/bin] Man-Page Directory (! to skip) [/usr/local/bricolage/man] Log Directory [/usr/local/bricolage/log] PID File Location [/usr/local/bricolage/log/httpd.pid] Mason Component Directory [/usr/local/bricolage/comp] Mason Data Directory [/usr/local/bricolage/data] ==> Finished Gathering User Configuration <== /usr/bin/perl inst/conf.pl INSTALL `/usr/bin/perl -ne '/VERSION.*?([\d\.]+)/ and print $1 and exit' < lib/Bric.pm` ==> Creating Bricolage Conf Files <== Reading conf/bricolage.conf... Writing bconf/bricolage.conf... Reading conf/httpd.conf... Writing bconf/httpd.conf... Writing bconf/install.db... ==> Finished Creating Bricolage Conf Files <== =========================================================== =========================================================== Bricolage Build Complete. You may now proceed to "make cpan", which must be run as root, to install any needed Perl modules; then to "make test" to run some basic tests of the API; then to "make install", which must be run as root. =========================================================== ===========================================================Extracting static module list from `/usr/sbin/apache2 -l`.The make is now complete. The "make cpan" will take some time, using a local CPAN mirror is suggested. For some reason, "make cpan" fails on some packages. Sometimes running "make cpan" again works, other times running CPAN manually, "perl -MCPAN -e shell", is needed to install the failing package. Here is an example.
Checking Apache::Session installation... ############################################################################### Installation of version failed. Your CPAN.pm installation may be broken. To debug manually, run (as root): -MCPAN -e shell Then at the "cpan>" prompt: look You can then attempt to install the module manually with: Makefile.PL make test make install ############################################################################### make: *** [cpan] Error 1
cpan shell -- CPAN exploration and modules installation (v1.9402) Enter 'h' for help. cpan[1]> install Apache::Session Storable loaded ok (v2.20) Going to read '/root/.cpan/Metadata' Database was generated on Fri, 16 Jul 2010 10:27:11 GMT Running install for module 'Apache::Session' CPAN: YAML loaded ok (v0.71) Running make for C/CH/CHORNY/Apache-Session-1.88.zip ... Appending installation info to /usr/local/lib/perl/5.10.1/perllocal.pod CHORNY/Apache-Session-1.88.zip /usr/bin/make install -- OK cpan[2]> quit # make cpan /usr/bin/perl inst/cpan.pl ==> Installing Modules From CPAN <== CPAN: Storable loaded ok (v2.20) Going to read '/root/.cpan/Metadata' Database was generated on Fri, 16 Jul 2010 10:27:11 GMT Found Apache::Session Installing... Install Apache::Session is up to date (1.88). Done Checking Apache::Session installation... Apache::Session installed successfully. ... ==> Finished Installing Modules From CPAN <==# perl -MCPAN -e shellAfter the perl modules are installed configure postgresql as in README.Ubuntu:
# vi /etc/postgresql/8.4/main/pg_hba.conf # "local" is for Unix domain socket connections only local all all trust # /etc/init.d/postgresql-8.4 restartNow "make test":
# make test PERL_DL_NONLAZY=1 /usr/bin/perl inst/runtests.pl t/Bric/Test/Runner.pm .. ok All tests successful. Files=1, Tests=2597, 11 wallclock secs ( 0.36 usr 0.05 sys + 2.02 cusr 0.68 csys = 3.11 CPU) Result: PASSAnd "make install":
# make install /usr/bin/perl inst/is_root.pl /usr/bin/perl inst/cpan.pl All modules installed. No need to install from CPAN. rm -f lib/Makefile cd lib; /usr/bin/perl Makefile.PL; make install Writing Makefile for Bric Skip... Manifying... cd bin; /usr/bin/perl Makefile.PL; make install Writing Makefile for bric_bin make[1]: Entering directory `/usr/local/src/bricolage-2.0.0/bin' Manifying... ==> Copying Bricolage Files <== ==> Finished Copying Bricolage Files <== /usr/bin/perl inst/db.pl ==> Creating Bricolage Database <== ==> Creating Bricolage PostgreSQL Database <== Creating database named bric... Database created. Creating user named bric... User created. Loading Bricolage Pg Database (this may take a few minutes). Done. Finishing database... Done. /usr/bin/perl inst/dbgrant.pl ==> Granting access rights to the Bricolage user <== Granting privileges... Done. /usr/bin/perl inst/done.pl ========================================================================= =========================================================================
You may now start your Bricolage server with the command (as root): /usr/local/bricolage/bin/bric_apachectl start If this command fails, look in your error log for more information: /usr/local/bricolage/log/error_log Once your server is started, open a web browser and enter the URL for your server: http://bricolage-20 Login in as "admin" with the default password "change me now!". Your first action should be changing this password. Click "Logged in as Bricolage Administrator" in the top right corner of the browser window and change the password. Pointers for documentation and lots of getting started advice are in the main README file in the unpacked distribution directory. ========================================================================= =========================================================================Bricolage Installation CompleteFix the locations for the SSL certs and fire up Bricolage 2.0 on Ubuntu Lucid server:
# vi /usr/local/bricolage/vhosts.conf SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key # /usr/local/bricolage/bin/bric_apachectl start
Upstart is the new init in Ubuntu Lucid, and there are a mix of upstart and System V init scripts installed.
Following the previous steps on enabling the text console and disabling plymouth yields an almost normal text console for Lucid server. However most init script output is missing. Switching to tty7 one sees only some init script output. By default upstart output goes to /dev/null.
Upon reading the upstart docs one comes away with the thought of adding "console output" to all of the upstart scripts.
console output
env INIT_VERBOSE
That is a PITA, and will break on package upgrades. Further, one would need to add their own console messages in various sections of the upstart script in question:
exec echo "Starting openssh"
Hardly as nice as the messages provided by the old SysV system, via:
. /lib/lsb/init-functions
The temporary solution we found, is to set kernel command line options in /boot/grub/menu.lst:
# defoptions=nosplash INIT_VERBOSE=yes init=/sbin/init -v
Our kernel comman line option list, after root=UUID...:
ro nosplash INIT_VERBOSE=yes init=/sbin/init -v
The INIT_VERBOSE is used by some upstart scripts, and the -v gives output on everything upstart does on boot. Not as pretty as the old boot, but potentially informative if the system hangs. Boot log messages appear on disk in /var/log/syslog, as init: entires like these:
Jul 12 10:20:23 bricolage-20 init: ssh main process (573) became new process (580)
Jul 12 10:20:23 bricolage-20 init: ssh state changed from spawned to post-start
Jul 12 10:20:23 bricolage-20 init: ssh state changed from post-start to running
Enjoy the Ubuntu Lucid server release with a functional console, complete with boot status messages and boot logging.
Powered by ikiwiki.