本地yum源制作

来源:互联网 发布:佛山房产网签数据 编辑:程序博客网 时间:2024/05/21 01:48



#mkdir /yum

#mount -o loop /dev/cdrom  /yum  

#vi /etc/rc.d/rc.local    -----开机自动挂载

mount -o loop /dev/cdrom  /yum  然后在最下面输出一行挂载命令

df -h

[root@localhost 桌面]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       7.6G  4.7G  2.5G  66% /
tmpfs           2.0G  224K  2.0G   1% /dev/shm
/dev/sda5        13G   32M   12G   1% /opt
/dev/sda3       4.7G   11M  4.5G   1% /tmp
/dev/sr0        3.6G  3.6G     0 100% /yum
/dev/sr0        3.6G  3.6G     0 100% /media/RHEL-6.6 Server.x86_64

cd /etc/yum.repos.d/

vi /rhel-source.repo

[rhel-source]
name=Red Hat Enterprise Linux $releasever - $basearch - Source
baseurl=file:///yum
enabled=1
gpgcheck=0
#gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release

[root@localhost 桌面]# rpm -qa |grep http
httpd-tools-2.2.15-39.el6.x86_64
jakarta-commons-httpclient-3.1-0.9.el6_5.x86_64
httpd-2.2.15-39.el6.x86_64

[root@localhost 桌面]# yum install httpd
已加载插件:product-id, refresh-packagekit, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
设置安装进程
包 httpd-2.2.15-39.el6.x86_64 已安装并且是最新版本
无须任何处理


#ifocnfig eth0   xxxxx(ip)   netmask xxxx   配置临时iP

#ip  addr  del  xxxx(ip)   netmask xxxx  dev eth1 删除临时iP


[root@localhost 桌面]# setup 




原创粉丝点击