by Mark Nielsen
Copyright April 2023
Setup Test Environment
Purpose
The purpose of this document is to install multiple applications under /TextEnv with different versions and to easily connect to them.
Set yourself up to sudo as root
Add yourself to sudo.
- Login as root: su -l root
- Execute this as root
echo "" >> > /etc/sudoers
echo "`whoami` ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
- Log out as root : exit
Login as root or sudo to root
Do one of following:
su -l root
sudo bash
Set up the basic environment
Execute these commands as root.
- Download this file manage_env.tgz
- Execute these commands for this product. Login as root as "sudo -iu root bash" if you have sudo or directly as root "su -l root".
mkdir -p /TestEnv
tar -zxvf manage_env.tgz -C /TestEnv
source /TestEnv/env/bin/initial_testenv.sh
Scripts
Name | Purpose
|
/TestEnv/env/bin/initial_testenv.sh | This setups up your account to use /TestEnv. It creates aliases, setups up to change your PATH to be the original push the paths to the binaries. Check out changes to the end of your .bashrc file and changes to your env variables with "env | grep PATH".
|
/TestEnv/env/bin/add_app.sh | This script can be run by the alias 'add_path'. Executed as "add_path mongo5". Or if you wish you have 2 mongo installations "add_path mongo6". NOTE: /TestEnv/env/mongo5.env must exist and should have in it a single
line "export PATH_mongo5=/TestEnv/apps/mongo5/bin" and /TestEnv/apps/mongo5/bin should have softlinks to app the binaries you want include/
|
/TestEnv/env/bin/make_paths.sh | Can be accessed by alias 'make_path'. This alias will take the variables ORIGINAL_PATH, append all Path_* and set it to the env variables PATH.
|
/TestEnv/env/bin/display_paths.sh | Displays the original paths and the paths added to PATH and where they came from.
|