Using APT Online Update System in Redhat Environment

xiaoxiao2021-03-06  61

Using APT Online Update System in Redhat Environment

Software Environment: Redhat 7.3 Article Related Software: APT-0.5.4cnc9-fr0.1.rh73ftp://rpmfind.net/linux/freshrpms/Valhalla/APT/APT-0.5.4cnc9-fr0.1.rh73.i386.rpm

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. See Anle

1.2 APT and other Software Management Tools Comparison On 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.

Dependency findings are only valid in some cases. 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. Package verification is used to verify the correctness of the downloaded package; the mirror server verifies whether the content verify that the contents of the mirror server and the official server are consistent. These features are unique to the ATP-RPM, while the Debian's APT does not have these features. The reason why the upgrade is displayed when the package is upgraded. Such administrators can understand the upgrade package is due to security reasons or functional upgrades. From the above table, you can see that 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 profile 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.3rpm http://apt.freshrpms.net redhat / 7.3 / EN / I386 OS Updates FreshrPMSRPM-SRC http://apt.freshrpms.net redhat / 7.3 / EN / I386 OS Updates Freshrpms

2. Others in / etc / apt directory, there are other following 诶 profiles Apt.conf rpmpriorities vendors.list, using the default configuration, and the specific meaning can refer to the Man document.

Third, prepare before using the APT

After installing the APT 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, 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.

Fourth, the main order

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

Update 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

Verify the integrity of the local system.

3.Apt-get dist-upgrade

Similar to the APT-GET, but will install all the basic packages 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 packages such as APT-GET Install OpenSSh will not only install OpenSSH, but will upgrade OpenSSL

5.Apt-get remove package_name

Delete the package while deleting a package dependent on it

6.Apt-get source package_name

Download Source RPM Examples of Package: Apt-Get Source --Compile ENCON Caught Source RPM and compiles binary RPM. --Compile parameter function is equivalent to rpm -ba

7.Apt-get clean

Delete the downloaded package saved in the cache directory (/ var / cache / APT / archives)

8.Apt-get upgrade package_name

Upgrade the specified package and upgrade its dependencies. 4.2 APT-CDROM

After installing the system, you can use the APT-CDROM to add three installation discs to the Sources.list of the APT.

Usage is as follows:

# Apt-cdrom addUsing CD-ROM mount point / mnt / cdrom / Unmounting CD-ROMPlease insert a Disc in the drive and press enterMounting CD-ROMIdentifying .. [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 disc1This Disc is called:' Gaga V1.1 disc1'Reading Indexes ... DoneWriting new source listSource List entries for this DISC Are: RPM CDROM: [Gaga V1.1 Disc1] / Redhat Gagarepeat this process for the rest of the cds in your set.

Run the Apt-CDROM Add command 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 Gagarpm CDROM: [Gaga V1.1 Disc2] / Redhat Gagarpm CDROM: [Gaga V1.1 Disc1] / Redhat Gaga

This will 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 gagarpm CDROM: [Gaga v1.1 disc2] / redhat gagarpm cdrom: [gaga v1.1 disc1] / redhat gaga # apt-get update # APT-GET Install IMAP

Then put it into the second disc according to the instructions, without knowing the software package on which of the disc is found, looking for the trouble of right.

4.3 APT-CACHE

1.Apt-cache showpkg display some general information example of the package: Apt-Cache Showpkg OpenSSH

2.Apt-cache stats Display the relevant statistics display related statistics

3.Apt-cache dump display summary of each package in the cache

4.Apt-cache unmet Displays dependencies that do not meet the consistency

5.Apt-cache show Displays the record information of the specified package. Similar to rpm -qi

6.Apt-Cache Search Find Package, Similar to RPM -QA | GREP PACKAGE_NAME Example: APT-Cache Search OpenSSH

7.Apt-cache depends display the dependence of the package

8.apt-cache pkgnames list all packages Example: $ apt-cache pkgnames openssopenssh-askpassopenssl096openssl-perlopenssl095aopenssl-pythonopenssh-clientsopenssl-developenssh-askpass-gnomeopensshopensslopenssh-server4.4 apt-config

1.apt-config dump Displays the current configuration information.

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

New Post(0)