Software management under linux

1. Use known network installation source to install software

cd   /etc/yum/repos.d/                                    Enter the default directory   
vim  /etc/yum/repos.d/yum.repo                    Under directory xx.repo The filename must be.repo End

[rhel 7.2]                                                          Warehouse name    
naem=rhel7.2 source                                    Description of software source
baseurl= network installation source
gpgcheck=0                                                   No detection gpgcheak
enable=1                                                        This installation source statement block is in effect

yum clean all                                                   Clear the original yum information
yum  repolist                                                    List warehouse information

2. Configure local yum source

 2.1 Obtain a system image consistent with the native system
 2.2 Mounted mirroring
mount /xxx/xxxx.iso    /rhel7.2
 3.Set permanent mount
vim /etc/rc.d/rc.local
mount /xxx/xxxx.iso    /rhel7.2
chmod    755 /etc/rc.d/rc.local        This script will be executed automatically when the system is powered on
 4.Set the installation source of the system
mkdir /etc/yum.repos.d/backup        Create a new directory backup hold yum The file under is saved in backup lower
mv /etc/yum.repos.d/*   /etc/yum.repos.d/backup

vim /etc/yum.repos.d/yum.repo
yum clean all
yum install httpd -y 


3. Deployment of shared yumy source

1.In a local area yum Installed on the source's host httpd
yum  install httpd
2.configure network yum source
systemctl start httpd
systemctl stop firewalld
systemctl enable httpd
systemctl disable firewalld

mkdir /var/www/html/rhel7.2
mount /xxx/xxxx.iso/ /var/www/html/rhel7.2
vim /etc/rc.d/rc.local
mount /xxx/xxxx.iso/ /var/www/html/rhel7.2

//Enter address in browser
http://ip/rhel7.2 < < this is the network yum source address


4.yum command

1.yum The command must be used at yum Only after the source is successfully built can it operate normally
2.yum Detailed usage of commands

yum clean all            ##Clear the original yum cache
repolist                      ##List warehouse information
install  software        ##Installation software
list     software           ##View software
list     all                      ##View all software
list     installed            ##View installed software
list     available           ##List installable software
reinstall software       ##Reinstall software
remove    software    ##uninstall
info       software       ##View software information
search      software    ##Find software based on software information
whatprovides  file    ##Find out the software containing this file according to the file
groups list                       ##List software groups
group    info                    ##View software group information
groups    install sfgroup ##Install software group
groups    remove sfgroup  ##Uninstall software group

5. Shielding of Yum software

yum all list lists all the software
But sometimes it's necessary to block irrelevant editing

vim   /etc/yum.conf           

exclude = ***** ා񖓿ාා

Experiment: shielding 32-bit software and zsh.x86-64

6. Use rpm command to process software

rpm - i installation
- v display process
- h hash encryption
- e uninstall
- p package
- ql view the installation file path of the package in the system
- qlp view the path of the file generated by the uninstalled package in the system after installation
- qf find out which installation package this file belongs to according to a file
- qc view the profile name of the software
- qd view help files for the software
-- scriptps viewing scripts
-- nodeps installation software ignores software dependency
-- force software installation
- Kv detects if the package has been changed





Tags: yum vim network RPM

Posted on Fri, 10 Jan 2020 07:23:02 -0800 by Arenium