{"id":3093,"date":"2016-07-29T09:34:41","date_gmt":"2016-07-29T07:34:41","guid":{"rendered":"https:\/\/adrhc.go.ro\/wordpress\/?p=3093"},"modified":"2017-08-24T15:30:07","modified_gmt":"2017-08-24T13:30:07","slug":"yum","status":"publish","type":"post","link":"https:\/\/adrhc.go.ro\/blog\/yum\/","title":{"rendered":"Yum"},"content":{"rendered":"<pre class=\"brush:bash shell;toolbar: false\">\r\n# https:\/\/www.centos.org\/docs\/5\/html\/yum\/\r\n# http:\/\/linux.duke.edu\/projects\/yum\/\r\n\r\nThe Alert Icon is part of the up2date application, which enables you to easily install system updates.\r\n\r\nYou may use any of the following formats to specify a package in a yum operation: name, name.architecture, name-version, name-version-release, name-version-release.architecture, and epoch:name-version-release.architecture.\r\n\r\nThe system-config-packages utility can ONLY be used if you do not update any packages and install only from the CD\/DVD. This utility will fail if updates have been done.\r\n\r\nPackages repository cache directories: \/var\/cache\/yum\/.\r\n\r\nPut user specific aliases and functions in ~\/.bashrc\r\n# Aliases (linux commands + software)\r\nalias free='free -m'\r\nalias grep='grep --color'\r\nalias grepx='grep -n --color'\r\nalias ls='ls -hv --color --show-control-chars --group-directories-first'\r\nalias ll='ls -hlv --color --show-control-chars --group-directories-first'\r\nalias nethogs='nethogs egiga0'\r\nalias psa='ps -e -o pid,pcpu,pmem,rss,ni,state,stat,start,time,nlwp,comm,cmd'\r\nalias tailn='tail -f nohup.out'\r\nalias tailf='tail -f'\r\n\r\nTo install the package tsclient, enter the command:\r\nsu -c 'yum install tsclient'\r\nTo install the package group MySQL Database, enter the command:\r\nsu -c 'yum groupinstall \"MySQL Database\"'\r\nWhen you install a service, CentOS does not activate or start it. To configure a new service to run on bootup, choose Desktop->System Settings->Server Settings->Services, or use the chkconfig and service command-line utilities.\r\n\r\nTo update the tsclient package to the latest version, type:\r\nsu -c 'yum update tsclient'\r\n\r\nTo remove the tsclient package from your system, use the command:\r\nsu -c 'yum remove tsclient'\r\nTo remove all of the packages in the package group MySQL Database, enter the command:\r\nsu -c 'yum groupremove \"MySQL Database\"'\r\n\r\nTo search for a specific package by name, use the list function:\r\nsu -c 'yum list tsclient'\r\nTo view details about a package:\r\nsu -c 'yum info tsclient'\r\nTo search for version 0.132 of the application, use the command:\r\nsu -c 'yum list tsclient-0.132'\r\nUse the standard wildcard characters to run any search option with a partial word or name: ? to represent any one character, and * to mean zero or more characters. Always add the escape character (\\) before wildcards. To list all packages with names that begin with tsc, type:\r\nsu -c 'yum list tsc\\*'\r\n\r\nThe search option checks the names, descriptions, summaries and listed package maintainers of all of the available packages:\r\nsu -c 'yum search mysql'\r\n\r\nThe provides function checks both the files included in the packages and the functions that the software provides. This option requires yum to download and read much larger index files than with the search option:\r\nTo search for all packages that include files called libneon, type:\r\nsu -c 'yum provides libneon'\r\nTo search for all packages that either provide a MTA (Mail Transport Agent) service, or include files with mta in their name:\r\nsu -c 'yum provides MTA'\r\n\r\nCentOS systems automatically use the CentOS Project repositories. These include [base], [updates], [addons], [centosplus], [contrib], [extras], and [testing]. Some of these repositories are not enabled by default, because they might change core packages. The enabled repositories are [base], [updates], [addons], and [extras].\r\nTo perform a full system update, type this command:\r\nsu -c 'yum update'\r\nTo activate automatic daily updates, enter this command:\r\nsu -c '\/sbin\/chkconfig --level 345 yum on; \/sbin\/service yum start'\r\n\r\nTo add an extra repository, place a definition file in the \/etc\/yum.repos.d\/ directory. The names of repository definition files end with .repo.\r\nDefault yum repositories are automatically used as up2date channels. If you want to add other channels for up2date, you must manually configure up2date to use these channels. To do so, edit the \/etc\/sysconfig\/rhn\/sources file.\r\n\r\nTo manually add a public key to your rpm keyring, use the import feature of the rpm utility. To import the file GPG-PUB-KEY.asc, type the following command:\r\nsu -c 'rpm --import GPG-PUB-KEY.asc'\r\nto import the file GPG-PUB-KEY.asc on the web site www.therepository.com use this command:\r\nsu -c 'rpm --import http:\/\/www.therepository.com\/GPG-PUB-KEY.asc'\r\n\r\nTo purge the package data files, use this command:\r\nsu -c 'yum clean headers'\r\nRun this command to remove all of the packages held in the caches:\r\nsu -c 'yum clean packages'\r\n\r\nEnter this command to manually install the package tsclient-0.132-4.i386.rpm:\r\nsu -c 'yum localinstall tsclient-0.132-4.i386.rpm'\r\n\r\nYou can list yum groups with:\r\nyum grouplist \r\nand for more (hidden) groups including the group ids, try (\"group list\" is equivalent to \"grouplist\"):\r\nyum group list hidden | grep -i \"X Window System\"\r\nTo install Xfce group:\r\nyum groups install \"Xfce\" \r\n\r\nLists the repository ID, name, and number of packages it provides for each enabled repository:\r\nyum repolist\r\n# including disabled:\r\nyum repolist all\r\n# see also:\r\nll \/etc\/yum.repos.d\r\n# enable a repository:\r\nyum-config-manager --enable InstallMedia\r\n# or edit repo file, e.g. (set enabled=1):\r\nnano \/etc\/yum.repos.d\/packagekit-media.repo\r\n\r\nyum install yum-utils\r\n# list files from mate-system-monitor.x86_64 package:\r\nrepoquery -l mate-system-monitor.x86_64\r\n\r\n# list group content\r\nyum group info \"General Purpose Desktop\"\r\n\r\n# List installed packages with YUM\r\nyum list installed\r\n\r\n# list dependencies:\r\nyum deplist openssl.x86_64\r\nrepoquery --requires --resolve git2u-core -> shows required packages\r\nrepoquery --requires git2u-core -> shows required files from packages required\r\n\r\n# List the files in git2u-core-2.10.0-1.ius.el6.x86_64.rpm requiring libcrypto.so.10:\r\nrpm -q --filerequire -p git2u-core-2.10.0-1.ius.el6.x86_64.rpm | grep libcrypto.so.10\r\n\r\n# List packages on which git2u-core-2.10.0-1.ius.el6.x86_64.rpm package depends:\r\nrpm -q --requires -p git2u-core-2.10.0-1.ius.el6.x86_64.rpm\r\n\r\n# install a package with no dependencies checking:\r\nwget https:\/\/dl.iuscommunity.org\/pub\/ius\/stable\/Redhat\/6\/x86_64\/git2u-core-2.10.0-1.ius.el6.x86_64.rpm\r\nrpm -i --nodeps git2u-core-2.10.0-1.ius.el6.x86_64.rpm\r\n# you then may continue to install depending packages with yum as usual:\r\nyum install git2u-gitweb\r\n\r\n# list repository content\r\nyum list available | grep 'case sensitive repository id here'\r\n\r\n# search for gcc package\r\nyum list \\*gcc\\*\r\n# install gcc\r\nyum install gcc\r\n\r\n# add a repository\r\nyum-config-manager --add-repo http:\/\/www.nasm.us\/nasm.repo\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p># https:\/\/www.centos.org\/docs\/5\/html\/yum\/ # http:\/\/linux.duke.edu\/projects\/yum\/ The Alert Icon is part of the up2date application, which enables you to easily install system updates. You may use any of the following formats to specify a package in a yum operation: name, name.architecture, name-version, [&hellip;]<\/p>\n<div class=\"link-more\"><a href=\"https:\/\/adrhc.go.ro\/blog\/yum\/#more-3093\" class=\"more-link\">Continue reading &#10142; <span class=\"screen-reader-text\">Yum<\/span><\/a><\/div>","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,9,8,11,37],"tags":[],"class_list":["post-3093","post","type-post","status-publish","format-standard","hentry","category-centos","category-commands","category-howto","category-linux","category-redhat"],"_links":{"self":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/3093","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/comments?post=3093"}],"version-history":[{"count":0,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/posts\/3093\/revisions"}],"wp:attachment":[{"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/media?parent=3093"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/categories?post=3093"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/adrhc.go.ro\/blog\/wp-json\/wp\/v2\/tags?post=3093"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}