Linux Fifth Week lesson notes (1), RPM software installation, yum source, yum Warehouse

Source: Internet
Author: User
Tags custom name

Week Five Lesson Notes

I. installation of the application software

1. Know the software: |libmp3lame0|-3.99.3-23|. el7|. x86_64|. Rpm

Software name   software version applicable system 64-bit Red hat applicable software

2. How to install the software

1.rpm

RPM-VIH name.rpm Install,-V: Display procedure,-H: Specifies encryption as hash encryption

- e name Uninstall

- Q name querying software generation files

-QLP name.rpm what files will be generated after the software is queried for installation

-qa Install all software names in the query system

-QA |grep name Query Whether the software is installed

- Q name Ibid .

-QP name.rpm Query the name of the software after installation

-QF filename to view the installation package that filename belongs to

-IVH name.rpm--force Force Installation

-qi name View software Information

-kv name.rpm detects if the package has been tampered with

-QP name.rpm--scripts a script file that detects software execution during installation or uninstallation



Problems encountered in the course of the experiment


1. Applications that are copied from other computers cannot be opened on this computer, prompting for insufficient permissions.

Workaround: Under Superuser, give the directory of the application to a 777 permissions, so you can open it.


2. The landlord in the real machine to do experiments, first put the real machine on the Firefox browser to delete, and then use RPM-VIH filename.rpm format installation appeared error

650) this.width=650; "Src=" Http://s5.51cto.com/wyfs02/M00/89/44/wKioL1gOJSrBTkpaAAFPktrCPVc992.png-wh_500x0-wm_3 -wmp_4-s_1992618860.png "title=" 2016-10-24 19_18_42 screenshot. png "alt=" wkiol1gojsrbtkpaaafpktrcpvc992.png-wh_50 "/>

Next, we'll introduce our second-step experiment to configure the native Yum source


two . Build "server source" for the local Yum source

1. First we need to find the image file of our system there. If not, you can download the system's ISO file from the Internet.

2. Attach the ISO file to a directory on this machine, where I choose to hang it in:/mnt directory

3. Configure the native Yum source to point to

A. Deleting a file

rm-fr/etc/yum.repos.d/*

B. Modify the configuration file.

Vim/etc/yum.repos.d/yum.repo (Note: This file name is custom, but the suffix must be. Repo)


After entering the document, write the following:

[Server]

Name= Custom Name

BASEURL=FILE:///MNT (i mounted the file in/mnt so three "/" stressed: there is no write wrong \_/)

Gpgcheck=0 (Gpgcheck is the way Red Hat system recognizes authorized applications, parameter 1 indicates detection, 0 means no detection, installation of third-party software is set to 0, otherwise it cannot be installed)

Last Saved exit : Wq

4. Empty the Yum cache: Yum Clean all

5. Detect the installation of a third-party software, the dependency problem is resolved, indicating the success of the experiment


three . Set up the resource sharing service

1. Installing Resource sharing services

Yum Install httpd

Systemctl Stop Firewalld

Systemctl Disable FIREWALLD

Systemctl Start httpd

Systemctl Enable httpd

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/89/47/wKiom1gOJczy_4w4AAKlAn2lzlc346.png-wh_500x0-wm_3 -wmp_4-s_1374752111.png "style=" Float:none; "title=" 2016-10-24 20_35_24 screenshot. png "alt=" Wkiom1gojczy_ 4w4aaklan2lzlc346.png-wh_50 "/>

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M01/89/44/wKioL1gOJczQmYJZAAHtqH0Ea8c950.png-wh_500x0-wm_3 -wmp_4-s_2076057797.png "style=" Float:none; "title=" 2016-10-24 20_35_57 screenshot. png "alt=" Wkiol1gojczqmyjzaahtqh0ea8c950.png-wh_50 "/>



2. Create a shared directory and mount it on the image file to the shared directory

Mkdir/var/www/html/iso (the catalogue hangs under Apache)

UMOUNT/MNT will mount the image file mounted under NMT Uninstall

mount/iso/rhel-server-7.0-x86_64-dvd.iso/var/www/html/iso/

The image file is marked with an absolute path, and the image file is mounted to the/var/www/html/iso/directory

3. Testing

Enter in the browser:/HTTP//native Ip/iso

If the experiment succeeds, you can see the contents of the image file.

You can also use other virtual machines to access the native IP to Verify that the experiment was successful

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/89/44/wKioL1gOJgPx3n2iAAFxYjvbIEU040.png-wh_500x0-wm_3 -wmp_4-s_1453352588.png "title=" 2016-10-24 21_11_44 screenshot. png "alt=" wkiol1gojgpx3n2iaafxyjvbieu040.png-wh_50 "/>

accessing shared files under a virtual machine

650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/89/44/wKioL1gOJknwCKOtAAgP9DIXVUA151.png-wh_500x0-wm_3 -wmp_4-s_2373016848.png "title=" 2016-10-24 21_19_54 screenshot. png "alt=" wkiol1gojknwckotaagp9dixvua151.png-wh_50 "/>

4. Modify the local Yum source to point to

Vim/etc/yum.repos.d/yum.repo

[Server]

name=redhat7.0

Baseurl=file://var/www/html/iso

Gpgcheck=0

: Wq

four . Boot automatically mount ISO

1. Open the configuration file

Vim/etc/rc.d/rc.local

At the end of the file add:

mount/mnt/rhel-server-7.0-x86_64-dvd.iso/var/www/html/iso/

: Wq

2. Add an Execute permission to the file

chmod +x/etc/rc.d/rc.local

Last reboot!

Re-detects if the shared service is working properly after booting

Finally the experiment was successful!

Precautions:

1.vim/etc/rc.d/rc.local

This configuration file must be handled with care, this script file is started automatically

2. When adding image files, it is best to write absolute paths, which will prevent the system from locating the system image files accurately.

3. Be sure to give /etc/rc.d/rc.local this file a permission to execute, or the script file will not work

4. Perform the above actions under Superuser status

Above operation by oneself experiment, guarantee real effective!!!!


Linux Fifth Week lesson notes (1), RPM software installation, yum source, yum Warehouse

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.