yum安装的四种方式
一、默认:从国外下载
二、国内:从阿里获取 http://mirrors.aliyun.com



三、本地文件:从本地搭建一个源头(repository)
四、本地服务:http://ip/
这里用的是本地文件的方式
4.1、安装Nginx
略。。
4.2、修改nginx.conf配置文件
vi /usr/local/nginx/conf/nginx.conf
修改
Location 中
Root /mnt
Autoindex on
4.3、挂载到mnt
这里需要注意镜像需要大的iso文件4G的那个,注意开机前连接到这个4G镜像
cd /dev
mount /dev/cdrom /mnt
ls /mnt
umount /mnt
4.4、启动Nginx
Service nginx start
Chkconfig nginx on 设置开机启动
注意防火墙要关闭
Service iptables stop
Chkconfig iptables off
这时候在浏览器输入nginx所在node的节点的ip,可访问nginx , 查看是否挂载成功
4.5、yum源配置文件
在其他node获得source源
Vi /etc/yum.repos.d/CentOS-Base.repo
[base]
name=CentOS-local
baseurl=http://具体yum源服务器的ip地址
gpgcheck=0
Yum install man -y 拔掉网线测试,是否能够成功