linux basic learning [9]
Keywords:
Linux
yum
RPM
vim
RHEL
Software management
1. yum: The most important function of the upper software management tool is to solve software dependency.
The prerequisite for yum to be operational is that it must have a yum source and configure the source-to-file
1. Getting ISO Mirror Files Matching the System
rhel-server-7.0-x86_64-dvd.iso
2. Mount the mirror file into the directory for easy access
Mount rhel-server-7.0-x86_64-dvd.iso/mnt

3. Configuration book and source pointing of yum
rm -rf /etc/yum.repos.d/* ##Delete the original software repository configuration file
vim /etc/yum.repos.d/yum.repo ##Edit the pointing file of yum source
[Server]
name = rhel7.0 ##Named rhel7.0
baseurl = file://Mount point of / mnt # # image
gpgcheck = 0 ##Represents not monitoring the logo of the gpgkey gpkey representational software
enable = 1 ##Enabling the software repository
4. Testing and installing software
yum clean all ##Clear yum cache
yum install httpd -y ##Install httpd
II. Installation of Resource Sharing Services
Apache(web server) apache: 80 ssh:22
httpd is the main program of Apache Hypertext Transfer Protocol (HTTP) server
Server side:
vim /var/www/html/index.html ##Edit the default access page
welcome to linux ##Adding content
systemctl start httpd ##Open Services
systemctl stop firewalld ##Close the firewall
Client:
Using browser to access server ip and display default pages
3. Building Shared yum Source
1. Mount the image on the physical machine shared directory
mkdir /var/www/html/rhel7.0
mount rhel-server-7.0-x86_64-dvd.iso /var/www/html/rhel7.0

2. Close the firewall
systemctl stop firewalld ##Close the firewall
systemctl disable firewalld ##Set up boot-up not to start
systemctl start httpd ##Open the httpd service
systemctl enable httpd ##Set up boot start

3. Modify the source pointing of yum on the virtual machine
rm -rf /etc/yum.repos/* ##Delete the original configuration file
vim /etc/yum.repos.d/yum.repo ##Edit the pointing file of yum source
[Server] ##Fixed format
name = rhel7.0
baseurl = http://ip/rhel7.0 # points to the yum source for the corresponding ip mount
gpgcheck = 0 ##Represents not monitoring the logo of the gpgkey gpkey representational software
enable = 1 ##Enabling the software repository

4. Testing
Software Installation Testing under Virtual Machine and Physical and Pingable Conditions
Yum install software warename-y # install software
Installation test

Successful installation

IV. Start-up and auto-mount iso
vim /etc/rc.d/rc.local ##Editing configuration files
mount /root/Desktop/rhel-server-7.0-x86_64-dvd.iso /var/www/html/rhel7.0 ##Add mount commands
chmod +x /etc/rc.d/rc.local ##Added Execution Permissions to Files
Edit configuration files and increase execution privileges

Add boot-up automatic mounting

V. yum command
yum install softwarename -y ##Installation software
yum repolist ##List yum source information
yum remove softwarename ##Unloading software
yum list all ##List the names of all software
yum list softwarename ##Check if the software is in the software source
yum list installd softwarename ##Check to see if the software has been installed
yum list available ##List software names that can be installed with yum
yum clean all ##Clear the yum cache
yum search softwareinfo ##Search for software names based on software information
yum whatprovides filename ##Find the package containing the filename file in the yum source
yum update history ##View System Software Change History
yum reinstall softwarename ##Re-install the software
Unloading software

Successful unloading

List the software names available for yum installation

6. Installation of Software by rpm
rpm
rpm -ivh name.rpm ##Installation Software - v: Display Procedure - h: Specify the Encryption Procedure as hash
rpm -e name ##Unloading software
rpm -ql name ##View the files generated by the software
rpm -qlp name ##Query the files that will be generated after the software is installed
rpm -qa ##Query all software installed in the system
rpm -pq name.rpm ##Query the name of the package installed
rpm -pq name.rpm --scripts ##Query for actions during installation or uninstallation
rpm -ivh name.rpm --force ##Mandatory installation but dependencies cannot be ignored
rpm -ivh name.rpm --nodeps --force ##Forced installation ignores dependencies
rpm -qi name ##View software information
List all installed software

VII. Construction of Third Party Sources
Place the rpm file in a directory that can only exist. rpm files
Createrepo-v/rpm Deposit Directory ## Create Deposit File Directory
vim /etc/yum/repos.d/repo # edit native source
[Software]
name = software
Baseurl = file://software## storage directory
Posted by coellen on Fri, 25 Jan 2019 13:54:14 -0800