apt-get 기능과 관련된 몇 가지 포스팅을 한 적이 있습니다. 


apt-get upgrade 수행 시 특정 패키지만 빼고 설치하기 : http://ngee.tistory.com/717

apt-get upgrade 수행 시 특정 패키지만 설치하기 : http://ngee.tistory.com/716

apt-get upgrade 수행 전에 리스트 확인하기 : http://ngee.tistory.com/693

우분투 apt-get, apt-cache 사용하기 : http://ngee.tistory.com/128

apt-get install fail - local settings : http://ngee.tistory.com/553 


어제는 Fedora에서 yum을 통해서 소프트웨어나, 라이브러리를 설치하는 것에 대해서 작성해봤습니다.


오늘은 우분투(Ubuntu)에서 yum과 비슷한 apt를 통해서 소프트웨어나 라이브러리를 검색하고 설치하는 것에 대해서 


간단하게 작성해볼까 합니다. 



0. apt-cache 


우분투에서 소프트웨어나 라이브러리를 터미날에서 검색하는 명령어는 apt-cache 입니다.


먼저 --help를 보면 다음과 같습니다. 


yourid@blrblrblrlblrlrlrlblr:~$ apt-cache --help

apt 0.8.13.2ubuntu4.3 for amd64 compiled on Nov 22 2011 20:59:32

Usage: apt-cache [options] command

       apt-cache [options] showpkg pkg1 [pkg2 ...]

       apt-cache [options] showsrc pkg1 [pkg2 ...]


apt-cache is a low-level tool used to query information

from APT's binary cache files


Commands:

   gencaches - Build both the package and source cache

   showpkg - Show some general information for a single package

   showsrc - Show source records

   stats - Show some basic statistics

   dump - Show the entire file in a terse form

   dumpavail - Print an available file to stdout

   unmet - Show unmet dependencies

   search - Search the package list for a regex pattern

   show - Show a readable record for the package

   showauto - Display a list of automatically installed packages

   depends - Show raw dependency information for a package

   rdepends - Show reverse dependency information for a package

   pkgnames - List the names of all packages in the system

   dotty - Generate package graphs for GraphViz

   xvcg - Generate package graphs for xvcg

   policy - Show policy settings


Options:

  -h   This help text.

  -p=? The package cache.

  -s=? The source cache.

  -q   Disable progress indicator.

  -i   Show only important deps for the unmet command.

  -c=? Read this configuration file

  -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp

See the apt-cache(8) and apt.conf(5) manual pages for more information.


위에서 강조한 search를 통해서 패키지들을 검색할 수 있습니다. 사용 방법은 아래와 같아요.


Usage : apt-cache search 찾고 싶은 패키지 이름

Example : apt-cache search httpd      --> httpd와 관련된 패키지를 검색해서 보여줘!!!! 


간단하죠?


위 example을 돌리면 아래와 같이 나오게 됩니다.


yourid@blrblrblrlblrlrlrlblr:~$ apt-cache search httpd

libapache2-mod-wsgi - Python WSGI adapter module for Apache

libdotconf-dev - Configuration file parser library - development files

libdotconf1.0 - Configuration file parser library - runtime files

aolserver4-core - AOL web server version 4 - core libraries

aolserver4-daemon - AOL web server version 4 - program files

boa - Lightweight and high performance web server

bozohttpd - Bozotic HTTP server

ccze - A robust, modular log coloriser

cherokee - Very fast, flexible and easy to configure web server

collectd-core - statistics collection and monitoring daemon (core system)

dhttpd - minimal secure webserver without cgi-bin support

ebhttpd - specialized HTTP server to access CD-ROM books

fnord - yet another small httpd

gunicorn - Event-based HTTP/WSGI server

javascript-common - Base support for JavaScript library packages

libapache-configfile-perl - Parse an Apache style httpd.conf configuration file

libapache-htgroup-perl - interface to Apache authentication group files

libapache2-mod-authn-sasl - SASL authentication backend provider for Apache

libapache2-mod-chroot - run Apache in a secure chroot environment

libapache2-mod-dnssd - Zeroconf support for Apache 2 via avahi

