• 沒有找到結果。

Debian package m anager

N/A
N/A
Protected

Academic year: 2022

Share "Debian package m anager"

Copied!
22
0
0

加載中.... (立即查看全文)

全文

(1)

Debian package m anager

Presenter: Lilian Wang

(2)

Install Sof tware

先別管 package 了 , 你有聽過重灌嗎

?

Chrome/Firefox, Office, pietty, N otepad++, PCMan, LOL, …

Installing many software is annoy ing.

(3)

Install sof tware by so

urce code

Download source and compile

 wget …/xxx-###.tar

 Decompress, then look up how to comp ile

 ./configure

 make

 make install

 It takes some times.

(4)

Better way to install and manage

Download binary

Setup script

Dependencies

 Program A needs library/program B to work

 LOL_TW requires 競時通

 Gamania games requires beanfun!

Version

 Upgrade to new release version easil y

(5)

Package Man

ager

Package

 An archive

 Binary

 Control Information

Operation

 Install

 Remove

 Query

 Upgrade

(6)

Package Man

ager

Bas

e Packa

ge Tool Front end dpk

g .deb apt apt-get apt-cache aptitude rpm .rpm yum rpm

yum

(7)

Package Rep

ository 

Package storage server

 Packages of several versions

 Index file

 Maintained by distributions

/etc/apt/source.list

[Homework Q1]

 Show how to change package source mi rror.

 Which command gets new index file?

(8)

Type of Pac

kages

Binary package

 Includes program binary

Meta package

 Depends on other packages only

 apache2 -> apache2.2-common

Virtual package

 Not really exists

 Other packages “provide” virtual p ackage

 c-compiler

(9)

Useful comm ands

apt-get

 install, remove, upgrade, …

apt-cache

 show, search, …

aptitude

 almost all commands of apt-get/apt-c ache

(10)

Command:

search

aptitude search ^apache2

 Search pattern can be regular expres sions

 Other patterns support: reference

apt-cache search apache2

 Also search in description

Flags

(11)

Flags

Current state flag

Action flag

Automatic flag

State

flag description

i installed

c config, removed

p purge

v virtual

B broken

u unpacked

C half-configured H half-installed

(12)

Command: sh ow

aptitude show apache2

 List the information of package apac he2

(13)

Package inf ormation

 Package

 name

 State

 installed, not installed, …

 Automatically

 Manage automatically

 If set, remove package when not need ed

 Version

 [epoch:]upstream_version[-debian_rev ision]

 2.2.16-6+squeeze7

 reference

(14)

Package inf

ormation

Priority required

 important

 standard

 optional

 extra

 reference

Maintainer

Description

Architecture

(15)

Package inf

ormation

Dependencies

 depends

 recommends

 suggests

 conflicts

 replaces

 breaks

 provides

 Reference

(16)

Command: in stall

remove purge

apt-get install apache2

 Install apache2 package

apt-get remove apache2

 Uninstall apache2 package

 Config file remains

apt-get purge apache2

 Uninstall apache2 package

 Delete config file

 Is configure file removed?

(17)

Command:

upgrade

dist-upgrad e

aptitude upgrade

 upgrade current packages

 Does not upgrade some packages if u pdating these cause some others pac kages to be installed/removed.

aptitude dist-upgrade

 Upgrade all current packages

 If meets conflict, it will try to g enerate solutions to satisfy new de pendency.

(18)

Practice

Search a database server

Install it

Remove it

(19)

Build a sim ple meta-pa ckage

package/DEBIAN/control

 You can reference some field aptitude show xxx outputs

dpkg-deb –b package

[Homework Q2]

 Build a meta-package

 Name: nasa

 Should always install mysql-server(>

= 5.0)

 Should always install apache2(>=2.2)

 Should not install when lighttpd ins talled

(20)

Build a bin

ary package

Tutorial: http://

www.debian.org/doc/manuals/maint- guide/first.en.html

Install packages needed

 build-essential

 dpkg-dev

 debhelper

 CDBS

 dh-make

 lintian: check if package has error

(21)

Build a bin

ary package 1.

Download source code

2.

Unpack

3.

dh_make

4.

Modify control file

5.

Add path if needed

6.

Build package

 dpkg-buildpackage

[Homework Q3] (optional)

 Build a package of “Omnitty”

(22)

Homework

There are 3 questions, check HW8.

pdf

1.

Change package source mirror

2.

Build nasa-hw meta package

3.

Build omnitty package

 Optional question

參考文獻

相關文件

“Some ‘pictures’ are not really pictures, but rather are windows to Plato’s heaven.”,見 Philosophy of Mathematics — An Introduction to the World of Proofs and

GCG method is developed to minimize the residual of the linear equation under some special functional.. Therefore, the minimality property does not hold... , k) in order to construct

(Some campers may react faster than others to familiar words.) 5. The game can be repeated for a few rounds.. Before starting the game, the camp leaders show the campers both

Bully. What does the word make you think of? For some people, it's that girl at school who always makes fun of them. For others, it's the biggest guy in the neighbourhood who's always

From these characterizations, we particularly obtain that a continuously differentiable function defined in an open interval is SOC-monotone (SOC-convex) of order n ≥ 3 if and only

If the skyrmion number changes at some point of time.... there must be a singular point

(C) Some researchers say that if a person’s brain is right, she or he can easily have good musical skills.. (D) According to some researchers, the right brain helps us to improve

(B) Some students went to the concert last night; the other stayed at home studying. (C) Some of the students went to the concert last night; others stayed at