Slackware Linux Technology Insider package management mechanism

Source: Internet
Author: User

Solemnly declare: This article from the writing idea to the chapter arrangement all by myself completes, did not refer to any net text, the book, the magazine. There is no infringement. If the content of the text is a reference to the Web, I have made a clear mark.

Introduction: Package management mechanisms are important, even essential, differences between Slackware and other Linux distributions. Slackware's package management mechanism is simple, flexible, efficient, safe, user transparent, and can be customized to a high degree. Because Slackware's standard package management tools are shell scripts, you can modify and transplant them simply and easily. However, there are some deficiencies, such as the lack of flexible network installation mode. This paper introduces the package management of Slackware in a comprehensive and detailed way.

The first part Slackware standard package management

First, Introduction

The package management mechanism is an important, even essential, difference between Slackware and other Linux distributions. Slackware's package management mechanism is simple, flexible, efficient, safe, user transparent, and can be customized to a high degree. Because Slackware's standard package management tools are shell scripts, you can modify and transplant them simply and easily. However, there are some deficiencies, such as the lack of flexible network installation mode. This paper introduces the package management of Slackware in a comprehensive and detailed way.

II. Basic Structure

The files and directories used:

/BIN/INSTALLPKG: for installing Slackware packs

/SBIN/REMOVEPG: for removing Slackware packages

/sbin/explodepkg: for unpacking Slackware Packs

/SBIN/UPGRADEPKG: for updating Slackware packages

/sbin/makepkg: Used for making slackware bag

/sbin/pkgtool: For installation | removal | View Slackware Package

/bin/tar-1.13: For installation, decompression, etc.

/bin/dialog: Used to generate a text-based graphical interface

Shell scripts used under the Install-packages:slackware CD

Tagfile: Used to describe the installation priority level of packages

/var/log/packages: Save the basic information of the installed Slackware package

/var/log/scripts: Save installation scripts for installed Slackware packages

/var/log/removed_packages: Save the basic information of the deleted Slackware package

/var/log/removed_scripts: Save the installed script for the deleted Slackware package

III. instructions for the use of the command

1.EXPLODEPKG---Decompression

It is mainly used for the maintenance of the Slackware tgz package, just a simple decompression. tgz package does not run the installation script under the install or/var/log/setup directory under the decompression directory. Explodepkg Decompression tgz package, and then through the file to modify, upgrade, and finally use the MAKEPKG system to do Slackware available tgz package. Explodepkg can also be decompressed on multiple tgz packages, in the following format:

#explodepkg package1.tgz package2.tgz ...

Hint: explodepkg is actually using tar for decompression, running explodepkg and running tar xzvf package1.tgz effect is exactly the same!

Warning: The tar version used by EXPLODEPKG (virtually all of those tools including INSTALLPKG|REMOVEPKG, etc.) is not >1.13 (by default 1.13), otherwise it is unstable. Check the/bin directory and find both tar-1.13 and tar-1.14 inside.

2.INSTALLPKG---Installation

Using Slackware, you can't avoid using it. INSTALLPKG provides a wide range of parameters, making the package simple, flexible, safe and quick to install. The following is a brief introduction to common parameters:

-warn: It is strongly recommended that you show which packages will be installed on standard output and which packages will be overwritten.

-root: Customize the installation directory instead of the default directory. You may not have to use this when making a LiveCD.

-menu: Use this item to jump out of a text graphic so you can choose to install/not install/exit. Commonly used in other programs to invoke Installpkg installation, of course, you like the graphical interface, you can try.

-tagfile: Specifies the Tagfile file used for installation that describes the installation properties of the package (auto | recommend | optional | ignore).

Other parameters please man installpkg.

Use instance:

#installpkg package.tgz
#installpkg -warn package.tgz
#installpkg -warn -install package.tgz
#installpkg -menu -root /usr/local package1.tgz package2.tgz
#installpkg -menu -root /usr/local -tagfile/b]./tagfile package1.tgz package2.tgz

3.removepkg--Delete

REMOVEPKG offers a variety of formats that you can use to easily remove an installed Slackware package, and the removal process will fully show which packages have been deleted. You can specify the full name of the package, the base name, for example: A package named Test-1.0-i386-1.tgz has been installed, and can be deleted in the following format:

#removepkg test-1.0-i386-1.tgz
#removepkg test-1.0-i386-1
#removepkg test.tgz
#removepkg test

Tips:

You can find out which Slackware packages you have installed by looking at/var/log/packages.

A removepkg dependency check is performed before the deletion (this is why you will be able to see the output of deleting after a period of time running the command) and delete only those packages that do not have dependencies. Visible its security!

Removepkg The package is removed, the corresponding item under/var/log/packages is moved to/var/log/removed_packages. and move the installation script from/var/log/scripts to/var/log/removed_ Packages

Removepkg also offers some optional parameters, please man removepkg.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.