Deployment Architecture

How to install a Separate Python from Splunk on RHEL 7.9?

randomwaffle
Observer

Hello,

Specs: 

  • Splunk Enterprise 8.2.1
  • Server OS: RHEL 7.9

I have a distributed installation of Splunk Enterprise on RHEL 7.9 which comes with its own version of python, Splunk also comes with two more versions of python. I am creating an external lookup that runs a python script which performs an API call and retrieves the values based on the input from the user in the Splunk Search.

My goal is to install an isolated version of Python 3 on the server. To achieve this I need to install Python 3 from source, and in order to compile the source code I need to install "Development Tools" along with other software that will be detailed below.

Main concern: I am not sure if installing this tools might negatively affect the behavior of Splunk or the OS Python. This Splunk instance is located on a critical infrastructure, and there is no margin for error.

For reference below are the steps to be performed.

  1. Download Python from source: https://www.python.org/downloads/source/
  2. Create directory for new python installation: opt/ti_scripts/python3.10.4
  3. Install tools for compiling code: sudo yum groupinstall "Development Tools" -y
  4. Additional compiling tools: sudo yum install gcc openssl-devel libffi-devel bzip2-devel -y
  5. Decompress python tar: tar xvf Python-3.10.4.tgz
  6. Go to decompressed directory: cd Python-3.10.4
  7. Specify location for the new python installation: sudo ./configure --enable-optimizations --prefix=/opt/ti_scripts/python3.10.4
  8. Install without altering default python: sudo make altinstall
  9. Create a soft link for the new python: sudo ln -s /opt/ti_scripts/python3.10.4 usr/bin/python3.10.4

Please help me with this situation, thanks.

Labels (4)
Tags (2)
0 Karma
Get Updates on the Splunk Community!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...