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 8

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

# installation of software packages:

-rpm

-yum

# rpm package installation

-preparation: download iso image

-Mount the device to a directory: mount xxx.iso / mnt/

-enter the Packages package to execute the command:

Rpm-ivh xxx.rpm # installation software, iinstall, display process

Rpm-qp xxx.rpm # find out the name of the rpm package after it is installed on the system

Rpm-e xxx # remove software

Query:

Rpm-ql xxx.rpm # query which files are generated by the software

Rpm-qc xxx.rpm # query software generated configuration file

Rpm-qa # query the installed software packages

Rpm-qa | grep http # query whether the software related to http is installed

Rpm-qf / bin/ls # check which software package / bin/ls is generated by

-disadvantages: you must change to the directory where the package is located; dependencies need to find their own installation.

# yum installation

-premise

Iso Mirror

Need your software package repository

# # Building a local yum repository

1. Mount the iso image to a local directory:

Mount xxx.iso / mnt/

# you can access the contents of the iso image in the / mnt directory

two。 Tell the yum warehouse where your software is located:

# change to the directory where the yum warehouse configuration file is located

Cd / etc/yum.repos.d/

# Delete the default configuration file when installing the system

Rm-fr *

# Editing your own configuration file

Vim westos.repo # must end with .repo, any before it

`

[rhel7] # Warehouse name

Name=rhel7 # Warehouse description

Baseurl= file:///mnt # warehouse address, file:// is the protocol, / mnt is the local location

Gpgcheck=0 # does not detect key

Enabled=1 # 1, warehouse takes effect; 0, no effect

`

3. Clear the cache:

# by default, you will go to / var/cache/yum to find software information. Be sure to clear the cache after changing the configuration.

Yum clean all

4. Detection

-method 1:

# list the software packages contained in all software repositories

Yum repolist

-method 2:

# install any software at will

Yum install lftp-y

1111111111111111111111111111111111111111111111111111111111111111111111111111111111111111

# # Building Network yum Warehouse

* * desktop host

1. Preparation: make local files accessible to other hosts (httpd)

# generally speaking, hosts with httpd software installed are called Web servers, and files can be shared with other hosts

Yum install httpd-y

Systemctl start httpd

Systemctl enabled httpd

Systemctl stop firewalld

Systemctl disable firewalld

two。 Make the contents of the iso image accessible to other hosts:

# / var/www/html, which is the default release directory for http and accessed by http://ip/rhel7

Mkdir / var/www/html/rhel7

# iso is mounted to the default release directory of http

Mount xxx.iso / var/www/html/rhel7

3. Modify the configuration file of yum repository

# only need to modify baseurl

Vim westos.repo # must end with .repo, any before it

`

[rhel7] # Warehouse name

Name=rhel7 # Warehouse description

Baseurl= http://ip/rhel7 # warehouse address, http:// is the protocol, / rhel7 is the ip host / var/www/html/rhel7 directory

Gpgcheck=0 # does not detect key

Enabled=1 # 1, warehouse takes effect; 0, no effect

`

4. Clear cache and detect

* other hosts (want to use the yum repository built by desktop)

# you only need to modify the configuration file of the yum repository, as in step 3 of desktop

# # Building Network third-Party Software Warehouse

-understand what is third-party software?

The iso image contains more than 4000 software packages, but some software (eg:wps,smplayer,ntfs) does not

Other software packages downloaded from other places (eg:baidu,www.pkgs.org)

* * desktop host

1. Create a software directory for other hosts to access

Mkdir / var/www/html/software

two。 Put the third-party software in the / var/www/html/software directory

# can be accessed at http://ip/software

Cp xxxx.rpm / var/www/html/software/

3. Generate repodata metadata for the software directory to let the system know that there are software packages in that directory

Createrepo / var/www/html/software/

4. Modify the configuration file of yum repository

Vim westos.repo # must end with .repo, any before it

`

[rhel7] # Warehouse name

Name=rhel7 # Warehouse description

Baseurl= http://ip/rhel7 # warehouse address, http:// is the protocol, / rhel7 is the ip host / var/www/html/rhel7 directory

Gpgcheck=0 # does not detect key

Enabled=1 # 1, warehouse takes effect; 0, no effect

[soft] # Warehouse name

Name=soft # Warehouse description

Baseurl= http://ip/software # warehouse address, http:// is the protocol, / software is the ip host / var/www/html/software directory

Gpgcheck=0 # does not detect key

Enabled=1 # 1, warehouse takes effect; 0, no effect

`

5. Clear cache and detect

* other hosts need to use a third-party software repository:

# you only need to modify the configuration file of the yum repository, as in step 4 of the desktop host

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

Servers

Wechat

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

12
Report