Raspberry Pi_Kor_17.5.2 package repository로 배포되는 프로그램 설치


Published Book on Amazon


All of IOT

Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 1

All of IOT

Starting with the Latest Raspberry Pi from Beginner to Advanced – Volume 2


출판된 한글판 도서


최신 라즈베리파이(Raspberry Pi)로 시작하는 사

물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (상)

최신 라즈베리파이(Raspberry Pi)로 시작하는 사

물인터넷(IOT)의 모든 것 – 초보에서 고급까지 (하)


Original Book Contents


17.5.2  package repository로 배포되는 프로그램 설치  

 

   "apt-get install" 명령 - 프로그램 설치

 

package repository에 있는 프로그램을 설치할 때는 "apt-get" 명령에서 "install" command를 사용한다.

 

[명령 형식]

apt-get   [options]   install  <package>

 

[명령 개요]

    지정된 package를 시스템에 설치한다.

    user 권한    -- super user.

 

[상세 설명]

    이 명령을 수행하면 package manger source list로 사용하는 "/etc/apt/sources.list" 파일을 참조하여 원하는 package를 찾는다.

 


 

[사용 Example]

여기서는 원격접속에서 VNC server로 사용되는 <TightVNC> 프로그램의 server 프로그램을 설치하는 작업을 해보도록 하겠다. 이 프로그램은 기본적으로 package manager의 프로그램 목록에 포함되어 있는 프로그램이므로 특별한 download 작업을 할 필요가 없이 다음과 같이 설치작업을 진행한다.

 

pi@raspberrypi ~ $ sudo apt-get install tightvncserver

Reading package lists... Done

Building dependency tree

Reading state information... Done

Suggested packages:

  tightvnc-java

The following NEW packages will be installed:

  tightvncserver

0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.

Need to get 0 B/786 kB of archives.

After this operation, 1,509 kB of additional disk space will be used.

Selecting previously unselected package tightvncserver.

(Reading database ... 77431 files and directories currently installed.)

Unpacking tightvncserver (from .../tightvncserver_1.3.9-6.4_armhf.deb) ...

Processing triggers for man-db ...

Setting up tightvncserver (1.3.9-6.4) ...

update-alternatives: using /usr/bin/tightvncserver to provide /usr/bin/vncserver (vncserver) in auto mode

update-alternatives: using /usr/bin/Xtightvnc to provide /usr/bin/Xvnc (Xvnc) in auto mode

update-alternatives: using /usr/bin/tightvncpasswd to provide /usr/bin/vncpasswd (vncpasswd) in auto mode

 


 

   프로그램 재설치

 

만약 package repository로 배포되는 프로그램이 설치되는 도중 문제가 발생하여 정상적으로 설치되지 않은 경우나 설치한 이후 필요에 의해 재설치가 필요한 경우는 apt-get에서 "install" command와 함께 "--reinstall" option을 사용하여 재설치 작업을 할 수 있다.

 

[명령 형식]

apt-get   --reinstall    install  <package>

 

[명령 개요]

    지정된 package를 시스템에 설치한다.

    user 권한    -- super user.

 

[상세 설명]

프로그램을 재설치하면 해당 프로그램에 대한 기존의 configuration 항목은 그대로 유지되는 효과가 있다. 이 사례에서는 처음 <TightVNC> server를 설치할 때 생성한 connection 암호 등이 그대로 유지된다. 만약 이러한 모든 설정사항들도 모두 없애고 다시 설치하고자 하면 "프로그램 설치 제거" 작업을 수행한 다음에 다시 처음부터 설치하는 절차를 수행해야 한다.    

 

[주요 option]

--reinstall

 

Re-install packages that are already installed and at the newest version. Configuration Item: APT::Get::ReInstall.

 


 

[사용 Example]

다음은 <TightVNC> server 프로그램을 재설치 하는 명령이다.

 

pi@raspberrypi ~ $ sudo apt-get --reinstall  install  tightvncserver

Reading package lists... Done

Building dependency tree

Reading state information... Done

0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.

Need to get 0 B/786 kB of archives.

After this operation, 0 B of additional disk space will be used.

(Reading database ... 77558 files and directories currently installed.)

Preparing to replace tightvncserver 1.3.9-6.4 (using .../tightvncserver_1.3.9-6.4_armhf.deb) ...

Unpacking replacement tightvncserver ...

Processing triggers for man-db ...

Setting up tightvncserver (1.3.9-6.4) ...

 

 


 

Leave a Reply