To install and remove software with zypper, you need only give the install (in) or remove (rm) command along with the package name. In the following example, zypper looks for information on the zoo archiving utility and finds it is in the MainRepository (OSS).
# zypper info zoo
...
Information for package zoo:
Repository: Main Repository (OSS) Name: zoo
Version: 2.10-938
...
To installthe zoo package, you only need to give the install or in command:
# zypper install zoo
* Reading repository ‘openSUSE-10.3-DVD 10.3’ cache
* Reading repository ‘madwifi’ cache
* Reading repository ‘ftp.gwdg.de’ cache
* Reading repository ‘Main Repository (NON-OSS)’ cache
* Reading repository ‘openSUSE-10.3-Updates’ cache
* Reading repository ‘testcdrom’ cache
* Reading repository ‘Main Repository (OSS)’ cache
* Reading installed packages [100%]
The following NEW package is goingto be installed:
zoo
Overall download size: 62.9 K. After the operation, additional 108.2 K will be used.
Continue? [yes/no]:
The Main Repository (OSS) alias is a URL (which you might rename to something a little less unwieldy). To install zoo from a different repository, specify this with the –r flag:
# zypper install -r testcdrom zoo
* Reading repository ‘testcdrom’ cache
* Reading installed packages [100%]
The following NEW package is goingto be installed:
zoo
Overall download size: 62.9 K. After the operation, additional 108.2 K will be used.
Continue? [yes/no]:
To remove the zoo package, use the remove or rm command with zypper:
# zypper remove zoo
...
* Reading installed packages [100%]
The following package is going to be REMOVED:
zoo
After theoperation, 108.2K will be freed. Continue? [yes/no]: y
* Removing zoo-2.10-938 [100%]
To install an available patch that was returned from the zypper pchoperation,
zypper could be implemented this way:
# zypper install -t patch fetchmsttfonts.sh
...
The following NEW patch is going to be installed:
fetchmsttfonts.sh
The following NEW script is goingto be installed:
fetchmsttfonts.sh-4347-patch-fetchmsttfonts.sh-2
After the operation, 0.0 B will be freed. Continue? [yes/no]:
You can also use zypper to perform a complete update of your openSUSE system. With the update (up) command, zypper will collect the updated packages and patches it knows about and give you the option of applying them to your system:
# zypper update
* Reading repository ‘openSUSE-10.3-DVD 10.3’ cache
* Reading repository ‘madwifi’ cache
* Reading repository ‘ftp.gwdg.de’ cache
* Reading repository ‘Main Repository (NON-OSS)’ cache
* Reading repository ‘openSUSE-10.3-Updates’ cache
* Reading repository ‘testcdrom’ cache
* Reading repository ‘Main Repository (OSS)’ cache
* Reading installed packages [100%] Nothing to do.
By using the shell command, you can work with zypper using a shell interface. This negates the need to include the zypper command every time you run a command.Once in theshell, just enter the commands you would normally use on the command line. Use thequit or exit command to exit the shell:
# zypper shell
zypper> lr
# | Enabled| Refresh|Type | Alias | Name
--+---------+-------+--------+------------------+---------------
1 | Yes | No | yast2 | openSUSE-10.3-...| openSUSE-10.3-...
2 | Yes | | Yes | | rpm-md | madwifi | madwifi |
3 | Yes | | Yes | | rpm-md | ftp.gwdg.de | ftp.gwdg.de |
4 | Yes | | Yes | |
5 | Yes | | Yes | | rpm-md | openSUSE-10.3-...| openSUSE-10.3-... |
6 | Yes | | No | | yast2 | testcdrom | testcdrom |
7 | Yes | | Yes |
NOTE To find out more about using the zypper command, visit the openSUSE website under the Zypper Usage section (http://en.opensuse.org/Zypper/ Usage).
0 komentar:
Posting Komentar