6) 执行“makeclean”删除安装时产生的临时文件。
7) 运行应用程序:一般来说,Linux的应用软件的可执行文件会存放在/usr/local/bin目录下!不过这并不是“放四海皆准”的真理,最可靠的还是看这个软件的 INSTALL和README文件,一般都会有说明。
8) 卸载:通常软件的开发者很少考虑到如何卸载自己的软件,而tar又仅是完成打包的工作,所以并没有提供良好的卸载方法。
有两个软件能够解决这个问题,那就是Kinstall和Kife,它们是tar包安装、卸载的黄金搭档5.rpm包:1) 操作系统:RedHat(Red Hat/Fedora)2) 常见的安装包格式 rpm包,安装rpm包的命令是“rpm -参数”3) 包管理工具 yum4) 支持tar包5.1rpm命令安装: rpm –ivh 软件包名.rpm( -I 安装软件,-t测试安装,不是真的安装,-p显示安装进度,-f忽略任何错误,-U升级安装,-v检测套件是否正确安装)卸载: rpm –e 软件名(注意使用的是软件名,而不是软件包名)查询:查询当前系统安装的软件包: rpm –qa ‘*软件包名*’rpm descriptionrpm -Uvhpackages(s).rpminstall/upgrade package file(s)rpm -e package emove packagerpm -qa '*spell*'show all packages whose names contain the word spell and already installed in systemrpm -q package show version of package installed rpm -q -i package show all package metadatarpm -q -i -ppackage.rpmshow all package file's metadata rpm -q -f /path/file what package does file belong rpm -q -l package list where files were installedrpm -e package emove packagerpm -qa '*spell*'show all packages whose names contain the word spell and already installed in systemrpm -q package show version of package installedrpm -q -i package show all package metadatarpm -q -i -ppackage.rpmshow all package file's metadatarpm -q -f /path/file what package does file belongrpm -q -l package list where files were installedrpm -q -l -ppackage.rpmlist where files would be installedrpm2cpiopackage.rpm | cpio-idextract package files to current directoryrpm -q --requirespackagelist files/packages that package needsrpm -q --whatrequires package list packages that need package (see also whatrequires)5.2yum命令yum Descriptionyum update [package list]upgrade specified packages (or all installed packages if none specified)yum install <package list>install latest version of package(s), Yum refreshes each time it's usedyum remove<package list>remove specified packages from system yum list [packagelist]list available packages from repositories6.deb包:1) 操作系统:Debian系列(Ubuntu)2) 常见的安装包格式 deb包,安装deb包的命令是“dpkg -参数”3) 包管理工具apt-get4) 支持tar包6.1dpkg命令安装: dpkg –i 软件包名.deb卸载: dpkg –e 软件名查询:查询当前系统安装的软件包: dpkg –l ‘*软件包名*’dpkg descriptiondpkg -Gi package(s).debinstall/upgrade package file(s)dpkg -rpackageemove packagedpkg -l'*spell*' show all packages whose names contain the word spell and already installed in systemdpkg -lpackageshow version of package installed dpkg -spackageshow all package metadatadpkg -Ipackage.debshow all package file's metadatadpkg -S /path/filewhat package does file belongdpkg -Lpackagelist where files were installeddpkg -cpackage.deblist where files would be installed dpkg -xpackage.debextract package files to current directory dpkg -s package |grep ^Depends:list files/packages that package needsdpkg --purge --dry-run package list packages that need package (see also whatrequires)6.2apt-get命令Apt-get命令只能用于在repositories中的包,不能用于处理自己下载的deb包,要想处理自己下载的deb包,只能用dpkg命令。
apt-get Descriptionapt-get dist-upgrade upgrade specified packages (or all installed packages if none specified)apt-get install<package list>install latest version of package(s)apt-get remove<package list>remove specified packages from system apt-cache list[package list]list available packages from repositories 7.rpm包和deb包安装命令对比:Task Red Hat/Fedora Ubuntu Adding Removing and Upgrading PackagesRefresh list of available packages Yum refresheseach time it's usedapt-get updateInstall a package from a repository yum installpackage_nameapt-get installpackage_nameInstall a package file yum installpackage.rpm或者rpm -ipackage.rpmdpkg --installpackage.debRemove a package rpm -epackage_nameapt-get removepackage_nameCheck for package upgrades yum check-updateapt-get -supgrade或者apt-get -s dist-upgradeUpgrade packages yum update或者rpm -Uvh [args]apt-get dist-upgradeUpgrade the entire system yum upgrade apt-get dist-upgradePackage InformationGet information about an available package yum searchpackage_nameapt-cache searchpackage_nameShow available packages yum list available apt-cache dumpavailList all installed packages yum list installed或者rpm -qadpkg --list yum info apt-cache showUpgrade the entire system yum upgrade upgradePackage InformationGet information about an available package yum searchpackage_name apt-cache search package_nameShow available packages yum list available apt-cache dumpavailList all installed packages yum list installed 或者rpm -qadpkg --list Get information about a package yum info package_name apt-cache show package_nameGet information about an installed package rpm -qi package_name dpkg --status package_name List files in an installed package rpm -qlpackage_namedpkg --listfiles package_name List documentation files in an installed package rpm -qdpackage_name-List configuration files in an installed package rpm -qcpackage_name-Show the packages a given package depends on rpm -qRpackage_nameapt-cache depends Show other packages that depend on a given package (reverse dependency)rpm -q -whatrequires[args]apt-cache rdepends Package File InformationGet information about a package file rpm -qpipackage.rpmdpkg --info package.deb List files in a package file rpm -qplpackage.rpmdpkg --contents package.deb List documentation files in a package file rpm -qpdpackage.rpm-List configuration files in a package file rpm -qpcpackage.rpm-Extract files in a package rpm2cpiopackage.rpm |cpio -viddpkg-deb --extract package.deb dir-to-extract-to Find package that installed a file rpm -qf filenamedpkg --search filename Find package that provides a particular file yum providesfilenameapt-file search filename Misc. Packaging System ToolsShow stats about the package cache-apt-cache stats Verify all installed packages rpm -Vadebsums Remove packages from the local cache directory yum cleanpackages apt-get cleanFind package that installed a file rpm -qf filenamefilenameFind package that provides a particular file yum providesfilenameapt-file searchfilenameMisc. Packaging System ToolsShow stats about the package cache-apt-cache stats Verify all installed packages rpm -Va debsumsRemove packages from the local cache directory yum cleanpackagesapt-get cleanRemove only obsolete packagesfrom the local cache directory-apt-get autocleanRemove header files from the local cache directory(forcing a new download of same on next use)yum cleanheadersapt-file purgeGeneral Packaging System Information Package file extension*.rpm*.deb Repository location configuration/etc/yum.conf。