- Unpack archive:
-
Unzip/untar/uncpio the compressed archive, preferably to a private
directory, hereafter known as <sids_root>.
- Install private copies of system utilities:
-
Cheesewire uses perl, netstat, ps and lsof.
It makes
sense to use private copies of these utilities and any
shared-object libraries (.sos) used (use ldd to determine
these) — better still,
use statically-linked versions of these utilities.
Either (less than ideal):
copy the utilities from /bin and/or /usr/sbin into
<sids_root>/bin; then copy required .sos (use ldd)
into <sids_root>/lib (set LD_LIBRARY_PATH as required,
e.g., in src/sids and/or bin/sids — one should be
sym-linked to the other).
Or (ideal):
Get source packages
(coreutils, fileutils, procps, net-utils,
lsof and bash), then
build with static linking
and install in <sids_root>/bin.
- Check required Perl modules:
-
Cheesewire requires some modules (from
CPAN) which may not be included in
your Perl download/installation:
# Algorithm-Diff-1.15
# ...no longer needed
Digest-MD5-2.33
File-Tail-0.98
# ...these two are simple to add to your private, statically-linked
# Perl tree after you've built it...
Proc-ProcessTable-0.39
# ...this one needs a bit more work --- see below...
Time-HiRes-1.59
# ...actually, I found this as an included extension to my private
Perl installation (CHECK FIRST as installing an additional
copy of Time-HiRes, with a different version, can cause
CHAOS)
The versions numbers listed show those tested and working.
Generic install instructions (after private/statically-linked Perl tree
build withing <sids_root>):
cd <module_src_dir>
<sids_root>/bin/perl Makefile.pl
make
make test
make install
- Installation of Proc-ProcessTable
-
This one requires a little more work since we are using a statically-linked
version of Perl. Once you have downloaded and uncompressed and
untarred your Perl source tree:
# unpack the tar.gz file in say ~/tmp/Proc-ProcessTable-<ver>
# then...
cd perl-<version>/ext
mkdir Proc
cd Proc
ln -s ~/tmp/Proc-ProcessTable-0.40 ProcessTable
cd ../lib/auto
mkdir Proc
cd Proc
ln -s ~tmp/Proc-ProcessTable-0.40/blib/arch/auto/Proc/ProcessTable ProcessTable
Notes on Q and A:
Install a dynamically-linked version of Perl? [y]
-- answer NO: n
Which extensions do you wish to use?
-- ensure Proc/ProcessTable is in the list...
- Install a private, statically-linked copy of Perl:
-
This is easy (yes, really).
Download the Perl
source code and unpack it to <perl_src_dir>. cd
to <perl_src_dir>, then
rm -f config.sh Policy.sh
# ...these exist if you've run Configure before
sh Configure
# ...NOT "Configure -de"
and answer the questions — the defaults are mostly fine, but
choose <sids_root> for the installation location (so the
executables end up in <sids_root>/bin and the Perl
tree itself ends up in <sids_root>/lib. Then
make
make test
You should now have a dynamically-linked perl executable.
Rename it (e.g., perl.dynamic).
Determine the command required to build the dynamically-linked
perl executable (e.g., after renaming perl,
run make again and note the last/only compilation command issued,
then delete the new perl executable) and issue it with
-static inserted to build a statically-linked executable:
gcc -static -o perl -L/usr/local/lib perlmain.o \
lib/auto/DynaLoader/DynaLoader.a lib/auto/attrs/attrs.a \
lib/auto/B/B.a...
Finally
make install
- Configure Cheesewire:
-
- Ensure <sids_root>/src/sids.pl uses your private,
statically-linked perl executable.
- Ensure <sids_root>/src/Utils/* use your private,
statically-linked copies of lsof and netstat,
and that each utility module recognises the output format of
the corresponding binary executable (e.g., netstat on
Solaris 7 has a very different output format to that on Linux).
- Make backup copies of each file in each module-signature
configuration directory in <sids_root>/etc.
- Edit each module-signature configuration file
(<sids_root>/etc/*/*) and change as appropriate (see
individual Module notes for details).
- Run configuration scripts for
IDM_cheesewire.
- Edit /src/Modules_Config.pm and /src/SID_Config.pm
as appropriate --- see the comments contained therein.
- If using dynamic system utilites (netstat, etc.), set
the LD_LIBRARY_PATH within the wrapper script
/src/sids to point to the local copies of the system
.sos (e.g., <sids_root_dir>/lib.
- Start Supporting Scripts
-
- <sids_root>/src/Scripts/taillogfile
- (Either) Start:
-
Start the thing:
cd /src
./sids >& ../var/log/sids.log &
checking the content of sids.log to ensure all is well.
- (Or) Configure Cron:
-
...
# -- TODO
# -- TODO
...
- Monitor the log files:
-
Monitor the contents of the log files within /var/log,
including sids.log (see above) to ensure everything is well.