yum 命令备查
最近装的服务器都是装centos系统的, 没有了 apt-get 还真有点不习惯了现在系统软件管理包是用的yum,在网上找了些yum的使用命令,其实也跟我yum -h获得的信息差不多
但是则个比较详细
SYNOPSIS
yum DESCRIPTION
yumisan interactive, automated update program which can be used for maintaining systems using rpm command is one of: * install package1 [...] * update [...] * check-update * upgrade [...] * remove | erase package1 [...] * list [...] * info [...] * provides | whatprovides feature1 [...] * clean [ packages | headers | metadata | cache | dbcache | all ] * makecache * groupinstall group1 [...] * groupupdate group1 [...] * grouplist * groupremove group1 [...] * groupinfo group1 [...] * search string1 [...] * shell * resolvedep dep1 [...] * localinstall rpmfile1 [...] * localupdate rpmfile1 [...] * deplist package1 [...] Unless the --help or -h option is given, one of the above commands must be present. install Isusedto install the latest version of a package or group of packages while ensuring that all dependencies are satisfied.If nopackagematches the given package name(s), they are assumed to be a shell glob and any matches are then installed. update If run without any packages, update will update everycurrently installedpackage. If one or more packages are specified, Yum will only update the listed packages.While updatingpackages, yumwillensurethatalldependencies are satisfied.If no package matches the given package name(s), they areassumedto be a shell glob and any matches are then installed. Ifthe--obsoletesflagispresent yum will include package obsoletes in its calculations - this makes itbetterfordis- tro-versionchanges,for example: upgrading from somelinux 8.0 to somelinux 9. check-update Implemented so you could know if your machinehadanyupdates thatneededtobeappliedwithout running it interactively. Returns exit value of 100 if there are packages available for an update.Alsoreturnsa list of the pkgs to be updated in list format. Returns 0 and no packages are available for update. upgrade Is the same as the update command with the --obsoletes flag set. See update for more details. remove or erase Areusedtoremovethe specified packages from the system as well as removing any packages which depend on the packagebeing removed. list Isusedtolist various information about available packages; more complete details are available in the List Optionssection below. provides or whatprovides Is used to find out which package provides some feature or file. Just use a specific name or a file-glob-syntax wildcards to list the packages available or installed that provide that feature or file. search Is used to find any packages matching a string inthedescrip- tion,summary, packager and package name fields of an rpm. Use- ful for finding a package you do not know by namebutknowby some word related to it. info Isusedtolistadescription and summary information about available packages; takes the sameargumentsasintheList Options section below. cleanIsusedto clean up various things which accumulate in the yum cache directory over time.More complete details canbefound in the Clean Options section below. shellIsusedto enter the ’yum shell’, when a filename is specified the contents of that file is executed inyumshellmode.See yum-shell(8) for more info resolvedep Isusedto list packages providing the specified dependencies, at most one package is listed per dependency. localinstall Is used to install a set of local rpmfiles.Ifrequiredthe enabled repositories will be used to resolve dependencies. localupdate Is used to update the system by specifying local rpm files. Only the specified rpm files of which anolderversionisalready installedwillbeinstalled, the remaining specified packages will be ignored.If required the enabled repositorieswillbe used to resolve dependencies. deplist Producesalistof all dependencies and what packages provide those dependencies for the given packages.GENERAL OPTIONS
Most command line options can be set using theconfigurationfileas wellandthe descriptions indicate the necessary configuration option to set. -h, --help Help; display a help message and then quit. -y Assume yes; assume that the answer to any questionwhichwould be asked is yes. Configuration Option: assume-yes -c file] Specifies the config file location - can take http, ftp urls and local file paths. -d Sets the debugging level to -turnsupordownthe amount of things that are printed. Practical range: 0 - 10 Configuration Option: debuglevel -e Sets the error level to Practical range 0 - 10. 0 means print only critical errors about which you must be told. 1 means printallerrors,even ones that are not overly important. 1+ means print more errors (if any) -e 0 is good for cron jobs. Configuration Option: errorlevel -R in minutes] Sets the maximum amount of time yum will wait beforeperforming a command - it randomizes over the time. -C Tellsyumtorunentirelyfrom cache - does not download or update any headers unless it has totoperformtherequested action. --version Reports the yum version number and exits. --installroot=root Specifiesanalternativeinstallroot,relativeto which all packages will be installed. Configuration Option: installroot --enablerepo=repoidglob Enables specific repositories by id or glob that have beendis- abled in the configuration file using the enabled=0 option. Configuration Option: enabled --disablerepo=repoidglob Disables specific repositories by id or glob. Configuration Option: enabled --obsoletes Thisoptiononlyhasaffectfor an update, it enables yum´s obsoletes processing logic. For more information see theupdate command above. Configuration Option: obsoletes --exclude=package Excludeaspecific package by name or glob from updates on all repositories. Configuration Option: exclude --noplugins Run with all plugins disabled. Configuration Option: pluginsLIST OPTIONS
The following are the ways which you can invoke yum in list mode.Note thatall list commands include information on the version of the pack- age. yum list | regexp1] [...] List all available and installed packages. yum list available [...] List all packagesintheyumrepositoriesavailabletobe installed. yum list updates [...] Listallpackageswith updates available in the yum reposito- ries. yum list installed [...] List the packages specified by args.If anargumentdoesnot matchthenameof an available package, it is assumed to be a shell-style glob and any matches are printed. yum list extras [...] List the packages installed on the system that are not available in any yum repository listed in the config file. yum list obsoletes [...] Listthe packages installed on the system that are obsoleted by packages in any yum repository listed in the config file. yum list recent List packages recently added into the repositories. Specifying package names All the list options mentioned above take file-glob-syntax wild- cards or package names as arguments, for example yum list avail- able foo* will list all available packages that match foo*.CLEAN OPTIONS
The following are the ways which you can invoke yum in clean mode. yum clean packages Eliminate any cached packages from the system.Note thatpack- ages are not automatically deleted after they are downloaded. yum clean headers Eliminateallofthefileswhichyum uses to determine the remote availability of packages. Using thisoptionwillforce yum to download all the headers the next time it is run. yum clean all Runs yum clean packages and yum clean headers as above.
页:
[1]