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.
  1. Login as root: su -l root
  2. Execute this as root
    echo "" >> > /etc/sudoers
    echo "`whoami`  ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
  3. 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.
    1. Download this file manage_env.tgz
    2. 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
      	  


    3. Scripts

      NamePurpose
      /TestEnv/env/bin/initial_testenv.shThis 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.shThis 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.shDisplays the original paths and the paths added to PATH and where they came from.