search
HomeSystem TutorialLINUXrpm management: Linux server software package query, uninstallation and installation guide

rpm 管理:Linux 服务器软件包的查询、卸载与安装指南

Article Directory

1.rpm management (key): software query, uninstallation, installation

Function: The function of rpm is similar to the "Software Management" in Laptop Manager on Windows, the "Software Manager" on Security Guard and other products. Its main function is to perform corresponding management operations on the software packages on the Linux server. The management is divided into: query, Uninstall and install.

1.1 Query the installation status of a certain software:

#rpm-qa|grep keywords

Options:

-q: query, query

-a: all, all

Case: Check whether firefox is installed on linux

1.2 Uninstall a certain software

#rpm-e software name

When Maxthon is uninstalled, it is a Linux text editor with no dependencies, so it can be uninstalled directly.

However, when uninstalling Apache, it prompts that it is difficult to uninstall:

When there are dependencies and you don’t want to solve the problem, you can: #rpm-e package name --nodeps

Installation of 1.3 software

If you want to install software, just like under Windows, you must first find the installation package.

How to obtain the software package:

a. Go to the official website to download;

b. If you don’t mind the old version, you can read it from the CD (or image file);

View information about spherical devices:

#lsblk (listblockdevices) View information about ball devices

在这里插入图片描述

Name: name

Size: device size

Type: type

MountPoint: Mount point (similar to the c drive under windows)

b.Mount the disc

Command: mount

Sentence pattern: #mount The original address of the device and the location path to be mounted

linux执行权限和写权限_linux 执行权限_权限执行是什么意思

Original address of the device: The addresses are all under /dev, and then the specific name value is determined according to the sizeLinux execution permission, and they are stacked together to form the original address, such as currently: "/dev/sr0"

The location path to be mounted: The mounting directory is usually under mnt. You can also create a directory under mnt. Here we take "/mnt/dvd" as an example

Command to install software: #rpm-ivhFull name of software package

Options:

-i: install, install

-v: Show progress bar

-h: Indicates displaying the progress bar in the form of "#"

在这里插入图片描述

Note that in the current directory, you can type quickly: type fire first, and then press the tab key to complete it manually.

2 Permission management

Overview: Linux systems usually divide the identities that can save/retrieve files into three categories: owner, group, others, and each of the three identities has read, write, execute and other permissions.

2.1 Permission introduction

What are the permissions?

In the management of multi-user (may not be at the same time) computer system, Linux formats the hard disk. Permission means that a specific user has specific rights to use system resources, such as folders, the use of specific system instructions, or storage limits. .

In Linux, there are read, write, and execute permissions respectively:

Read permission:

For folders, read permission affects whether the user can still enumerate the directory structure

For files, read permission affects whether users can view the file content

Write permission:

For folders, write permission affects whether users can "create/delete/copy to/connect to" documents under the folder

For files, write permission affects whether users can edit the file content

Execution permission:

Usually for files, very script files.

2.2 Identity introduction

2. Identity introduction

2.3 Introduction to Linux permissions

To set permissions, you need to know some basic attributes of files and permission allocation rules.

In Linux, the ls command is often used to view the attributes of a file and is used to display the file name and related attributes of the file.

The part marked in red is the document permission attribute information of Linux (ls-l is equivalent to ll)

Ten characters represent the meaning:

Permission allocation is a combination of the three parameters of rwx, and the position order will not change. If there is no corresponding permission, use – instead.

a.It is a folder type

b. Owner: Has full permissions (read, write, execute)

c. Users in the same group: readable and executable

d. Other users: readable, executable

2.4 Permission settings

Sentence pattern: #chmod option permission mode document

Commonly used options:

-R: Set permissions recursively (when the document type is a folder)

Permission mode: It is the permission information that needs to be set for the document

Document: It can be a file or a folder, and it can be a relative path or an absolute path.

Note: If you want to set permissions on a document, the operator must be either the root user or the owner of the document.

2.4.1 Letter method

2.4.2 Digital method

Read: r4

linux执行权限和写权限_权限执行是什么意思_linux 执行权限

Written by: w2

Execution: x1

No permissions: 0

在这里插入图片描述

For example: you need to set permissions for anaconda-ks.cfglinux execution permissions. The permissions require that the owner has full permissions, users in the same group have read and execute permissions, and other users can only read.

Full permissions (u): read+write+execute=4+2+1=7

