Two virtual FTP-powered Yum sources

Source: Internet
Author: User
Tags yum repolist

The Experiment report realizes the liux of the FTP in the source building

Experimental steps

first, prepare two liunxa and B

A:svr5.tarena.com ip:192.168.4.5 Gateway:192.168.4.254

DNS:192.168.4.5 network card:VMnet1

B:svr6.tarena.com ip:192.168.4.6 Gateway:192.168.4.254

DNS:192.168.4.5 network card:VMnet1

ability to ping the same and all configuration reboots to take effect

Second, all virtual machine Common Configuration table virtual machine Common configuration

1. Close NetworkManager

[Email protected]/]#/etc/init.d/networkmanagerstop

[Email protected]/]# Chkconfig NetworkManager off

2. Turn off the firewall

[Email protected]/]# iptables-f

[Email protected]/]#/etc/init.d/iptables Save

Iptables: Save firewall rules to /etc/sysconfig/iptables: [ OK ]

[[email protected]/]#/etc/init.d/iptables stop

[Email protected]/]# chkconfig iptables off

3. Turn off Selinux

[[email protected]/]# Getenforce// view Selinux status

Enforcing

[[email protected]/]# Setenforce 0// current off Selinux

[[email protected]/]# Getenforce// See If Selinux is turned off Permissive is not enabled

Permissive

permanently closed Selinux

[[email protected]/] Vim/etc/selinux/config

......

......

Selinux=permissive

Third, make the logical volume

1 . Create a new 20G partition on SVR5

[Email protected]/]# FDISK/DEV/SDA

[Email protected]/]# partx-a/DEV/SDA

[Email protected]/]# ls/dev/sda*

.../dev/sda6

[[email protected]/]# PVCREATE/DEV/SDA6// format Physical volume

[[email protected]/]# vgcreate-s 1M myvg/dev/sda6// Create Volume Group and set PE unit 1M

[[email protected]/]# lvcreate-l 15g-n mylv myvg// Create A logical volume of 15G size

[[email protected]/]# MKFS.EXT4/DEV/MYVG/MYLV// format logical volume to use:

2, Mount CD-ROM installation vsftpd

[Email protected]/]# mount/dev/cdrom/mnt/

[Email protected]/]# cd/mnt/packages/

[[email protected] packages]# ls *vsftpd*

vsftpd-2.2.2-11.el6_4.1.x86_64.rpm

[Email protected] packages]# rpm-ivhvsftpd-2.2.2-11.el6_4.1.x86_64.rpm

[Email protected] packages]# ls-ld/var/ftp/

Drwxr-xr-x. 3 root root 4096 month 16:14/var/ftp/

[[email protected]/]#/etc/init.d/vsftpd start

[Email protected]/]# mount/dev/myvg/mylv/var/ftp/

[[email protected]/]# grep myvg/etc/fstab

/dev/myvg/mylv/var/ftp EXT4 Defaults 0 0

[Email protected]/]# Mkdir/var/ftp/rhel6dvd

[Email protected]/]# cp-r/mnt/*/var/ftp/rhel6dvd/

Iv. Configuring the network Yum

[Email protected]/]# cd/etc/yum.repos.d/

[[email protected] yum.repos.d]# ls

Rhel-source.repo

[Email protected] yum.repos.d]# Cprhel-source.repo Rhel6.repo

[Email protected]/]# Cat/etc/yum.repos.d/rhel6.repo

[Rhel-6]

name=red Hat Enterprise Linux 6

Baseurl=ftp://192.168.4.5/rhel6dvd

Enabled=1

Gpgcheck=1

Gpgkey=file:///etc/pki/rpm-gpg/rpm-gpg-key-redhat-release

[email protected]/]# Yum repolist

V. configuring Yum on the client SVR6

[Email protected]/]# [email protected]:/etc/yum.repos.d/rhel6.repo/etc/yum.repos.d/

[email protected]/]# Yum repolist


This article is from the "I Love Linux" blog, please be sure to keep this source http://3234726.blog.51cto.com/3224726/1588907

Two virtual FTP-powered Yum sources

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.