Install the RPM package in the off-network state

Experimental platform: CentOS7

Experimental analysis: The source rpm package in the Linux system is stored in the official yum warehouse, usually We can call the rpm package in the yum warehouse at will when we are connected to the Internet, but in the disconnected state, all of this is obviously impossible to achieve. If we need to install the rpm package, we can only build a temporary yum repository by ourselves, and this depends on the installation image of the Linux operating system. Obviously, there are a large number of rpm packages stored in the installation image, but compared to the yum warehouse in the network, the rpm package in the image cannot be upgraded at any time, updated version, etc.

Overview of the rpm package

The rpm package is one of the most widely used software packages in various Linux distributions. The rpm package is characterized by its powerful functions and Extensive compatibility is supported by most Linux distributions and supported by the majority of Linux users. The rpm package manager establishes a unified file database to record in detail the various rpm software packages installed, uninstalled, and upgraded in the Linux system, and can automatically analyze the dependencies between the software packages to keep the applications in a coordinated manner. , Run in an orderly overall environment.

Experimental process

First, disconnect the CentOS7 network, set the network card to host-only mode, click OK

Install the rpm package in a disconnected state

The network card mode is only the host mode, we need to reconfigure Network card, add ip address, subnet mask, gateway, etc. In the Linux terminal, enter the command to enter the network card configuration

install the rpm package in a disconnected state

The original interface you entered for the first time

Install the rpm package in a disconnected state

The interface after the change

Install the rpm package in a disconnected state

After the configuration is complete, enter wq in the last line mode to save and exit. After the configuration file is changed here, the service must be restarted to take effect.

Install the rpm package in a disconnected state

Enter the ifconfig command to see if the configuration is successful

Install the rpm package in the disconnected state

This is an error when trying to load yum list. The reason is that the network is already disconnected and the client cannot access the official yum warehouse

Install the rpm package when the network is off

The configuration is complete, we go to the next step , Relying on the system image file to create a yum warehouse to install the rpm package.

Install the rpm package in a disconnected state

Use df -h command to see if the CD image has been mounted

Install the rpm package in a disconnected state

Still in the CD-ROM, not mounted on it

We need to mount the CD-ROM drive, so that to use the files in the CD-ROM drive, just open the directory where the CD-ROM drive is mounted. Can. First find out an empty directory as the mount point. The /mnt directory is an empty directory, which can be viewed through ls. The mount command is mount

install the rpm package in a disconnected state

Use df -h to check whether the mounting is successful

Install the rpm package in a disconnected state

After completion, we proceed to the next step. When the system is installed, the yum source is concentrated in one place. After the network is disconnected, these software packages cannot be used. We move the software package to an empty folder and use the software package in the CD

 Install the rpm package in the disconnected state

Create a private yum warehouse

Install the rpm package when the network is off

When the network is off Install the rpm package

After the configuration is complete, you can use the yum repository, here use yum to install the httpd service

Install the rpm package when the network is off

 Install the rpm package in the disconnected state

Visit the website via ip address

< img alt="Install the rpm package when the network is off" src="/wp-content/uploads/images/os/linux/1626797219384.png" >

Access is successful

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5146 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.