Skip to content

Install_Linux

terrelsa13 edited this page May 28, 2025 · 2 revisions

Install MUMC - Linux

  • It is assumed your user has the ability to execute commands using sudo.
    • If not, your system administrator will need to perform the install.

Check Python Version:

  1. Python3.10 is the minimum required version
  2. Open a terminal window using the following keyboard shortcut: ctrl+alt+t
  3. Find the installed python3 version by typing the following command in the terminal window:
    python3 -V
    • You may need to try the above command with python3.10 -V, python3.11 -V, etc... depending on the version of Python already installed
  4. The output should look something like this: python3.10.0
  5. If your Python3 version is >= Python 3.10.0 jump to the Check Python3-pip Version section

Install Alternate Python Version:

  1. Change to the /usr/src/ directory:
    cd /usr/src/
  2. Download Python3.10 (or later):
    sudo wget https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz
  3. Extract the downloaded package:
    sudo tar xzf Python-3.10.0.tgz
  4. Change to the newly extracted Python3.10 package directory:
    cd /usr/src/Python3.10
  5. Compile Python3.10 from the source files:
    sudo ./configure --enable-optimizations --with-lto
  6. Install Python3.10 as an alternate Python version; without overwritting the default Python version:
    sudo make -j altinstall
    • Unless you know what you are doing, do NOT overwrite the default Python version installed on your OS; install additional Python versions using altinstall

Check Python3-pip Version:

  1. In a terminal window type the following command:
    pip3 -V
  2. The output should look something like this: pip #.#.# etc... (Python3.10); make sure the python version at the end is >= Python3.10
  3. If pip3 is installed jump to the Install Git section

Install Python3-pip

There are numerous pages online, like this one and this one, showing how to install pip

Upgrade pip

  1. In a terminal window enter:
    /usr/local/bin/python3.10 -m pip install --upgrade pip

Install git

  1. You can also select your OS and follow git's installation instructions.
  2. Or perform the step below
    1. In a terminal window enter:
      sudo apt update && sudo apt install git -y

Clone MUMC Repo

  1. Cloing the latest MUMC release branch:
    cd /opt && sudo git clone https://github.com/terrelsa13/MUMC.git
  2. The MUMC directory should now exist as /opt/MUMC and its contents will currently belong to the root user
  3. Change the MUMC directory's user:group to the current user's:
    sudo chown -R $USER:$(id -gn $USER) /opt/MUMC

Installing MUMC Dependencies

  1. MUMC requires the following Python3 packages:
    • emoji - Used to remove emojis from text printed to the mumc_debug.log issue#86
    • PyYAML - Needed for parsing the mumc_config.yaml file
    • python_dateutil - Needed for played and created date comparisons
    • six - Used by python_dateutil
  2. These can be installed by using the requirements.txt in the /opt/MUMC directory
  3. In a terminal window enter:
    cd /opt/MUMC && pip3 install -r requirements.txt

Alternate: Installed MUMC Dependencies Globallly

  1. In a terminal window enter:
    cd /opt/MUMC && apt install python3-dateutil python3-six python3-emoji python3-PyYAML

Run MUMC For The First Time

  1. In a terminal window enter:
    python3 /opt/MUMC/mumc.py
    
  2. First time MUMC is run, it will walk through creating the mumc_config.yaml file.

Schedule MUMC To Run Automatically

  1. In the terminal window enter:

    crontab -e
    
  2. At the bottom of the crontab file, type one of the following examples:

    Example #1

    To run /opt/MUMC/mumc.py everyday at 03:21hrs (aka 3:21am)

    21 3 * * * python3 /opt/MUMC/mumc.py
    

    Example #2

    To run /opt/MUMC/mumc.py every Monday at 01:23hrs (aka 1:23am) and save the output to log file /var/log/mumc.log

    23 1 * * 1 python3 /opt/mumc/mumc.py > /var/log/mumc.log 2>&1
    

The following links are a good starting point to learn the crontab syntax:

Learn MUMC terminology

Clone this wiki locally