본문 바로가기
프로그래밍 언어/Mathematica

[Mathematica] 리눅스에 설치 및 여러 계정들이 모두 사용할 수 있게 설정하기

by Physics 2021. 1. 30.
728x90

학부생때부터 Mathematica를 사용한지 약 5년 이상이 되었고, 지금까지 Window OS에서 사용을 하였다. 하지만, 최근에 랩실에서 클러스터의 마스터 서버에 설치할 Linux OS 용을 구매했다. Linux OS에 설치를 하는 것은 아래의 Wolfram 홈페이지를 참조하면 된다.

support.wolfram.com/ko/12453 

 

Wolfram 지원의 빠른 답변

제품 동기화, 구매, 고장 진단, 업그레이드 등 Wolfram 제품에 관한 일반적인 해결책이 있습니다.

support.wolfram.com

설치과정을 요약하면. 
 (1) mathematica 홈페이지에서 구매한 프로그램을 다운받는다. ( 리눅스 버전의 경우, .exe파일이 아닌 Shell script(.sh)로 되어있다.) 

 (2) 해당 프로그램을 리눅스 서버로 옮긴다음 다운 받은 쉘 스크립트를 실행시킨다. 
    - 설치 과정 중, 설치 디렉토리, 실행파일 위치, wolfram script 설치 등을 물어본다. 
    - 기본 설치 디렉토리: /usr/local/Wofram/Mathematica/<해당 설치 버전> 
    - 실행 파일 위치: /usr/local/bin  

설치가 완료가 되면, 아래의 방법에 따라 activation key를 활성화하면 된다. 

reference.wolfram.com/language/tutorial/ActivatingMathematica.html

 

Activating Mathematica—Wolfram Language Documentation

TECH NOTE Activating Mathematica Once the installation of Mathematica is complete, upon first launching it you will be presented with the Wolfram Product Activation dialog. There are three methods to activate Mathematica: online activation, manual activati

reference.wolfram.com


개인 유저로 mathematica를 실행시킨 후, activation key를 입력하면 아래의 디렉토리 위치에 사용자의 라이센스 정보가 저장된다.
 - 라이센스 정보가 들어있는 파일: mathpass
 - 파일의 위치: ~/.Mathematica/Lisencing/

그렇다면, 하나의 컴퓨터에 Mathematica가 설치된 경우, 다른 계정의 이용자들이 Mathematica를 이용하기 위해선 어떻게 해야하는가? 

설명하기 앞서, Mathematica의 License에 대해서 살펴보아야 하는데, Mathematica의 License class는 아래와 같이 "Single-Machine""Network use"로 나뉘어져 있다 [1]. 

License Class: Indicates whether the Software is licensed for Single-Machine or Network use. Your License Class is indicated on Your License Certificate.
...
Single-Machine: A Product or a Controlling or Computation Process that can only be reinstalled on another computer by applying a System Transfer.
Network: A Controlling or Computation Process (or Product containing one or more such Processes) that may move to different computers within the licensed network(s) without the need to apply a System Transfer.

 

Wolfram Mathematica의 구매 후, 제품의 license 정보를 보면 standard 및 enterprise edition의 경우, single machine license로 되어있는 것을 확인할 수 있다. 따라서, 동일한 컴퓨터 내의 여러 계정들도 mathematica를 사용할 수 있다. 그렇다면, 어떻게 컴퓨터 내의 다른 계정들은 어떻게 해야 Mathematica를 이용할 수 있을까? 크게 두 가지 방법이 있다. 

     (1) 각각의 계정들마다 각 계정 내에서 처음 mathematica를 실행 시, 동일한 activation key를 입력할 것 
     (2) mathpass를 Mathematica의 share directory에 옮기기 

여기서는 두 번째 방법에 대해서 설명하겠다. 

참조로 mathpass가 저장되는 위치는 각 OS별 아래와 같다 [2]. 

(1) Windows

C:\ProgramData\Mathematica\Licensing\mathpass
C:\Users\<user>\AppData\Roaming\Mathematica\Licensing\mathpass
C:\Program Files\Wolfram Research\Mathematica\Configuration\Licensing\mathpass

 

(2) Mac 

/Library/Mathematica/Licensing/mathpass
~/Library/Mathematica/Licensing/mathpass


(3) Linux 

/usr/share/Mathematica/Licensing/mathpass
~/.Mathematica/Licensing/mathpass
/usr/local/Wolfram/Mathematica/Configuration/Licensing/mathpass

 

우리가 하는 것은 mathpass를 /usr/share/Mathematica/Licensing/에 옮긴 후, 각 계정들이 접근할 수 있도록 권한 수정을 하는 것이다 [4].  

(1) <user>의 홈디렉토리에 있는 mathpass 파일 옮기기

sudo cp /home/user/.Mathematica/Licensing/mathpass /usr/share/Mathematica/Licensing/. 

 

(2) mathpass의 모든 계정들이 접근할 수 있도록 권한을 수정하기

sudo chmod a+r /usr/share/Mathematica/Licensing/mathpass

 

이후, 모든 계정에서 별도의 activation key 인증 없이도 Mathematica를 이용할 수 있다. 

 

 

추가적인 사항은 아래의 레퍼런스를 참조하면 될 것 같다. 

Reference:
[1] www.wolfram.com/legal/agreements/wolfram-mathematica/  
[2] www.addlink.es/images/pdf/agdweb2071.pdf  
[3] support.wolfram.com/ko/25655?src=mathematica  
[4] support.wolfram.com/17399

728x90

댓글