Welcome to Centmin Mod Community
Become a Member

Beta Branch add python_alternatives_setup function for EL8+ in 130.00beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, Apr 30, 2023.

  1. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    2:40 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    add python_alternatives_setup function for EL8+ in 130.00beta01


    - for EL8+ OSes like AlmaLinux 8 or Rocky Linux 8, allow Centmin Mod to install Python out of the box if end user wants to via persistent config /etc/centminmod/custom_config.inc variable PYTHON_INSTALL_ALTERNATIVES='y' that can be set before initial Centmin Mod installation. Or after initial install the same set persistent config variable will install Python 3.6 and setup python binary unversioned reference to default to python3 and set pip to pip3 mapping when you next run centmin.sh menu.
    - EL8+ no longer set unversioned python and pip commands unless you configure it to map pip to pip3 and python to python3 which is what this update allows EL8+ installs to do so.
    - Centmin Mod defaults PYTHON_INSTALL_ALTERNATIVES='n' to disable this unless end user chooses via persistent config /etc/centminmod/custom_config.inc variable PYTHON_INSTALL_ALTERNATIVES='y'

    Continue reading...

    130.00beta01 branch

    Support Centmin Mod


    If you find Centmin Mod useful, please help support Centmin Mod
     
  2. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    2:40 PM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    example on AlmaLinux 8 with Centmin Mod 130.00beta01 via private EL8 installer and via persistent config /etc/centminmod/custom_config.inc variable
    Code (Text):
    PYTHON_INSTALL_ALTERNATIVES='y'

    When you run centmin.sh on existing Centmin Mod install
    Code (Text):
    centmin
    
    /usr/local/src/centminmod /usr/local/src/centminmod
    
    Setup python3 and pip3 alternatives mapping
    you can reference pip for pip3
    you can reference python for python3
    python                  manual  /usr/bin/python3
    pip                     manual  /usr/bin/pip3
    python3                 auto    /usr/bin/python3.6
    
    --------------------------------------------------------
         Centmin Mod Menu 130.00beta01 centminmod.com    
    --------------------------------------------------------
    1).  Centmin Install
    2).  Add Nginx vhost domain
    3).  NSD setup domain name DNS
    4).  Nginx Upgrade / Downgrade
    5).  PHP Upgrade / Downgrade
    6).  Option Being Revised (TBA)
    7).  Option Being Revised (TBA)
    8).  Option Being Revised (TBA)
    9).  Option Being Revised (TBA)
    10). Memcached Server Re-install
    11). MariaDB MySQL Upgrade & Management
    12). Zend OpCache Install/Re-install
    13). Install/Reinstall Redis PHP Extension
    14). SELinux disable
    15). Install/Reinstall ImagicK PHP Extension
    16). Change SSHD Port Number
    17). Multi-thread compression: zstd,pigz,pbzip2,lbzip2
    18). Suhosin PHP Extension install
    19). Install FFMPEG and FFMPEG PHP Extension
    20). NSD Install/Re-Install
    21). Data Transfer (TBA)
    22). Add Wordpress Nginx vhost + Cache Plugin
    23). Update Centmin Mod Code Base
    24). Exit
    --------------------------------------------------------
    Enter option [ 1 - 24 ]
    

    Manual alternatives command verification that unversioned pip and python commands are mapped to pip3 and python3 respectively
    Code (Text):
    alternatives --list | egrep -i 'pip|python'
    python                  manual  /usr/bin/python3
    pip                     manual  /usr/bin/pip3
    python3                 auto    /usr/bin/python3.6
    

    Code (Text):
    cat /etc/os-release 
    NAME="AlmaLinux"
    VERSION="8.7 (Stone Smilodon)"
    ID="almalinux"
    ID_LIKE="rhel centos fedora"
    VERSION_ID="8.7"
    PLATFORM_ID="platform:el8"
    PRETTY_NAME="AlmaLinux 8.7 (Stone Smilodon)"
    ANSI_COLOR="0;34"
    LOGO="fedora-logo-icon"
    CPE_NAME="cpe:/o:almalinux:almalinux:8::baseos"
    HOME_URL="https://almalinux.org/"
    DOCUMENTATION_URL="https://wiki.almalinux.org/"
    BUG_REPORT_URL="https://bugs.almalinux.org/"
    ALMALINUX_MANTISBT_PROJECT="AlmaLinux-8"
    ALMALINUX_MANTISBT_PROJECT_VERSION="8.7"
    REDHAT_SUPPORT_PRODUCT="AlmaLinux"
    REDHAT_SUPPORT_PRODUCT_VERSION="8.7"