======Package Management====== Is controlling software (Packages) in a Linux environment. ---- **RPM / YUM / DNF** tools are used on *Redhat *CentOS *Fedora *Suse **apt-get / dpkg** tools are used on *Debian *Ubuntu *Mint ====CENTOS==== *Uses yum/rpm. *Repos listed in **/etc/yum.repos.d/** ====rpm==== *-ivh //packagefile// - Installs //packagefile// with a series of hashes as indicators. *-uvh - Same as -ive but upgrades a a package if already installed? *-q //pkgname// - Queries to see if //packagename// is installed. *-e //pkgname// - remove //pkgname// from system. ====yum==== *yum makecache fast - updates local cache of repo contents. Similar to Pacman -Syy *yum search //name// - searches repos for pkgs named //name// *yum install //httpd// - installs //httpd// and deps from repos. *yum update -- updates all packages on system. =====UBUNTU===== ---- uses apt-get / dpkg ====apt==== Config file located in ///etc/apt///sources.list important. sources.list.d folder contains official repos. *apt-get update -- updates repo list. DOES NOT UPGRADE. ===apt-cache=== ***search** //thing// -- searches packages on local package cache for //thing// to download from server. ***stats** -- shows stats based on the metadata downloaded about our repos. ***depends** apache2 -- shows dependencies for the apache2 package. ***unmet** -- shows pkgs that have unmet depends. *apt-get install //apache2// - install apache2 + deps from repos. *apt-get upgrade -- upgrades out of date packages. *apt-get clean -- cleans up local pkg files, temp files, etc. *apt-get autoclean -- only cleans out packages that are no longer avail in our source repo. These can no longer be downloaded and are largely useless files. *apt-get install -s php5 -- -s says simulate install php5. useful! *apt-get install -y php5 -- will auto input YES on prompts. *apt-get install -y -q php5 -- -q omits some terminal output. *apt-get source php5 -- this will download the source files php5 and not the PACKAGE php5. * **apt-get dist-upgrade** -- RTFM, performs upgrade but also handles changing of dependencies of new versions of a package. As a result, some packages may be removed.