class:phy3026

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
class:phy3026 [2019/09/15 16:52] minerva1993class:phy3026 [2023/03/06 13:44] (current) – external edit 127.0.0.1
Line 26: Line 26:
 <code> <code>
 sudo vi /etc/apt/sources.list sudo vi /etc/apt/sources.list
-:%s/kr.archive.ubuntu.com/mirror.kakao.com/    (콜론 포함하여 vi기능에서 찾아바꾸기임)+:%s/archive.ubuntu.com/mirror.kakao.com/    (콜론 포함하여 vi기능에서 찾아바꾸기임)
 ('kr.archive.ubuntu.com'부분은 사람마다 다를 수 있으니 적당히 바꾸면 됨) ('kr.archive.ubuntu.com'부분은 사람마다 다를 수 있으니 적당히 바꾸면 됨)
 :wq                                            (저장하고 나오기) :wq                                            (저장하고 나오기)
Line 32: Line 32:
 sudo apt-get upgrade                           (설치하시겠습니까? [Y/n]등의 메시지 나오면 Y 선택하여 설치) sudo apt-get upgrade                           (설치하시겠습니까? [Y/n]등의 메시지 나오면 Y 선택하여 설치)
 sudo apt install python2.7                     (python 2.7 설치. 기본은 3.5) sudo apt install python2.7                     (python 2.7 설치. 기본은 3.5)
-sudo apt install python-pip                    (python2용 pip설치. python3은 python3-pip로 설치) 
 sudo pip install numpy                         (예를 들어 numpy 설치) sudo pip install numpy                         (예를 들어 numpy 설치)
 </code> </code>
Line 65: Line 64:
 To write and excute python code in your local browser, you need to create ssh tunnel to server. First, make sure you are using unique port number for tunnel. Follow the lines in the server. To write and excute python code in your local browser, you need to create ssh tunnel to server. First, make sure you are using unique port number for tunnel. Follow the lines in the server.
 <code> <code>
 +##DO THIS ONLY AT THE FIRST TIME##
 jupyter notebook --generate-config jupyter notebook --generate-config
 vi /home/YOURID/.jupyter/jupyter_notebook_config.py vi /home/YOURID/.jupyter/jupyter_notebook_config.py
 +##DO THIS ONLY AT THE FIRST TIME##
 </code> </code>
  
Line 76: Line 77:
 You can check your port number in ''c.NotebookApp.port = 8888''. Now, create tunnel in your ''LOCAL(in desktop)'' terminal (not in server!). You can check your port number in ''c.NotebookApp.port = 8888''. Now, create tunnel in your ''LOCAL(in desktop)'' terminal (not in server!).
 <code> <code>
-ssh -f -N -L localhost:TunnelPort:localhost:TunnelPort YOURID@210.117.210.XX+ssh -f -N -L localhost:9XXX:localhost:9XXX YOURID@210.117.210.XX
 </code> </code>
-Please don't confuse ''PORT (port to connect server when login)'' and ''TunnelPort (port to listen data from the server)''! 
  
 The address to jupyter notebook will appear in the terminal. Copy & paste into local internet browser. The address to jupyter notebook will appear in the terminal. Copy & paste into local internet browser.
  • class/phy3026.1568533945.txt.gz
  • Last modified: 2023/03/06 13:44
  • (external edit)