3 Replies Latest reply on Apr 9, 2019 12:51 PM by Chase Colvin

    For Any Having Trouble Installing And Configuring Patrol Agents On Linux Hosts...

    Chase Colvin
      Share:|

      Hey all,

       

      My team and I are far from being Linux gurus of any kind. We know enough to get by, and our google-fu is strong, but none of us would cut it as a Linux administrator. As such, we were having trouble getting our Patrol Agent installed and running as a service on one of many RHEL 7 hosts we have been inducting into TrueSight. After a lot of forum crawling, engaging with support, and trial and error, we have compiled some instructions that may prove to be helpful for any who have experienced the same frustrations we have.

       

      Any feedback or corrections are welcome. The idea here is to make relatively clear instructions available to any who need them in the future.

       

      DISCLAIMER: These instructions do not come with any guarantees, and I strongly recommend that you have at least some familiarity with bash before attempting to follow them. Also, in any case where a full path is given for a script that needs to be run, you will either want to "cd" to that directory, the run the script with a "./", or run it using the full path using "bash -c 'script path and parameters here' ". Again, this comes back to having some basic familiarity with bash.

       

       

      To install the patrol agent and enable it to run as a service:

       

      1) Create a service account for the agent.
      (From here on, that account will be referred to as "patrolagent", but yours can be named whatever makes sense to you.)

       

      2) Copy Patrol Agent tar file downloaded from the Presentation server to "/home/patrolagent".

      (The location matters little, as long as your service account has full access to the folder.)

       

      3) Run "chown -R patrolagent:patrolagent" on the Patrol Agent tar file to change ownership to "patrolagent".

      (Either log in as the service account directly, or "su" to that account from your own. e.g. "su patrolagent")

       

      4) Extract files from tar file in "/home/patrolagent".
      (Or wherever you placed the tar file in step 2. Command to extract from tar file is "tar -xzvf TargetFileName". Make sure you are currently in the directory you want the files to be extracted to.)

       

      5) Create the directory "/opt/bmc". "patrolagent" should be the owner of "/opt/bmc" with 755 permissions.
      (Look up "chown" and "chmod" commands for details on taking ownership and setting permissions, if needed.)

       

      6) Run "/home/patrolagent/RunSilentInstall.sh" as "patrolagent" to initiate install.

      (As mentioned in the disclaimer, either "cd" to "/home/patrolagent" then run the script with "./RunSilentInstall.sh", or call script with the full path by running "bash -c '/home/patrolagent/RunSilentInstall.sh' ".)

       

      7) Run "/opt/bmc/Patrol3/agent_configure.sh -d" as "root" to set permissions and ownership of PATROL binaries.

      (Same conditions apply as the step above. Either "cd" to "/opt/bmc/Patrol3" and run "./agent_configure.sh -d", or run "bash -c '/opt/bmc/Patrol3/agent_configure.sh -d' ".)

       

      8) Change ownership of "/etc/patrol.d" to "patrolagent" and grant recursive 755 permissions to that folder.

      (Look up "chown" and "chmod" commands for details on taking ownership and setting permissions, if needed.)

       

      9) Run "/opt/bmc/common/security/config_v3.0/sec_configure.sh /opt/bmc/Patrol3 0" as "root" to set security settings.

      (Either "cd" to "/opt/bmc/common/security/config_v3.0" and run "./sec_configure.sh /opt/bmc/Patrol3 0", or run "bash -c '/opt/bmc/common/security/config_v3.0/sec_configure.sh /opt/bmc/Patrol3 0' ". Ensure you run this script as "root".)

       

      10) Run the following commands and scripts as "patrolagent" to stop and set important parameters for the Patrol Agent.

      - "/opt/bmc/Patrol3/scripts.d/S50PatrolAgent.sh stop"

      - "cd /opt/bmc/Patrol3/"

      - ". ./patrolrc.sh"

      (Must be done in that order because the script uses "pwd" to set a variable, which needs to be "/opt/bmc/Patrol3/". The first "." must be included to ensure the scripted is sourced from the current shell to set the environment variables appropriately. Can also be run like "source ./patrolrc.sh".)

       

      11) Next, create a file named "patrolagent.service" in "/etc/systemd/system", the file must have the following contents

      ("/usr/lib/systemd/system" seems to also be a valid location for the "patrolagent.service" file. I'm personally not sure of the difference.) :

       

      [Unit]

      Description=Patrol Agent service running on port 3181

      After=network.target syslog.target local-fs.target

       

      [Service]

      Type=forking

      ExecStart=/opt/bmc/Patrol3/scripts.d/S50PatrolAgent.sh start 3181

      ExecStop=/opt/bmc/Patrol3/scripts.d/S50PatrolAgent.sh stop 3181

       

      [Install]

      WantedBy=multi-user.target

       

       

      12) After creating that file, run "systemctl enable patrolagent" and then "systemctl start patrolagent".

       

       

       

      ********************************************************

       

       

      If you have to completely uninstall the Patrol Agent:

       

      1) Uninstall it using script "/opt/bmc/Uninstall/uninstall.sh -silent all_kms'.

       

      2) Delete all the content in "/opt/bmc"

       

      3) Delete "patrol.d" folder in "/etc" directory.