You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 20 Next »

Assumptions

The following instructions assume the VCL database has been installed and configured and that the managment node information has been added to the database as described on the web code installation page.

Install Subversion Client if not yet Installed

Check if a Subversion client is already installed on the management node by running the svn command.  If not already installed, you can try to install it using yum with the following command:

yum install subversion

If yum is not available, visit http://subversion.tigris.org and follow their instructions for downloading and installing a Subversion client.

Download the Backend VCL Code

Download VCL backend code from the Apache Subversion repository and save it to /usr/local/vcl

svn export https://svn.apache.org/repos/asf/incubator/vcl/trunk/managementnode/ /usr/local/vcl/

Install Required Perl Modules

The VCL Perl code running on a management node requires several additional Perl modules available from CPAN - The Comprehensive Perl Archive Network. A search engine for CPAN modules is available at search.cpan.org.

Run install_perl_libs.pl Script

There is a script called install_perl_libs.pl which will attempt to download and install the required perl libraries. To run the script:

perl /usr/local/vcl/bin/install_perl_libs.pl

A large amount of output will be displayed on the console the first time the script is run.  It will pause if any of the module installations ask for configuration information. Accept all of the defaults by pressing enter when this happens.

Run the script a 2nd time to check if all of the modules the script is configured to install were successfully installed. Output similar to the following should be displayed for each module:

==============================================================================
URL: http://search.cpan.org/CPAN/authors/id/T/TI/TIMB/DBI-1.609.tar.gz
Module filename: DBI-1.609.tar.gz
Module name: DBI-1.609
Module package: DBI
Checking if DBI is installed
Module is already installed: DBI
==============================================================================

You will need to troubleshoot if any modules were not installed successfully.

List of (known) Required Modules 

The following is a list of modules known to be required.  They should be installed in the order in which they appear because some are prerequisites for subsequent modules. The install_perl_libs.pl script will attempt to install these modules. Additional modules may be required depending on the Perl distribution. See the instructions below if an additional module needs to be installed.

How to Install a Perl Module Manually

  1. Change directories to /tmp:
    cd /tmp 
  2. Download the module's source package using wget:
    wget http://search.cpan.org/CPAN/authors/id/G/GA/GAAS/libwww-perl-5.827.tar.gz
  3. Unpack the source package using tar:
    tar xzf libwww-perl-5.827.tar.gz
  4. The previous command should have created a libwww-perl-5.827 directory, change to this directory:
    cd libwww-perl-5.827
  5. Create a makefile with the following command:
    perl Makefile.PL
  6. Compile the module:
    make
  7. Test the module:
    make test
  8. Install the module:
    make install
    The last line you should see should be:
    /usr/bin/make install  -- OK
    

How to Install a Perl Module Using CPAN

  1. Enter the CPAN shell:
    perl -MCPAN -e shell
  2. You will need to configure CPAN if it's the first time it is being run. Enter No at the first prompt to auto-configure the CPAN module.
  3. Search for a module using the "m" command:
    m /Zlib/
    You should find the module you were looking for on a line like this:
    Module          Compress::Zlib  (P/PM/PMQS/IO-Compress-2.020.tar.gz)
    
  4. Install the module:
    install Compress::Zlib
  5. Answer yes if asked to install any prerequisite modules
    The last line you should see should be:
    /usr/bin/make install  -- OK
    

How to Test if Required Perl Modules are Installed

Run the following command:

perl /usr/local/vcl/lib/VCL/utils.pm

A module is missing if you see any "Can't locate" lines:

Can't locate HTTP/Headers.pm in @INC (@INC contains:...)

What to do if a Module is Missing

  1. Determine the name of the missing module by looking at the "Can't locate" line
  2. Search for the missing module on search.cpan.org and install it manually
    -or-
    Try to install the module using the CPAN shell

Once all of the required modules are installed, you should see something like this:

BIN PATH: /usr/local/vcl/lib/VCL
pre-execution: config file being used: /etc/vcl/vcld.conf
Uncaught exception from user code:
        VCLD : /etc/vcl/vcld.conf does not exist, exiting --  No such file or directory
BEGIN failed--compilation aborted at /usr/local/vcl/lib/VCL/utils.pm line 616.
 at /usr/local/vcl/lib/VCL/utils.pm line 616

Configure vcld.conf

  1. Create the /etc/vcl directory:
    mkdir /etc/vcl 
  2. Copy the generic vcld.conf file to /etc/vcl:
    cp /usr/local/vcl/etc/vcl/vcld.conf /etc/vcl
  3. Edit the /etc/vcl/vcld.conf file:
    vi /etc/vcl/vcld.conf
    The following lines must be configured in order to start the VCL daemon (vcld) and allow it to check in to the database:
    • FQDN - the fully qualified name of the management node, this should match the name that was configured for the management node in the database
    • server - the IP address or FQDN of the database server
    • LockerWrtUser - database user account with write privileges
    • wrtPass - database user password
  4. Save the vcld.conf file:
    <escape>
    :wq
    <enter>

Install the VCL Daemon (vcld) Service

  1. Copy the vcld service script to /etc/init.d and name it vcld:
    cp /usr/local/vcl/bin/S99vcld.linux /etc/init.d/vcld
  2. Add the vcld service using chkconfig:
    /sbin/chkconfig --add vcld
  3. Configure the vcld service to automatically run at runtime levels 3-5:
    /sbin/chkconfig --level 345 vcld on

Start and Check the vcld Service

  1. Start the vcld service:
    /sbin/service vcld start
    You should see output similar to the following:
    Starting vcld daemon: BIN PATH: /usr/local/vcl/bin
    pre-execution: config file being used: /etc/vcl/vcld.conf
    FQDN is not listed
    pre-execution: process name is set to: vcld
    pre-execution: verbose mode is set to: 1
    pre-execution: testing mode is set to: 0
    pre-execution: log file being used: /var/log/vcld.log
    pre-execution: PID file being used: /var/run/vcld.pid
    Created process 23696 renamed to vcld ...
                                                               [  OK  ]
    
    Note: the vcld service can also be started by running the service script directly:
    /etc/init.d/vcld start
  2. Check the vcld service by monitoring the vcld.log file:
    tail -f /var/log/vcld.log
    You should see the following being added to the log file every few seconds if the management node is checking in with the database:
    2009-06-16 16:57:15|15792|vcld:main(165)|lastcheckin time updated for management node 18: 2009-06-16 16:57:15
    
  • No labels