libapache2-mod-mime-xattr - Apache2 module to get MIME info from filesystem extended attributes

libapache2-mod-ocamlnet - OCaml application-level Internet libraries - netcgi2 Apache2 connector

libapache2-mod-upload-progress - upload progress support for the Apache web server

libapache2-mod-wsgi-py3 - Python 3 WSGI adapter module for Apache

libconfig-apacheformat-perl - use Apache format config files

libdevel-nytprof-perl - Perl statement and subroutine code profiler

libmicrohttpd-dbg - library embedding HTTP server functionality (debug)

libmicrohttpd-dev - library embedding HTTP server functionality (development)

libmicrohttpd5 - library embedding HTTP server functionality

libnethttpd-ocaml-dev - OCaml application-level Internet libraries - HTTP daemon development libraries

libocamlnet-gtk2-ocaml-dev - OCaml application-level Internet libraries - GTK2 development libraries

libocamlnet-ocaml - OCaml application-level Internet libraries - core runtime libraries

libocamlnet-ocaml-bin - OCaml application-level Internet libraries - binaries

libocamlnet-ocaml-dev - OCaml application-level Internet libraries - core development libraries

libocamlnet-ocaml-doc - OCaml application-level Internet libraries - documentation and examples

libocamlnet-ssl-ocaml - OCaml application-level Internet libraries - SSL runtime libraries

libocamlnet-ssl-ocaml-dev - OCaml application-level Internet libraries - SSL development libraries

libpion-common-3.0 - lightweight HTTP interface library - common runtime files

libpion-common-dbg - lightweight HTTP interface library - common debug files

libpion-common-dev - lightweight HTTP interface library - common development files

libpion-net-3.0 - lightweight HTTP interface library - runtime files

libpion-net-dbg - lightweight HTTP interface library - debug files

libpion-net-dev - lightweight HTTP interface library - development files

libpion-net-doc - lightweight HTTP interface library - documentation

libpion-net-plugins - lightweight HTTP interface library - plugins

libpion-net-plugins-dbg - lightweight HTTP interface library - plugins debug files

librunapp-perl - A generic module to run web-applications

mathopd - Very small, yet very fast HTTP server

mergelog - utility that merges httpd log files by date

micro-httpd - really small HTTP server

mini-httpd - a small HTTP server

mod-chroot-common - run Apache in a secure chroot environment

mongrel-cluster - Mongrel plugin to manage a cluster of Mongrel servers

monkey - fast, efficient, small and easy to configure web server

mono-fastcgi-server - ASP.NET backend for FastCGI webservers - default version

mono-fastcgi-server1 - ASP.NET 1.1 backend for FastCGI webservers

mono-fastcgi-server2 - ASP.NET 2.0 backend for FastCGI webservers

ocsigen - web server and programming framework in OCaml

parser3-cgi - Parser 3, HTML-embedded scripting language (CGI binary)

syscp - system control panel for LAMP servers

thttpd - tiny/turbo/throttling HTTP server

thttpd-util - tiny/turbo/throttling HTTP server (utilities)

tntnet - modular, multithreaded web application server for C++

webfs - lightweight HTTP server for static content

wwwstat - httpd logfile analysis package

yaws - High performance HTTP 1.1 webserver written in Erlang

apache2-mpm-event - Apache HTTP Server - event driven model

apache2-mpm-prefork - Apache HTTP Server - traditional non-threaded model

apache2-mpm-worker - Apache HTTP Server - high speed threaded model

php5-cgi - server-side, HTML-embedded scripting language (CGI binary)

apache2-mpm-itk - multiuser MPM for Apache 2.2

fp-units-net - Free Pascal - networking units

libapache2-mod-rpaf - module for Apache2 which takes the last IP from the 'X-Forwarded-For' header

lighttpd - A fast webserver with minimal memory footprint

lighttpd-dev - Development files for lighttpd

lighttpd-doc - Documentation for lighttpd

lighttpd-mod-cml - Cache meta language module for lighttpd

lighttpd-mod-magnet - Control the request handling module for lighttpd

lighttpd-mod-mysql-vhost - MySQL-based virtual host configuration for lighttpd