Read and execute (g): read+execute=4+1=5

Read permission (o): read=4

I learned from the above that the permission is: 754

#chmod754anaconda-ks.cfg

Written test question: The command to set document permissions using the super administrator is #chmod-R731aaa. Is there anything unreasonable about this command?

Owner: 7=4+2+1=Read+Write+Execute

Users in the same group: 3=2+1=write+execute

Other users: 1=1=Execute

Reason: I can write but can’t read

Note: When writing permissions, never set "weird permissions" similar to the previous ones. If the numbers 2 and 3 often appear in a permission number, the permission is unreasonable.

The above is the detailed content of rpm management: Linux server software package query, uninstallation and installation guide. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
The Future of Linux Software: Will Flatpak and Snap Replace Native Desktop Apps?The Future of Linux Software: Will Flatpak and Snap Replace Native Desktop Apps?Apr 25, 2025 am 09:10 AM

For years, Linux software distribution relied on native formats like DEB and RPM, deeply ingrained in each distribution's ecosystem. However, Flatpak and Snap have emerged, promising a universal approach to application packaging. This article exami

What are the differences in how Linux and Windows handle device drivers?What are the differences in how Linux and Windows handle device drivers?Apr 25, 2025 am 12:13 AM

The differences between Linux and Windows in handling device drivers are mainly reflected in the flexibility of driver management and the development environment. 1. Linux adopts a modular design, and the driver can be loaded and uninstalled dynamically. Developers need to have an in-depth understanding of the kernel mechanism. 2. Windows relies on the Microsoft ecosystem, and the driver needs to be developed through WDK and signed and certified. The development is relatively complex but ensures the stability and security of the system.

Compare and contrast the security models of Linux and Windows.Compare and contrast the security models of Linux and Windows.Apr 24, 2025 am 12:03 AM

The security models of Linux and Windows each have their own advantages. Linux provides flexibility and customizability, enabling security through user permissions, file system permissions, and SELinux/AppArmor. Windows focuses on user-friendliness and relies on WindowsDefender, UAC, firewall and BitLocker to ensure security.

How does hardware compatibility differ between Linux and Windows?How does hardware compatibility differ between Linux and Windows?Apr 23, 2025 am 12:15 AM

Linux and Windows differ in hardware compatibility: Windows has extensive driver support, and Linux depends on the community and vendors. To solve Linux compatibility problems, you can manually compile drivers, such as cloning RTL8188EU driver repository, compiling and installing; Windows users need to manage drivers to optimize performance.

What are the differences in virtualization support between Linux and Windows?What are the differences in virtualization support between Linux and Windows?Apr 22, 2025 pm 06:09 PM

The main differences between Linux and Windows in virtualization support are: 1) Linux provides KVM and Xen, with outstanding performance and flexibility, suitable for high customization environments; 2) Windows supports virtualization through Hyper-V, with a friendly interface, and is closely integrated with the Microsoft ecosystem, suitable for enterprises that rely on Microsoft software.

What are the main tasks of a Linux system administrator?What are the main tasks of a Linux system administrator?Apr 19, 2025 am 12:23 AM

The main tasks of Linux system administrators include system monitoring and performance tuning, user management, software package management, security management and backup, troubleshooting and resolution, performance optimization and best practices. 1. Use top, htop and other tools to monitor system performance and tune it. 2. Manage user accounts and permissions through useradd commands and other commands. 3. Use apt and yum to manage software packages to ensure system updates and security. 4. Configure a firewall, monitor logs, and perform data backup to ensure system security. 5. Troubleshoot and resolve through log analysis and tool use. 6. Optimize kernel parameters and application configuration, and follow best practices to improve system performance and stability.

Is it hard to learn Linux?Is it hard to learn Linux?Apr 18, 2025 am 12:23 AM

Learning Linux is not difficult. 1.Linux is an open source operating system based on Unix and is widely used in servers, embedded systems and personal computers. 2. Understanding file system and permission management is the key. The file system is hierarchical, and permissions include reading, writing and execution. 3. Package management systems such as apt and dnf make software management convenient. 4. Process management is implemented through ps and top commands. 5. Start learning from basic commands such as mkdir, cd, touch and nano, and then try advanced usage such as shell scripts and text processing. 6. Common errors such as permission problems can be solved through sudo and chmod. 7. Performance optimization suggestions include using htop to monitor resources, cleaning unnecessary files, and using sy

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft