Installation¶
Installing a copy of BANDIT¶
Note
In the following instructions replace <latest> with the actually downloaded release, e.g. 1.9.2.
Download the latest released version of BANDIT from ftp://phyglos.org/bandit and uncompress the downloaded tarball:
$ wget ftp://phyglos.org/bandit/bandit-<latest>.tar.gz
$ tar xvf bandit-<latest>.tar.gz
Now you can, optionally, rename the new BANDIT directory:
$ mv bandit-<latest> bandit
As root user, move this new directory to /opt
. Then change into that
directory and set proper permissions:
# mv bandit /opt
# cd /opt
# chown -R root.root /opt/bandit
Hint
BANDIT should work in any directory other than /opt
, like /usr/local
.
However the former is the tested and supported place for BANDIT. Also, see
below how several copies of the BANDIT can coexist in the /opt directory
with different names.
Installing multiple copies of BANDIT¶
When using BANDIT to raise a new phySystem from some existing phySystem it may be convenient to have more than one copy of the BANDIT installed, i.e. one for managing the present HOST system and a new, updated copy of the toolkit for raising the new TARGET system.
Multiple copies of the BANDIT toolkit can coexist in the same system provided
that they are installed on different directories. For example, it is possible to
have the main BANDIT in /opt/bandit/
to manage the local host functionality
and a second toolkit installed in /opt/bandit-test
in order to test a new
release of the BANDIT or new releases of some BANDIT catalogs.
To install a second copy of BANDIT, just check the directory name of previously installed BANDIT toolkits and, if necessary, change the name of the directory for the new copy of BANDIT so it does not interfere with the present copy:
# ls -al /opt
# mv bandit-x.y.z /opt/bandit-test
# chown -R root.root /opt/bandit-test
This new copy of the BANDIT, although installed, is not active yet. The previous
copy will still respond to the bandit
commands. In order to use the new
copy, activate this copy as explained in Using the BANDIT.
Installing the development branch of BANDIT¶
Alternatively to downloading a given, specific release of BANDIT, you can clone the development master branch from the GitHub repository.
Warning
This is an advanced method for development purposes and advanced users and it is not necessary, nor recommended for the regular use of BANDIT.
Install BANDIT from the Git repository¶
To install the latest git branch from the Git repository, clone the master branch:
$ git clone https://github.com/phyglos/bandit
or give a destination name for a specific directory, if the bandit directory exists:
$ git clone https://github.com/phyglos/bandit bandit-new
Update the BANDIT from the Git repository¶
In order to update a previously cloned release of the BANDIT development branch, you need first preserve any changes made in the present copy of BANDIT.
Check for any changes¶
Enter the directory of BANDIT to update:
# cd /opt/bandit-x.y.z
Review what changes has been made to the original git clone of BANDIT:
# git status
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: etc/bandit.conf
The bandit configuration file is probably the only one expected to have changed.
Update the bandit¶
The now clean repository can be updated from the git origin:
# git pull
Updating 0f1dee0..bfba297
Fast-forward
.gitignore | 3 ++-
bin/bandit | 24 ++++++++++++++++++------
bin/bandit_database | 2 +-
etc/bandit.conf | 5 +++++
4 files changed, 26 insertions(+), 8 deletions(-)
Recover local changes¶
The local changes can now be recovered in front of the updated commits:
# git stash pop
Auto-merging etc/bandit.conf
On branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: etc/bandit.conf