yum localhost_落英缤纷

yum localhost_落英缤纷

#### yum_server ####

cat /etc/sysconfig/network
vi /etc/sysconfig/network
setenforce 0
service iptables stop
chkconfig iptables off
vi /etc/sysconfig/network-scripts/ifcfg-eth0
init 6
yum install wget make vim httpd
yum install createrepo
service httpd start
chkconfig httpd on
ll /var/www/html/
mkdir -p /var/www/html/yum/centos/6.4/x86_64/
ll /var/www/html/
scp -r root@192.168.100.250:/var/ftp/pub/CentOS-6.4-x86_64-bin-DVD1/* /var/www/html/yum/centos/6.4/x86_64/</span>

#### yum_client ####

vi /etc/sysconfig/network
vi /etc/sysconfig/network-scripts/ifcfg-eth0

DEVICE="eth0"
BOOTPROTO="static"
IPADDR=192.168.100.98
NETMASK=255.255.255.0
#GATEWAY=192.168.100.1
#DNS1=202.103.24.68
HWADDR="00:0C:29:46:3B:0B"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"

service network restart
ping www.163.com -c2
yum install wget make vim
cp /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.bak
vi /etc/yum.repos.d/CentOS-Base.repo

# CentOS-Base.repo

#

# The mirror system uses the connecting IP address of the client and the

# update status of each mirror to pick mirrors that are updated to and

# geographically close to the client.  You should use this for CentOS updates

# unless you are manually picking other mirrors.

#

# If the mirrorlist= does not work for you, as a fall back you can try the

# remarked out baseurl= line instead.

#

#

[base]

name=CentOS-$releasever - Base

####mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=os

baseurl=http://192.168.100.248/yum/centos/6.4/x86_64/

enabled=1

gpgcheck=0

####gpgcheck=1

####gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#released updates

[updates]

name=CentOS-$releasever - Updates

####mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=updates

baseurl=http://192.168.100.248/yum/centos/6.4/x86_64/

enabled=1

gpgcheck=0

####gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that may be useful

[extras]

name=CentOS-$releasever - Extras

####mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=extras

baseurl=http://192.168.100.248/yum/centos/6.4/x86_64/

enabled=1

gpgcheck=0

####gpgcheck=1

####gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#additional packages that extend functionality of existing packages

[centosplus]

name=CentOS-$releasever - Plus

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=centosplus

#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

#contrib - packages by Centos Users

[contrib]

name=CentOS-$releasever - Contrib

mirrorlist=http://mirrorlist.centos.org/?release=$releasever&amp;arch=$basearch&amp;repo=contrib

#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/

gpgcheck=1

enabled=0

gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-6

cat /etc/redhat-release
yum install wget make vim
yum update
reboot
cat /etc/redhat-release

落英缤纷 20140213

Print Friendly

发表评论

电子邮件地址不会被公开。 必填项已用*标注