Set up Yum local source in CentOS-5

Source: Internet
Author: User

1. Start the system. I mount it with an ISO image and mount it to/Media/CDROM.
Mkdir/Media/CDROM
Mount-a-t iso9660-o loop/home/user1/CentOS-5.4-i386-bin-DVD.iso/Media/CDROM
2. Install the FTP service ( If the system has been brought, you can easily start the vsftpd service in Desktop Management-server settings-Service)
CD/Media/CDROM/Server
Rpm-IVH vsftpd *
Chkconfig vsftpd on
Service vsftpd start
3. Install the createrepo Software Package
CD/Media/CDROM/centos
Rpm-IVH createrepo *
4. copy the files in the system disk to the local machine.
CP-r/Media/CDROM/Server/var/FTP/pub
CP-r/Media/CDROM/repodata/var/FTP/pub
5. Generate the yum Source
(1) generating dependency
Createrepo-g/var/FTP/pub/repodata/comps. xml/var/FTP/pub/centos/
The successful display is as follows:
2535/2535-blas-3.0-37.el5.i386.rpm
Saving primary metadata
Saving file lists metadata

If the prompt "cocould not remove old metadata dir:. olddata" says there is a directory problem and you don't have to worry about it. Just delete the directory.
Rm-RF/var/FTP/pub/centos/. olddata
Then, repeat the operation.
(2) create a repository file
Vim/etc/yum. Repos. d/yum. Repo
[Yum-FTP]
Name = base
Baseurl = ftp: // yourip/pub/centos/
Enabled = 1
Gpgcheck = 1
Gpgkey = file: // etc/pki/rpm-GPG/RPM-GPG-KEY-CentOS-5

You can directly use Yum to install RPM next time. If other machines need to access this source, copy yum. repo.
Yum install Wireshark
OK

Also, if it is RedHat, or fedora, you have to check the gpgkey = file: // etc/pki/rpm-GPG/RPM-GPG-KEY-CentOS-5 file, you only need to enter the/etc/pki/rpm-GPG/directory to check which file is used. Otherwise, the following error is reported:
Yum install Wireshark
Warning: rpmts_hdrfromfdno: Header V3 DSA Signature: nokey, key ID e8562897
It doesn't matter if you are not at fault. This is because different versions of GPG keys are installed in yum. Solve the problem as described above or
Rpm -- import/etc/pki/rpm-GPG/RPM *
Run Yum install Wireshark again.
OK. The problem is solved. It has been installed.
Yum install Wireshark. Note that Wireshark commands and graphical interfaces cannot be used. However, it provides basic packet capture functions.
Yum install wireshark-gnome. This makes it easy to use.

OK. Wireshark can be started normally on the desktop.

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.