1 / 47

프로그램 , 커널 설치 및 업그레이드

프로그램 , 커널 설치 및 업그레이드. SPARCS 10 박준성 koolvibes. 그에 앞서. wget [ url ] 파일 다운로드 tar [ cxvzf ] 파일 압축 / 풀기. tar.gz 압축하기 tar cvf filename.tar file1… gzip filename.tar tar.gz 한번에 압축하기 tar cvzf filename.tar file1… tar.gz 압축풀기 gunzip filename.tar.gz tar xvf filename.tar

lea
Download Presentation

프로그램 , 커널 설치 및 업그레이드

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 프로그램, 커널설치 및 업그레이드 SPARCS 10 박준성 koolvibes

  2. 그에 앞서.. wget [url] 파일 다운로드 tar [cxvzf] 파일 압축/풀기 • tar.gz 압축하기 tar cvf filename.tar file1… gzip filename.tar • tar.gz 한번에 압축하기 tar cvzf filename.tar file1… • tar.gz 압축풀기 gunzip filename.tar.gz tar xvf filename.tar • tar.gz 한번에 풀기 tar xvzf filename.tar.gz

  3. 프로그램 설치 프로그램을 이루는 정보들을 적재적소에 배치하는 과정

  4. 의존성 (dependency) 각 프로그램들은 의존성을 가진다. shared library dependency 설치 시 이미 일부 라이브러리가 깔려 있어 깔리지 않거나 삭제 시 라이브러리가 삭제되어 다른 프로그램이 동작하지 않는 경우가 있다. 프로그램의 설치와삭제에서 생기는 수많은 문제들은 dependency 때문이므로 주의하도록 한다.

  5. ldd를 사용하여 프로그램들의 dependency 관계를 알 수 있다.

  6. 프로그램 설치하기 소스 이용 코드를 다운로드 하여 설치 패키지 이용 • redhat • RPM, yum, apt-get • debian • Dpkg, dselect, apt-get, aptitude • 기타 패키지 • pip, easy_install, rvm

  7. 소스 코드 이용 • 코드를 다운로드 한다.(보통 압축파일) • 압축을 푼다. • Configuration을 한다. • Compile을 한다. • 설치를 한다.

  8. 소스 코드 이용 여러가지 설정 Makefile파일 설정 Configure Makefile의 정보대로 실행 가능한 바이너리 생성 make make install 바이너리 파일들 시스템의 적재적소에 비치

  9. 소스 코드 사용 $ wget [URL] $ tar –zxvf [filename.tar.gz] $ ./configure 설정 파일이 생김 $ make 생긴 설정 파일로 인스톨러 생성 # make install 만든 인스톨러 파일로 시스템에 설치

  10. 실습 – python 설치 • 소스 코드를 다운받아 Python을 인스톨 해 보자. • http://www.python.org/download/

  11. 실습 – 프로그램의 위치 • python, ls등의 프로그램들이 어디에 깔려있는지 알아 보세요

  12. 패키지 사용 • redhat • RPM, yum, apt-get • debian • Dpkg, dselect, apt-get, aptitude • 기타 패키지 • pip, easy_install, rvm

  13. Redhat-RPM • 커널을 포함한 라이브러리, 응용프로그램이 모두 rpm으로 제공. • ex) foobar-1.0-1.i386.rpm • 컴파일할 필요가 없음

  14. Redhat-RPM # rpm -q 패키지이름 # rpm -Uvh파일이름.rpm # rpm -ivh파일이름.rpm # rpm –e 패키지이름 # rpm –i ftp://[source] 좋은 참고 자료 :http://wiki.kldp.org/wiki.php/LinuxdocSgml/Rpm-Usage-KLDP

  15. Redhat-yum • RPM의 프론트엔드 • 패키지 의존성 문제를 해결 • list 기능 사용

  16. Redhat-yum • 패키지 찾기# yum list available : 설치가 가능한 패키지 목록# yum list installed : 이미 설치된 list 패키지 목록# yum list extras : 일반 저장소에서 설치되지 않는 패키지 목록# yum list *gcc* : 'gcc'타이틀이 있는 패키지 목록# yum list updates : 업데이트 가능한 패키지 목록# yum info wordpress: wordpress패키지에 대한 설명# yum info gcc* : gcc로 시작되는 패키지 설명# yum search gcc: gcc문자열을 포함한 패키지의 검색 • 패키지 설치# yum install gcc:gcc패키지 다운로드 인스톨# yum groundinstallgcc : gcc데스크톱 패키지의 전체 세트를 다운로드 인스톨

  17. Redhat-yum • 패키지 업데이트# yum check-update : 업데이트가 준비된 모든 패키지를 리스트한다.# yum list update gcc* : gcc*이름으로 이용 가능한 업데이트를 찾는다.# yum update gcc* : 모든 gcc패키지를 업데이트 한다.# yum update 업데이트가 준비된 모든 패키지를 업데이트한다.# yum groupupdate파일명 그룹의 모든 패키지를 업데이트한다. • 패키지 제거하기# yum remove gcc: gcc패키지를 제거한다.# yum remove gcc* : gcc로 시작되고 있는 패키지를 제거한다.# yum groupremovegcc: gcc그룹에서 모든 패키지를 제거한다. • 패키지 지우기# yum clean packages : cache에서 패키지를 지운다.# yum clean metadata : cache에서 metadata를 지운다.# yum clean headers : cache에서 header를 지운다.# yum clean all : cache에서 metadata, header, package를 지운다.

  18. Debian-dpkg Debian Package Management System. • .deb 파일로 된 패키지로 설치 • rpm과 유사

  19. Debian-dpkg • dpkg -i <file name.deb> • deb 파일 설치 • dpkg –r <file name.deb> • remove 제거 • dpkg-P <package name> • purge • dpkg–l • 설치된 패키지 리스트 

  20. Debian-dselect • dpkg의 프론트엔드 • dpkg의 명령어들을 backend method로 사용

  21. dpkg와 dselect의 문제점 • Dependency를 알아서 고려해야 함.

  22. apt • Advanced Package Tool • apt-get, apt-cache, apt-cdrom… • Handling “Dependency” • Can deal with complex package relation.

  23. apt-get, apt-cache – package 설치/제거 • 패키지 찾기 • #apt-cache search <패키지 이름> • 패키지 설치 • #apt-get install < 패키지 이름 > • 패키지 재설치 • #apt-get reinstall <패키지 이름> • 패키지 제거 • #apt-get remove < 패키지 이름 > • #apt-get purge < 패키지 이름 > • 참고) apt-get install 명령어로 받은 deb 파일의 저장 위치 • /var/cache/apt/archive/ 위 폴더에 .deb 패키지 파일로 저장됩니다. • #apt-get clean

  24. apt-get, apt-cache- package 관리 • #apt-get update • 패키지 인덱스 인덱스 정보를 업데이트 : apt-get은 인덱스를 가지고 있는데 이 인덱스는/etc/apt/sources.list에 있다. 이곳에 저장된 저장소에서 사용할 패키지의 정보를 얻는다. • #apt-get upgrade • 설치된 패키지 업그레이드 : 설치되어 있는 패키지를 모두 새 버전으로 업그레이드 합니다 • *apt는 최신 패키지를 다운로드 하여 설치하게 되는데 upgrade 하기전에update 해서 source.list를 갱신 • # apt-get dist-upgrade • 의존성검사하며 설치하기 • # apt-cache show <패키지명> • 패키지 정보보기 • apt를 이용해서 설치된 deb패키지는 /var/cache/apt/archive/ 에 설치가 됩니다

  25. 실습 – sl기차 • # apt-get install wget • # apt-get install sl • $sl • /usr/games/ • # apt-get remove sl • $sl

  26. apt-[etc] • #apt-cdrom add • #apt-config [옵션] (shell or dump)

  27. apt 의 소스 • /etc/apt/sources.list에 있다.

  28. Debian-Aptitude • apt의 프론트엔드– ncurses기반

  29. Debian-Aptitude • CLI도 제공. • Ex) #aptitude install <filename>

  30. Python – easy-install • python module bundled with setuptools that lets you automatically download, build, install, and manage Python packages • http://pypi.python.org/pypi/setuptools에서 setuptools를 설치  easy-install 사용 가능 • support url source, .egg file • #easy_installSQLObject • http://peak.telecommunity.com/DevCenter/EasyInstall

  31. Python – easy-install • python module • automatically download, build, install, and manage Python packages • support url source, .egg file • #easy_installSQLObject • http://peak.telecommunity.com/DevCenter/EasyInstall • http://packages.python.org/distribute/easy_install.html

  32. Python - pip • easy_install을 향상시킨 버전 • #pip install [pkgname] • #pip uninstall [pkgname] • http://www.pip-installer.org

  33. 커널 업데이트 Linux의 진화를 따라가기

  34. Kernel • 컴퓨터 시스템을 제어하는 일 • 메모리를 관리하고, 디스크에 데이터를 읽고 쓰고, 프로그램을 실행시키고, 하드웨어 장치를 관리하는 일 • http://sharkynara.egloos.com/1102607

  35. 커널 설치 • 프로그램 소스로 설치와 유사 • 다운로드 -> 세팅-> 빌드-> 설치 -> grub 세팅->재부팅-> 동작 확인 • 루트 계정으로 설치 • 소스는 /usr/src로

  36. 커널 설치 • 개발툴이 필요하다. (ex : gcc) • #apt-get install gcc • $make menuconfig • $make xconfig • $make gconfig

  37. 커널 구하기 Kernel.org 에 가면 있다. 버전 형식 : Major.minor.patchlevel 2.6.35.13-> 커널2.6 버전의 패치 레벨 35, 서브버전 13

  38. 커널 다운로드 • $ wgethttp://www.kernel.org/pub/linux/kernel/v2.6/linux-x.y.z.tar.bz2 • # tar -xjvf linux-2.6.25.tar.bz2 -C /usr/src# cd /usr/src

  39. 커널 설정 make config • y: 기능사용 • n: 사용안함 • m: 모듈로 사용 • ?: 도움말 표시 • .config파일 생성

  40. 커널 컴파일 $ make $ make module # make modules_install # make install

  41. 부팅 설정 # cd /boot/grub # vi menu.lst

  42. 모듈 - 참고 • 동적으로 모듈 로딩 가능 • insmod, rmmod • 드라이버와 같은 것을 컴퓨터를 끄지 않고 로딩 가능 • 시스템 자원을 효율적으로 관리 가능

  43. 좋은 자료(?) • http://wiki.kldp.org/wiki.php/LinuxdocSgml/Kernel-HOWTO • http://wiki.kldp.org/wiki.php/LinuxdocSgml/2.4Kernel_Compile-KLDP

More Related