


What is the difference between Linux package management tools yum and apt?
Generally speaking, famous Linux systems are basically divided into two categories: RedHat series: Redhat, Centos, Fedora, etc.; Debian series: Debian, Ubuntu, etc.
yum (Yellow dog Updater, Modified) is a shell front-end package manager in Fedora and RedHat and SUSE. apt (Advanced Packaging Tool) is a shell front-end package manager in Debian and Ubuntu.
Overview
Generally speaking, the famous Linux systems are basically divided into two categories:
RedHat series: Redhat, Centos, Fedora, etc.
Debian series: Debian, Ubuntu, etc.
RedHat Series
The common installation package format is rpm package. The command to install rpm package is "rpm -parameter"
Package management tool yum
Supports tar package
Debian series
The common installation package format is deb package. The command to install deb package is "dpkg -parameter"
Package management tool apt-get
Supports tar package
tar It is just a compressed file format, so it just compresses and packages the files.
rpm is equivalent to the installation file in windows, it will automatically handle the dependencies between software packages.
In terms of advantages and disadvantages, rpm is generally a pre-compiled file, which may have been bound to a certain CPU or distribution.
tar generally includes compilation scripts, which you can compile in your environment, so it is universal.
If your package does not want to be open source, you can make it into rpm. If it is open source, it is more convenient to use tar.
tar is generally source code packaged software. You need to unpack it yourself, and then perform the three steps of installation, ./configure, make, make install. to install the software.
rpm is a software package management mechanism of redhat company. Installation, deletion and other operations can be performed directly through the rpm command. The biggest advantage is that it automatically handles the possible dependencies of various software packages internally.
Series comparison
Comparison items | rpm | yum | dpkg | apt |
---|---|---|---|---|
Series | RedHat system | RedHat system | Debian system | Debian system |
Difference | Package installation tool | Dependency management tool | Package installation tool | Dependency management tool |
Query installed | rpm -qa | yum list installed | dkpg -l | apt list –installed |
Install | rpm -i package.rpm or rpm –ivh http://www.xxx.net/package.rpm | yum install -y | dpkg -i package.deb | apt-get install package |
update | rpm –U software .rpm | yum update | apt upgrade | |
Remove package | rpm -e [module1][module2]… | yum -remove | dpkg -r package | apt remove package |
Remove the software package and configuration | dpkg -P | apt purge package | ||
Downloaded package storage location | ||||
rpm -ql |
##/ usr/share |
|||
/usr/bin | /usr/bin |
|||
/etc |
/etc |
|||
/usr/lib |
/usr/lib |
|||
/usr/share/doc |
|
|||
##renew |
||||
How to use1 dpkg packagedpkg (Debian Package) management tool, the software package name has the .deb suffix. Similar to redhat's rpm. This method is suitable when the system cannot be connected to the Internet. dpkg -i tree_1.5.3-1_i386.deb 安装软件 sudo dpkg -r tree 卸载软件 Note: There are many ways to transfer tree.deb to the Linux system. VMware Tools can be installed by mounting or using tools such as WinSCP 2 APTAdvanced Packaging Tool (APT) is an advanced software tool. This method is suitable if the system can connect to the Internet. Similar to redhat's yum. The apt command provides commands for finding, installing, upgrading, and deleting a certain, a group, or even all software packages. The commands are concise and easy to remember. apt command execution requires super administrator privileges (root). Debian series operating systems such as Debian and Ubuntu are suitable for apt. Under Ubuntu, apt-get is almost one of the most commonly used shell commands, because it is a common tool command for installing software in Ubuntu. Still taking tree as an example apt-get install tree 安装tree apt-get remove tree 卸载tree apt-get update 更新软件 apt-get upgrade apt-setup 设定/etc/apt/souces.list apt-get update 软体资料库同步 apt-get install softwarename1 [softwarename2.....] 安装软体 apt-get remove softwarename 1 [softwarename 2...] 移除软体(保留设定档) apt-get --purge remove softwarename 1 [softwarename 2...] 移除软体(不保留设定档) apt-cache search softwarename 列出所有sofrwarename的套件 apt-upgrade [softwarename 1 softwarename2...] 更新套件,不指定套件名则更新所有可更新的套件 apt-get clean(autoclean) 删除系统暂存的deb(autoclean只会将比目前系统旧版的套件删除) apt-get dist-upgrade 转换系统的版本(需在/etc/apt/sources.list指定stable,testing或unstable) 3 rpm packageConvert .rpm file to .deb file 3.1 Installrpm -i 需要安装的包文件 rpm -iv 需要安装的包文件(显示安装详情) rpm -ivh 需要安装的包文件(显示安装详情及进度 3.2 Upgraderpm -U 需要升级的包文件 rpm -Uvh 需要升级的包文件(显示升级详情及进度) 3.3 Uninstallrpm -e Software package that needs to be uninstalled Note: If other programs depend on the package to be uninstalled, the system will prompt that it cannot be deleted. If you need to force the deletion by adding -nodeps, will be forced to delete, but it may cause the software that depends on it to not run. . 3.4 ViewView installed rpm -qa 查看已安装 rpm -qa | grep "软件或者包的名字" 查看指定包 4 yum installationBased on RPM package management, it can automatically download RPM packages from the specified server and install them. Dependencies can be automatically handled and all dependent software packages installed at once, eliminating the need to download and install them again and again. yum features
yum detailed instructions1、安装: yum install 软件 2、升级: yum update 软件 3、删除: yum remove 软件 4、查看: yum info 软件 5、搜索软件: yum search 软件 6、查看依赖关系: yum deplist 软件 7、查看已安装软件: yum list installded |
The above is the detailed content of What is the difference between Linux package management tools yum and apt?. For more information, please follow other related articles on the PHP Chinese website!

The five core components of Linux are kernel, shell, file system, system library and system tools. 1. The kernel manages hardware resources and provides services to the application. 2. Shell serves as the interface between the user and the system, interprets and executes commands. 3. The file system is responsible for the storage and organization of data. 4. The system library provides precompiled functions to provide program calls. 5. System tools are used for system management and maintenance. These components work together to give Linux powerful functionality and flexibility.

This article introduces several methods to check the OpenSSL configuration of the Debian system to help you quickly grasp the security status of the system. 1. Confirm the OpenSSL version First, verify whether OpenSSL has been installed and version information. Enter the following command in the terminal: If opensslversion is not installed, the system will prompt an error. 2. View the configuration file. The main configuration file of OpenSSL is usually located in /etc/ssl/openssl.cnf. You can use a text editor (such as nano) to view: sudonano/etc/ssl/openssl.cnf This file contains important configuration information such as key, certificate path, and encryption algorithm. 3. Utilize OPE

This guide details how to build a Hadoop development environment on a Debian system. 1. Install Java Development Kit (JDK) First, install OpenJDK: sudoaptupdatesudoaptininstallopenjdk-11-jdk-yConfigure JAVA_HOME environment variable: sudonano/etc/environment at the end of the file (adjust the path according to the actual JDK version): JAVA_HOME="/usr/lib/jvm/java-11-openjdk-amd64" Save and exit, and then execute: source/etc

Effectively managing Hadoop resources on the Debian system requires the following steps: Hadoop deployment: First, complete the installation and configuration of Hadoop on the Debian system. This includes necessary operations such as downloading Hadoop distribution packages, decompressing, setting environment variables, etc. Cluster configuration: After the installation is completed, configure the Hadoop cluster, covering the settings of HDFS (Hadoop distributed file system) and YARN (YetAnotherResourceNegotiator). You need to modify the core configuration file, such as: core-site.xml, hdfs-site.xml, mapred-site.x

To improve the security of DebianTomcat logs, we need to pay attention to the following key policies: 1. Permission control and file management: Log file permissions: The default log file permissions (640) restricts access. It is recommended to modify the UMASK value in the catalina.sh script (for example, changing from 0027 to 0022), or directly set filePermissions in the log4j2 configuration file to ensure appropriate read and write permissions. Log file location: Tomcat logs are usually located in /opt/tomcat/logs (or similar path), and the permission settings of this directory need to be checked regularly. 2. Log rotation and format: Log rotation: Configure server.xml

Warning messages in the Tomcat server logs indicate potential problems that may affect application performance or stability. To effectively interpret these warning information, you need to pay attention to the following key points: Warning content: Carefully study the warning information to clarify the type, cause and possible solutions. Warning information usually provides a detailed description. Log level: Tomcat logs contain different levels of information, such as INFO, WARN, ERROR, etc. "WARN" level warnings are non-fatal issues, but they need attention. Timestamp: Record the time when the warning occurs so as to trace the time point when the problem occurs and analyze its relationship with a specific event or operation. Context information: view the log content before and after warning information, obtain

Tomcat logs are the key to diagnosing memory leak problems. By analyzing Tomcat logs, you can gain insight into memory usage and garbage collection (GC) behavior, effectively locate and resolve memory leaks. Here is how to troubleshoot memory leaks using Tomcat logs: 1. GC log analysis First, enable detailed GC logging. Add the following JVM options to the Tomcat startup parameters: -XX: PrintGCDetails-XX: PrintGCDateStamps-Xloggc:gc.log These parameters will generate a detailed GC log (gc.log), including information such as GC type, recycling object size and time. Analysis gc.log

The impact of Apache logs on server performance under the Debian system is a double-edged sword, which has both positive effects and potential negative effects. Positive aspect: Problem diagnosis tool: Apache log records all requests and responses in detail on the server, and is a valuable resource for quickly locating faults. By analyzing the error log, configuration errors, permission issues, and other exceptions can be easily identified. Security Monitoring Sentinel: Access logs are able to track potential security threats, such as malicious attack attempts. By setting log audit rules, abnormal activities can be effectively detected. Performance Analysis Assistant: Access logging request frequency and resource consumption to help analyze which pages or services are most popular, thereby optimizing resource allocation. Combined with top or htop, etc.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

WebStorm Mac version
Useful JavaScript development tools

SublimeText3 Chinese version
Chinese version, very easy to use

Dreamweaver Mac version
Visual web development tools

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Atom editor mac version download
The most popular open source editor