APT User Guide

xiaoxiao2021-03-06  65

First, foreword 1.1 What is an APT new operating system installed, installing new software is an essential work. However, in Linux, install applications and Windows are somewhat different. For Linux beginners, installing software is a very distressed thing. Since many Linux applications are released in the form of source code, they require users to configure them according to their own system's actual situation and their own needs, to compile the source program to use these software. Linux traditional installation Linux is often too complex and difficult for most Linux beginners. In order to reduce the complexity of software installation, Redhat launched a famous package management tool in the self-existing release: RPM (Redhat packet manager), although rpm puts the redhat flag, but its original design concept is open-style It is now consistent with the distribution version of Linux, SUSE, and Turbo Linux, etc., which can be considered a recognized industry standard. Although the software management function provided by RPM makes software installation and deletion height automation, it simplifies the difficulty of software installation and management in the Linux environment. However, the software package dependence issues that RPM to maintain system consistency requires administrators to resolve. Administrators may be very cumbersome when installing and uninstalling programs. For example, when a software A will find that the software rely on another software B, which requires download B, and found B-dependent and C, which has repeatedly dependent nested problems. The administrator has to download it, then install it. The software management system released by DEBIAN invented the APT (Advanced Software Package Tool, Advanced Package Tool), more convenient and easy to use in system software installation and maintenance. APT automatically downloads the appropriate package while discovering software package dependencies and installs. APT enables administrators to perform system software upgrades without fault. Many times, when the user's software installation is adversely affected by other methods, an improvement in the APT will keep everything correct. APT makes zero shutdown time to become a reality. Although APT is a Debian-based package management tool, a good news is based on APT has been ported to RPM-based systems based on a Brazilian CONECTIVA. Seeing Anle 1.2 APT and other software management tools in RPM-based Linux platform, there are many other packages management tools such as autorpm, rpmfind, up2date / rhun, urpmi / rpmdrake / mandrake update, and more. These tools are compared below. 1. Dependency findings are only valid in some cases. 2. Generally speaking, all tools require a special software package index file on the server. This file contains software package information. But they are general files, can be downloaded from other mirror icon servers. 3. Package verification is used to verify the correctness of the downloaded package; the mirror icon server verifies that the content of the verification mirror server and the official server are consistent. 4. These features are unique to the ATP-RPM, while the Debian's APT does not have these characteristics. 5. The reason why the upgrade is displayed when upgrading the package. Such administrators can understand that the upgrade package is due to security reasons or functional upgrades from the above table, you can see ATP and other tools have a better functional advantage. Therefore, for a platform based on RPM packages, such as Redhat, TurboLinux, SUSE, MANDRAKE, etc., APT is a very excellent software management tool. 1.3 Installing the APT Download the RPM package for Red Hat7.3 from rpmfind.net, then install: [root @ www src] # rpm -ivh APT-0.5.4cnc9-fr0.1.r73.i386.rpm You can complete the installation of the APT tool on the RedHat7.3 platform.

Second, the main configuration file 1, / etc / apt / sources.list This is the most important configuration file of the APT, which records information such as the address of the software warehouse server. There are all versions of the software warehouse path information for all versions from REDHAT 6.2 to 8.0. Here we only need to open the path information corresponding to the 7.3 version, and the other version of the path information can be turned off. # Red Hat Linux 7.3 rpm http://apt.freshrpms.net/ redhat / 7.3 / EN / I386 OS Updates Freshrpms RPM-SRC http://apt.freshrpms.net/RHAT / 7.3 / EN / I386 OS Updates Freshrpms 2 Others have other following profiles Apt.conf rpmpriorities Vendors.List, using the default configuration, can refer to the Man documentation using the default configuration. Third, after using the APT before installing the APT software package, the first job that the administrator needs to do is to run: [root @ www src] # APT-GET Update Download the package database from the default server. Run: [root @ www src] # APT-GET CHECK ATP to verify the integrity and consistency of the local system, and determine whether the software package dependence of the local system is consistent. Note: If the local system consistency is seriously damaged, you can use the APT-GET -F Install command to manually repair the destroyed dependence before using the APT. If you want to upgrade your system, ensure that the system is instantly upgrade, make up for security vulnerabilities, just need APT-GET UPDATE and APT-GET DIST-UPGRADE or APT-GET UPGRADE. 4. The main command APT mainly has four commands such as Apt-Cache Apt-CDROM Apt-Config Apt-Get. The maximum number of users should use is the apt-get command. Detailed description of these commands See the Man Manual, which is only described here. 4.1 APT-GET 1.Apt-Get Update Updates the local database of local APT-GET to synchronize with the server's pkglist file. It is generally implemented in the upgrade before the implementation of this command is consistent with the server. 2.Apt-get Check Verifies the integrity of the local system. 3.Apt-get dist-upgrade is similar to the APT-GET, but all basic packages will be installed, and try to upgrade all packages and install new packages in need. 4.Apt-get install package_name Installing a package and its related software package If the APT-GET Install OpenSSh will also install OpenSSH, it will upgrade the openssl 5.Apt-get remove package_name to delete the package, while deleting it Software package 6.Apt-get source package_name Source RPM Example: Apt-Get Source --Compile ENCON Clever Source RPM and compiles the binary RPM. --Compile parameter function is equivalent to rpm -ba 7.Apt-get clean to remove the downloaded package 8.Apt-get upgrade package_name Upgrade the specified package for the downloaded package 8.Apt-Get Upgrade package_name And upgrade their dependencies.

4.2 APT-CDROM After installing the system, you can use the APT-CDROM to add three installation CDs to the Sources.list as follows: # APT-CDROM Add Using CD-ROM MOUNT POINT / MNT / CDROM / Unmounting CD -ROM Please insert a Disc in the drive and press enter Mounting CD-ROM Identifying .. [af0e7c988f7ae057a4a3bccc8008134d-2] Scanning Disc for index files .. Found 1 package indexes and 0 source indexes. Please provide a name for this Disc, such as 'MyDistro 6.0 Disk 1': Gaga V1.1 DISC1 THIS DIS CALED: 'Gaga V1.1 Disc1' Reading Indexes ... DONE WRITING New Source List Source List Entries for this Disc are: RPM CDROM: [Gaga V1.1 DISC1] / Redhat Gaga REPEAT this process for the rest of the cds in your set. Talk three times to load three installation discs. The following should be included in the /etc/apt/sources.list: rpm CDROM: [Gaga V1.1 Disc3] / Redhat Gaga RPM CDROM: [GAGA V1.1 Disc2] / Redhat Gaga RPM CDROM: [Gaga V1. 1 disc1] / redhat Gaga, you can use the APT-GET to install the software on the installed disc installation disc. Examples are as follows, if your server is not connected to an internet connection, modify /etc/apt/sources.list to include the following three lines: RPM CDROM: [Gaga V1.1 Disc3] / Redhat Gaga RPM CDROM: [Gaga V1. 1 disc2] / redhat gaga rpm CDROM: [Gaga v1.1] / redhat gaga # apt-get update # APT-GET Install IMAP can be put into the second disc according to the indication, without knowing the package Which disc of which CD is looking for. 4.3 APT-CACHE 1.APT-Cache ShowPkg Display Some General Information Examples of Packages: APT-Cache ShowPkg OpenSsh 2.Apt-Cache Stats Display Related Statistics Display Related Statistics 3.Apt-Cache Dump Display Cache Brief Description of Each package of packages 4.Apt-cache UNMET Displays the dependency that does not meet the consistency 5.Apt-cache show Displays the record information of the specified package.

转载请注明原文地址:https://www.9cbs.com/read-110297.html

New Post(0)