lighttpd-mod-trigger-b4-dl - Anti-deep-linking module for lighttpd

lighttpd-mod-webdav - WebDAV module for lighttpd

nginx-extras - nginx web server with full set of core modules and extras

nginx-full - nginx web server with full set of core modules

nginx-light - nginx web server with minimal set of core modules


아 많이 나오네요. 아무튼 패키지 검색이 잘 된 것을 확인!!!



1. apt-get


검색만 하는 것이 목적이 아니죠?


설치를 해야죠. 그래서 사용하는 명령어가 apt-get 입니다. 이것에 대한 헬프를 보실까용?



yourid@blrblrblrlblrlrlrlblr:~$ apt-get --help

apt 0.8.13.2ubuntu4.3 for amd64 compiled on Nov 22 2011 20:59:38

Usage: apt-get [options] command

       apt-get [options] install|remove pkg1 [pkg2 ...]

       apt-get [options] source pkg1 [pkg2 ...]


apt-get is a simple command line interface for downloading and

installing packages. The most frequently used commands are update

and install.


Commands:

   update - Retrieve new lists of packages

   upgrade - Perform an upgrade

   install - Install new packages (pkg is libc6 not libc6.deb)

   remove - Remove packages

   autoremove - Remove automatically all unused packages

   purge - Remove packages and config files

   source - Download source archives

   build-dep - Configure build-dependencies for source packages

   dist-upgrade - Distribution upgrade, see apt-get(8)

   dselect-upgrade - Follow dselect selections

   clean - Erase downloaded archive files

   autoclean - Erase old downloaded archive files

   check - Verify that there are no broken dependencies

   markauto - Mark the given packages as automatically installed

   unmarkauto - Mark the given packages as manually installed

   changelog - Download and display the changelog for the given package

   download - Download the binary package into the current directory


Options:

  -h  This help text.

  -q  Loggable output - no progress indicator

  -qq No output except for errors

  -d  Download only - do NOT install or unpack archives

  -s  No-act. Perform ordering simulation

  -y  Assume Yes to all queries and do not prompt

  -f  Attempt to correct a system with broken dependencies in place

  -m  Attempt to continue if archives are unlocatable

  -u  Show a list of upgraded packages as well

  -b  Build the source package after fetching it

  -V  Show verbose version numbers

  -c=? Read this configuration file

  -o=? Set an arbitrary configuration option, eg -o dir::cache=/tmp

See the apt-get(8), sources.list(5) and apt.conf(5) manual

pages for more information and options.

                       This APT has Super Cow Powers.



자 위에서 강조한 것은 install, remove 입니다.


install을 통해서 설치하는 것인데요. 사용 방법은 아래와 같아요.


Usage : apt-get install 패키지이름

Example : apt-get install lighttpd-doc    -> lighttpd-doc 패키지를 설치해줘!!!


역시 쉽죠. 패키지 이름은 apt-cache search를 통해 검색된 것을 복사해서 사용하시면 됩니다.


물론 설치이기 때문에 인스톨 권한을 가진 유저가 실행해야 되겠죠? 즉 root나 sudo를 통해서 잠시 root 권한을 빌려와야 겠죠.


sudo는 아래와 같이요.


sudo apt-get install lighttpd-doc


간단간단하게 마칩니당~~~~ 




리눅스 관련 포스팅 모음


리눅스 파일 검색 (find), 파일 내부 문자열 검색 (grep 이용) : http://ngee.tistory.com/83

scp (공개키 암호화 사용, 패스워드 없이) : http://ngee.tistory.com/80

디스크 남은 용량, 메모리 사용량, 리눅스 작업관리자 알아보기 : http://ngee.tistory.com/76

리눅스 하드웨어 확인하기 : http://ngee.tistory.com/88

리눅스 테마 적용, 꾸미기 : http://ngee.tistory.com/90

리눅스 패널에 모니터링(CPU, Memory, Network) 추가하기 : http://ngee.tistory.com/100

리눅스 yum 사용법 : http://ngee.tistory.com/127

리눅스 apt-get, apt-cache 사용법 : http://ngee.tistory.com/128



+ Recent posts