# ---------------------------------------------------------------------------- # --- Section 1) Base SysFink server install documentation ------------------- # ---------------------------------------------------------------------------- # --- A) Use sysfink-cpan-*.tar.gz ------------------------------------------- # Upgade perl yum upgrade perl cat /etc/redhat-release uname -m # Choose proper module package on http://code.google.com/p/sysfink/downloads/list # E.g. for RHEL 5.3 64bit get: cd ~/ wget http://sysfink.googlecode.com/files/sysfink-cpan-rhel53-x86_64.tar.gz tar -xzf sysfink-cpan-rhel53-x86_64.tar.gz # or for RHEL 5.4 32bit get: cd ~/ wget http://sysfink.googlecode.com/files/sysfink-cpan-rhel54-i386.tar.gz tar -xzf sysfink-cpan-rhel54-i386.tar.gz # Configure your variables. Run perl -Mlocal::lib=$HOME/sysfink-cpan # or perl -I$HOME/sysfink-cpan/lib/perl5 -Mlocal::lib=$HOME/sysfink-cpan # and run command whitch local::lib printed on screen to export local paths. # Now skip to Section 2. # --- B) Install required modules form rpms and CPAN ------------------------- # Upgade perl yum upgrade perl yum install perl-JSON # --- Install CPAN Modules from DAG ------------------------------------------ yum install perl-DBD-SQLite perl-DateTime perl-Devel-StackTrace perl-Data-Dumper perl-SQL-Translator perl-DBIx-Class # --- CPAN Module install to ~/sysfink-cpan ---------------------------------- # # See http://search.cpan.org/~andk/CPAN/lib/CPAN.pm#FAQ or 'man CPAN'. # ---------------------------------------------------------------------------- # Choose B1) or B2). # --- B1) Use local::lib ----------------------------------------------------- cpan local::lib # Or bootstrap http://search.cpan.org/~apeiron/local-lib/lib/local/lib.pm#The_bootstrapping_technique mkdir ~/sysfink-cpan cd ~/sysfink-cpan perl -Mlocal::lib=~/sysfink-cpan # Run 'cpan' and inside it: o conf build_requires_install_policy yes o conf prerequisites_policy follow o conf halt_on_failure on o conf commit # Now skip to C) part. # --- B2) Use cpan and paths ------------------------------------------------- # Run 'cpan' and inside it: o conf build_requires_install_policy yes o conf prerequisites_policy follow o conf halt_on_failure on o conf commit o conf makepl_arg "LIB=~/sysfink-cpan/lib/perl5 INSTALLMAN1DIR=~/sysfink-cpan/man/man1 INSTALLMAN3DIR=~/sysfink-cpan/man/man3 INSTALLSCRIPT=~/sysfink-cpan/bin INSTALLBIN=~/sysfink-cpan/bin" o conf mbuildpl_arg "--lib=~/sysfink-cpan/lib/perl5 --installman1dir=~/sysfink-cpan/man/man1 --installman3dir=~/sysfink-cpan/man/man3 --installscript=~/sysfink-cpan/bin --installbin=~/sysfink-cpan/bin" # --- C) Install cpan modules ------------------------------------------------ # Run 'cpan' and inside it: install TAP::Harness install Class::Singleton install Spiffy install DateTime::Locale install DateTime::TimeZone install Test::Exception install DateTime install JSON install Data::Compare install Config::Multi install Test::Tester install DBIx::Class install Net::OpenSSH install Config::General # For some devel utils. # install SQL::Translator exit # --- Set your environment variables ----------------------------------------- # You should call commands printed by perl -Mlocal::lib=$HOME/sysfink-cpan # for A) or export PERL5LIB=$HOME/sysfink-cpan/lib/perl5 # for B) before running any SysFink command. # ---------------------------------------------------------------------------- # --- Section 2) SysFink ---------------------------------------------------- # ---------------------------------------------------------------------------- # Login as root to server machine. # Check out ~/sysfink if not already checked. svn co http://sysfink.googlecode.com/svn/trunk ~/sysfink # --- Client ----------------------------------------------------------------- cd ~/sysfink/client perl t/harness.pl # --- Server ----------------------------------------------------------------- cd ~/sysfink/server # Create/edit server config files. cp conf/sysfink.conf.example conf/sysfink.conf # If you would like to use MySQL then # vi conf/sysfink.conf # Create client's machine config files cat > conf-machines/my-first-machine hostname my-first-machine.my-domain.com dist_type linux-perl-md5 ssh_user root exclude /dev/ /home/ /proc/ /sys/ /var/ /mnt/ [fastscan] exclude / include /etc # If you use SQLite. Create empty db file cp sysfink-empty.db sysfink.db # Run SysFink servers' tests perl t/harness.pl # Check if you can run SysFink server utility. perl sysfink.pl --help # Load config files to database perl sysfink.pl --cmd=mconf_to_db # Import server SSH key/certificate for user 'root' to my-first-machine.my-domain.com # Run first test command on client machine. perl sysfink.pl --host=my-first-machine --cmd=test_hostname # Debug or monitor with more verbose output (--ver=4 to --ver=10). perl sysfink.pl --host=my-first-machine --cmd=test_hostname --ver=10 # Run rest of test command on you client. perl sysfink.pl --host=my-first-machine --cmd=check_client_dir perl sysfink.pl --host=my-first-machine --cmd=remove_client_dir perl sysfink.pl --host=my-first-machine --cmd=renew_client_dir perl sysfink.pl --host=my-first-machine --cmd=test_noop_rpc perl sysfink.pl --host=my-first-machine --cmd=test_three_parts_rpc # Finally run scan testing command. These can take a while. # Consider to use --section=fastscan if you have this in machine config. perl sysfink.pl --host=my-first-machine --cmd=scan_test --section=fastscan perl sysfink.pl --host=my-first-machine --cmd=scan_test # Renew SysFink source code again (if you are paranoid enought) and run the first # normal scan command. perl sysfink.pl --host=my-first-machine --cmd=renew_client_dir perl sysfink.pl --host=my-first-machine --cmd=scan