Environment modules을 설정하고 사용합니다.
Rocky 9.5
소프트웨어 환경을 동적으로 관리하고 사용자 세션에서 필요한 프로그램이나 라이브러리의 버전을 설정할 수 있게 해주는 Unix/Linux 시스템의 유틸리티입니다.
# dnf -y install environment-modules
# module avail
---------- /usr/share/Modules/modulefiles ----------
dot module-git module-info modules null use.own
Key:
modulepath
# echo $MODULEPATH
/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles
# mkdir /apps/modulefiles
# vim /etc/environment-modules/modulespath
#/usr/share/Modules/modulefiles:/etc/modulefiles:/usr/share/modulefiles
/apps/modulefiles
# su –
# echo $MODULEPATH
/appss/modulefiles
# mkdir /apps/modulefiles/python
# vim /apps/modulefiles/python/3.12.8
#%Module
# Module description
proc ModulesHelp { } {
puts stderr "This module sets up the environment for Python 3.12.8."
}
module-whatis "Sets up Python 3.12.8 environment."
# Set PYTHONHOME
setenv PYTHONHOME /apps/python/3.12.8
# Prepend to PATH
prepend-path PATH $env(PYTHONHOME)/bin
# Prepend to LD_LIBRARY_PATH
prepend-path LD_LIBRARY_PATH $env(PYTHONHOME)/lib
# vim /apps/modulefiles/python/3.13.1
#%Module
# Module description
proc ModulesHelp { } {
puts stderr "This module sets up the environment for Python 3.13.1."
}
module-whatis "Sets up Python 3.13.1 environment."
# Set PYTHONHOME
set PYTHONHOME /apps/python/3.13.1
# Append to PATH
append-path PATH $PYTHONHOME/bin
# Append to LD_LIBRARY_PATH
append-path LD_LIBRARY_PATH $PYTHONHOME/lib
# module avail python
-------------------- /apps/modulefiles --------------------
python/3.12.8 python/3.13.1
# module help python/3.12.8
-------------------------------------------------------------------
Module Specific Help for /apps/modulefiles/python/3.12.8:
This module sets up the environment for Python 3.12.8.
-------------------------------------------------------------------
# module help python/3.13.1
-------------------------------------------------------------------
Module Specific Help for /apps/modulefiles/python/3.13.1:
This module sets up the environment for Python 3.13.1.
-------------------------------------------------------------------
# module whatis
-------------------- /apps/modulefiles --------------------
python/3.12.8: Sets up Python 3.12.8 environment.
python/3.13.1: Sets up Python 3.13.1 environment.
# module load python/3.12.8
# module list
Currently Loaded Modulefiles:
1) python/3.12.8
# which python
/apps/python/3.12.8/bin/python
# module load python/3.13.1
# module list
Currently Loaded Modulefiles:
1) python/3.12.8 2) python/3.13.1
# which python
/apps/python/3.12.8/bin/python
# echo $PATH
/apps/python/3.12.8/bin:/root/.local/bin:/root/bin:/usr/share/Modules/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/apps/python/3.13.1/bin
# module unload python/3.12.8
# module list
Currently Loaded Modulefiles:
1) python/3.13.1
# module load python/3.12.8
# module list
Currently Loaded Modulefiles:
1) python/3.13.1 2) python/3.12.8
# module purge
# module list
No Modulefiles Currently Loaded.
# vim /etc/environment-modules/initrc
+ module load python/3.12.8
# su – seuheu
Loading python/3.12.8
# python –version
Python 3.12.8
# vim /etc/environment-modules/siteconfig.tcl
prepend-path PATH /apps/python/3.13.1/bin
prepend-path LD_LIBRARY_PATH /apps/python/3.13.1/lib
# su – seuheu
$ echo $PATH
/home/seuheu/.local/bin:/home/seuheu/bin:/usr/share/Modules/bin:/apps/python/3.12.8/bin:/apps/python/3.13.1/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin
https://youtu.be/nNDRk8bt3c4 1. 개요 virt-manager를 사용하여 KVM/QEMU 가상화 환경에서 Windows 11을 설치하는 방법을 소개합니다. 설치 과정에서는 virtIO…
https://youtu.be/YL23ogmZhuY 1. 개요 이 문서에서는 Windows 11 24H2 버전 설치 방법에 대해 설명합니다. USB 설치 디스크를…
https://youtu.be/Nm9swsyeXlY 1. 개요 virt-install 명령어를 이용해 Rocky Linux 9.5 기반 KVM 가상 머신을 생성하는 방법을…
https://youtu.be/zZQl7OJZf7Q 1. 개요 virt-manager를 이용하여 KVM 가상 머신을 생성하는 방법을 설명합니다. Rocky Linux 9.5 ISO…
https://youtu.be/UPeCJbP3UIE 1. 개요 KVM 기반의 가상화 시스템 설치하는 방법을 소개합니다. 2. 버전 Rocky Linux 9.5…
https://youtu.be/wqTxt1H31y4 1. 개요 서버에 2개 이상의 NIC(Network Interface Card)가 있을 때, 고가용성과 장애 대응을 위해…