Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Linux software installation and management program

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Linux installation and management program

Linux Application Foundation

The relationship between Linux commands and applications

1.1.1 relationship between application and system commands

File location

System commands: generally in / bin and / sbin directories, or Shell internal instructions

Applications: usually in / usr/bin and / usr/sbin directories

Main use

System commands: complete the basic management of the system, such as IP configuration tools

Applications: perform other relatively independent auxiliary tasks, such as web browsers

Applicable environment

System commands: generally only run in the character operation interface

Applications: according to the actual needs, some programs can be run in the graphical interface

Running format

System commands: generally include command words, command options, and command parameters

Applications: there is usually no fixed execution format

Composition of Linux applications

File type save directory

General execution program file / usr/bin

Server executor file and hypervisor file / usr/sbin

Application configuration file / etc

Log file / var/log

Application documentation file / usr/share/doc

Application man page file / usr/share/man

Package type of the software package

RPM package: the extension is ".rpm" and can only be installed in Linux systems that use RPM mechanism, such as RHEL, Fedora, Centos, etc. Installation requires the use of the rpm command on the system.

DEB package: the extension is ".deb" and can only be installed in Linux systems that use DPKG mechanism, such as Debian, Ubuntu, etc. Installation requires the use of the dpkg command on the system.

Source code package: the original code package developed by programmers, which is generally made into compressed package files in "tar.gz", "tar.gz2" and other formats, including the original code of the program.

Software packages with installers: different extensions, installers such as install.sh, setup, etc. are available in the zip package, or as a single execution file in ".bin" format.

Green installed software package: the compiled execution file is provided in the compressed package, and the file after opening the compressed package can be used directly

Use the RPM package management tool

2.1 RPM Package Manager

Proposed by Red Hat and adopted by many Linux distributions

Establish a unified database file, record the software package installation, uninstall and other changes in detail, and can automatically analyze the package dependency relationship.

Package files encapsulated using the RPM mechanism have a naming format commonly known as the convention.

Generally use "software name-software version-number of releases. Operating system type. hardware architecture type.rpm

For example: "bash-4.1.2-15. El6_4. X86_64.rpm"

2.2 use the RPM package management command-rpm

It can mainly achieve the following three types of functions

Query and verify the relevant information of RPM software package

Install, upgrade, uninstall RPM packages

Maintenance of RPM database information and other comprehensive management operations

2.2.1 query information about installed RPM software

Command format rpm-Q [suboption] [software name]

Usage: combine different sub-options to complete different queries

-qa: view a list of all RPM packages installed on the system

-qi: view the details of the specified software

-ql: query the directory and file list installed by the specified software package

-qc: displays only the configuration files installed by the specified software package

-qd: displays only the documentation files installed by the specified software package

Query which RPM software the file or directory belongs to

Command format rpm-gf file or directory name

2.2.2 query uninstalled RPM package files

Command format rpm-qp [suboptions] RPM package file

Usage: combine different sub-options to complete different queries

-qpi: view the details of the software through the .rpm package file

-qpl: view the list of directories and files contained in the .rpm installation package

-qpc: view the list of configuration files contained in the .rpm installation package

-qpd: view the list of documentation files contained in the .rpm installation package

2.2.3 install, upgrade, and uninstall the RPM package

Command format rpm [options] RPM package file

Usage: different options are suitable for different situations

-I: install a new rpm package

-U: upgrade a rpm software and install it if it is not originally installed

-F: update a rpm software. If it is not installed, the installation will be abandoned.

2.2.4 Uninstall the specified RPM software

Command format rpm-e software name

Secondary option

-- force: forces the installation of the specified rpm package

-- nodeps: ignore dependencies when installing, upgrading, or uninstalling software

-h: show the progress of the installation with the "#" sign

-v: displays details during installation

2.2.5 rebuilding the RPM database

When the RPM database is damaged (mistakenly deleted files, illegal shutdown, virus damage, etc.) the Linux system can not be repaired automatically, it will lead to the normal use of the rpm command. You can use this command to rebuild the database

Command format rpm-- rebuilddb

Or rpm-- initdb.

Mutate the installer from the source code

3.1 Overview of source code compilation

Advantages of using source code to install software

Get the latest software version and fix bug in time

Customize the software functions flexibly according to the needs of users

Examples of application situations

When installing a newer version of the application

The latest versions of free software are mostly released first in the form of source code.

When the currently installed program cannot meet the needs

Compilation and installation can be modified and customized by users.

When you need to add new features to your application

Users can reconfigure and freely modify the source code to add new features

3.2 confirm the source code compilation environment

You need to install a compiler that supports the CumberCraft + programming language.

Such as: gcc-4.4.7-4.el6, gcc-c++-4.4.7-4.el6

Make-3.81-20.el6.

3.3 compilation and installation process

Step 1. Unpack

It is customary to release the package to the / usr/src/ directory

Source code file location after unpacking: / usr/src/ software name-version number /

Step 2. Configuration

Use the configure script in the source directory

Execute ". / configure-- help" to view help

Typical configuration option:-- prefix= software installation directory

Step 3. Compile

Execute make command after configuration is completed

Step 4. Installation

Execute the make install command after compilation is complete

Step 5. Use

Adjust the configuration in the configuration file according to the demand

Step 6. test

Start the service after configuration is complete

/ usr/local/apache/bin/apachectl start

Open a browser and enter your own ip address to view

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report