Zypper: Difference between revisions
Line 137: | Line 137: | ||
</pre> | </pre> | ||
V täht esimeses tulbas märgib, et paki muud versioonid on juba paigaldatud | V täht esimeses tulbas märgib, et paki muud versioonid on juba paigaldatud kohalikku arvutisse. | ||
== Paigaldus == | == Paigaldus == |
Revision as of 08:32, 18 October 2012
Autor
- Marko Kurs
Sissejuhatus
Zypper on SUSE peal asuv paketihaldus rakendus. Erinevalt samuti SUSE peal asuvast YaST rakendusest on zypperi abil võimalik kiire käsureaga pakke paigaldada ja eemaldada. Zypperi käsustiku struktuur on väga sarnane apt-get käsustikuga. Zypper on paketihaldusmootori ZYpp(libzypp) käsurea liides.
Käsud mida kasutad igapäevaselt
zypper # Väljasta käskude ja valikute nimekiri zypper help search # Käsu "search" abi zypper lp # Väljasta vajalike uuenduste nimekiri zypper patch # Paigalda vajalikud uuendused zypper se sqlite # Otsi sqlite pakki zypper rm sqlite2 # Eemalda sqlite2 zypper in sqlite3 # Paigalda sqlite3 zypper in yast* # Paigalda kõik pakid mis algavad tekstiga 'yast*' zypper up # Uuenda kõik pakid uusimale versioonile kus võimalik
Hoidla käitlemine
- Hoidlate nimekiri
zypper lr
# | Alias | Name | Enabled | Refresh --+-----------------------+-----------------------+---------+-------- 1 | packman | Packman 11.1 | Yes | No 2 | fate | fate | No | No 3 | openSUSE-11.1-Updates | Updates for 11.1 | Yes | Yes 4 | repo-oss | openSUSE-11.1-Oss | Yes | No 5 | repo-non-oss | openSUSE-11.1-Non-Oss | Yes | No 6 | repo-debug | openSUSE-11.1-Debug | No | No
- Lisa hoidla
zypper ar [URL]
# zypper ar http://download.videolan.org/pub/vlc/SuSE/11.1 vlc
Adding repository 'vlc' [done] Repository 'vlc' successfully added Enabled: Yes Autorefresh: No URI: http://download.videolan.org/pub/vlc/SuSE/11.1
- Uuenda hoidlate nimekirja
zypper ref
Downloading repository 'Packman 11.1' metadata [done] Building repository 'Packman 11.1' cache [done] Downloading repository 'Updates for 11.1' metadata [done] Building repository 'Updates for 11.1' cache [done] Repository 'openSUSE-11.1-Oss' is up to date. All repositories have been refreshed.
- Eemalda hoidla
zypper rr [hoidla nimi]
Repository 23 not found by alias, number or URI. Repository foo not found by alias, number or URI. Removing repository 'repo-debug' [done] Repository 'repo-debug' has been removed. Removing repository 'vlc' [done] Repository 'vlc' has been removed.
- Hoidlate eksport/import
zypper lr --export [Asukoht] zypper ar [Asukoht]
Paketti haldus
Otsing
Vaike sättega otsitakse käsuga suvalist paki tüüpi, staatust või hoidlat kui nimes on otsitav tekst
# zypper se sqlite
Reading installed packages... S | Name | Summary | Type --+--------------------------+----------------------------------------------------------------+-------- | libapr-util1-dbd-sqlite3 | DBD driver for SQLite 3 | package i | libgda-3_0-sqlite | Sqlite Provider for GNU Data Access (GDA) | package | libqt4-sql-sqlite | Qt 4 sqlite plugin | package i | libsqlite3-0 | Shared libraries for the Embeddable SQL Database Engine | package | libsqlite3-0-32bit | Shared libraries for the Embeddable SQL Database Engine | package | mediatomb-sqlite | UPnP AV MediaServer | package i | mono-data-sqlite | Database connectivity for Mono | package | pdns-backend-sqlite2 | SQLite 2 backend for pdns | package | pdns-backend-sqlite3 | SQLite 3 backend for pdns | package i | perl-DBD-SQLite | The DBD::SQLite is a self contained RDBMS in a DBI driver | package i | php5-sqlite | PHP5 Extension Module | package | python-sqlite2 | Python bindings for sqlite 2 | package | qt3-sqlite | SQLite Database Plug-In for Qt | package | rekall-sqlite | Rekall sqlite Database Backend | package | rubygem-sqlite3 | A Ruby interface for the SQLite3 database engine | package i | sqlite2 | Embeddable SQL Database Engine | package | sqlite2-32bit | Embeddable SQL Database Engine | package | sqlite2-devel | Embeddable SQL Database Engine | package i | sqlite3 | Embeddable SQL Database Engine | package | sqlite3-devel | Embeddable SQL Database Engine | package | sqlite3-tcl | Tcl binding for SQLite | package | tntdb1-sqlite | Tntdb is a c++-class-library for easy database-access - sqlite | package | ulogd-sqlite | SQLite output plugin for ulogd | package
I täht esimeses tulbas märgib, et pakk on juba paigaldatud kohalikku arvutisse. Kui soovid näha kõiki paki versioone kasuta --details/-s
valikut:
# zypper search -s --match-exact virtualbox-ose
Reading installed packages... S | Name | Type | Version | Arch | Repository --+----------------+---------+------------+--------+------------------------------------ v | virtualbox-ose | package | 1.6.2-2.1 | x86_64 | VirtualBox OSE i | virtualbox-ose | package | 1.5.6-33.1 | x86_64 | openSUSE-11.1-Oss v | virtualbox-ose | package | 1.5.6-20.5 | x86_64 | VirtualBox OSE ( v | virtualbox-ose | package | 1.6.2-2.1 | i586 | VirtualBox OSE v | virtualbox-ose | package | 1.5.6-33.1 | i586 | openSUSE-11.1-Oss v | virtualbox-ose | package | 1.5.6-20.3 | i586 | VirtualBox OSE
V täht esimeses tulbas märgib, et paki muud versioonid on juba paigaldatud kohalikku arvutisse.
Paigaldus
Pakke saab paigaldada nime järgi:
# zypper install git
Reading installed packages... The following NEW packages are going to be installed: subversion-perl sqlite3 perl-DBD-SQLite git-svn git-cvs git Overall download size: 1.1 M. After the operation, additional 4.6 M will be used. Continue? [YES/no]: Downloading package subversion-perl-1.5.0-96.1.x86_64 (1/6), 950.0 K (4.1 M unpacked) Downloading: subversion-perl-1.5.0-96.1.x86_64.rpm [done] Installing: subversion-perl-1.5.0-96.1 [done] Downloading package sqlite3-3.5.7-17.1.x86_64 (2/6), 30.0 K (40.0 K unpacked) Downloading: sqlite3-3.5.7-17.1.x86_64.rpm [done] Installing: sqlite3-3.5.7-17.1 [done] Downloading package perl-DBD-SQLite-1.14-41.1.x86_64 (3/6), 44.0 K (103.0 K unpacked) Downloading: perl-DBD-SQLite-1.14-41.1.x86_64.rpm [done] Installing: perl-DBD-SQLite-1.14-41.1 [done] Downloading package git-svn-1.5.4.5-26.1.x86_64 (4/6), 66.0 K (195.0 K unpacked) Downloading: git-svn-1.5.4.5-26.1.x86_64.rpm [done] Installing: git-svn-1.5.4.5-26.1 [done] Downloading package git-cvs-1.5.4.5-26.1.x86_64 (5/6), 63.0 K (205.0 K unpacked) Downloading: git-cvs-1.5.4.5-26.1.x86_64.rpm [done] Installing: git-cvs-1.5.4.5-26.1 [done] Downloading package git-1.5.4.5-26.1.x86_64 (6/6), 10.0 K (3.0 K unpacked) Downloading: git-1.5.4.5-26.1.x86_64.rpm [done] Installing: git-1.5.4.5-26.1 [done]
Võimaluste järgi mida nad pakuvad:
# zypper in MozillaFirefox \< 3
Reading installed packages... 'MozillaFirefox' providing 'MozillaFirefox<3' is already installed. Nothing to do.
# zypper in MozillaFirefox \>= 3
Reading installed packages... The following packages are going to be upgraded: mozilla-xulrunner190-translations MozillaFirefox mozilla-xulrunner190-gnomevfs mozilla-xulrunner190 MozillaFirefox-translations The following package is going to be REMOVED: mozilla-xulrunner190-lang Overall download size: 11.0 M. After the operation, 12.9 M will be freed. Continue? [Y/n/p/?]:
# zypper in 'libqtiff.so()(64bit)'
Reading installed packages... 'libqt4-x11' providing 'libqtiff.so()(64bit)' is already installed. Nothing to do.
Muud näited:
zypper in yast* # Paigalda kõik yast moodulid zypper in -t pattern lamp_server # Paigalda lamp_server pattern (Pakid mis on vajalikub LAMP serverile) zypper in emacs pattern:lamp_server # Paigalda emacs pakk ja lamp_server pattern zypper in vim -emacs # Paigalda vim ja eemalda emacs ühe käsuga zypper in amarok packman:libxine1 # Paigalda libxine1 packman hoidlast ja amarok suvalisest hoidlast zypper in bitchx-1.1-81.x86_64.rpm # Paigalda bitchx rpm kohalikult kettalt zypper in -f subversion # subversion sund taaspaigaldus
Eemaldus
Eemaldus käsk on väga sarnane paigaldus käsuga
# zypper remove sqlite
Reading installed packages... The following packages are going to be REMOVED: sqlite3 perl-DBD-SQLite git-cvs git After the operation, 351.0 K will be freed. Continue? [YES/no]: n
Uuendus
zypper up # Uuenda kõik paigaldatud pakid uusimale versioonile zypper up libzypp zypper # Uuenda libzypp ja zypper zypper in sqlite3 # Uuenda sqlite3 või paigalda see kui ei ole juba paigaldatud
Pakkide lukustus
Pakkide lukustus võimaldab administraatoril keelata pakkide uuendamist, eemaldamist ja ka paigaldamist süsteemis.
- Lukusta pakk mis algab tekstiga "yast2"
# zypper al 'yast2*'
Reading installed packages... Specified lock has been successfully added.
- Loetle aktiivsed lukud
# zypper ll
# | Name | Type | Repository --+------------------+---------+----------- 1 | libpoppler3 | package | (any) 2 | libpoppler-glib3 | package | (any) 3 | yast* | package | (any)
- Eemalda lukk
# zypper rl yast2-packager
Reading installed packages... The following query locks some of the objects you want to unlock: type: package match_type: glob case_sensitive: on solvable_name: yast2* Do you want remove this lock? [YES/no]: y Lock count has been succesfully decreased by: 1
Muud tööriistad
Kontrolli sõltuvusi
- Kui süsteemiga on probleem ja vihjeks on puuduv komponent:
# zypper ve
Reading installed packages... Some of the dependencies of installed packages are broken. In order to fix these dependencies, the following actions need to be taken: The following NEW package is going to be installed: mozilla-xulrunner190 Overall download size: 6.5 M. After the operation, additional 23.5 M will be used. Continue? [YES/no]: y
Paigalda uued soovituslikud pakid
- Lihtne moodus kuidas paigaldatud pakkidele lisada keele uuendusi või lisada ajureid riistvarale
# zypper inr
Reading installed packages... The following NEW packages are going to be installed: kdebase4-openSUSE-lang bundle-lang-common-cs Overall download size: 534.0 K. After the operation, additional 1.9 M will be used. Continue? [YES/no]:
Allikad
http://en.opensuse.org/SDB:Zypper_usage_11.3#Repository_management