由于开发环境只有局域网,没法使用网上的各种YUM源,来回拷贝rpm包安装麻烦,还得解决依赖问题。可以将其他yum源服务器的包同步到本地
感兴趣的小伙伴可以去官网下载 下面是我整理好的所有需要用到的rpm包
百度网盘链接有点大哈。。。。。。16G不着急慢慢下哈。。。。。
链接:https://pan.baidu.com/s/1_Uj1vN5zYRfGc3hf6KCQ_Q
提取码:w3jo
将rpms.tar.gz 上传到root目录
解压
tar zxvf rpm.tar.gz
删除所有节点 /etc/yum.repos.d 目录下的所有内容 rm -rf ./*
local.repo内容如下新建即可 mkdir local.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=base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=file:///root/docs/x86_64
enabled=1
gpgcheck=0
[updates]
name=updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=file:///root/docs/updates
enabled=1
gpgcheck=0
[extras]
name=extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=file:///root/docs/extras
enabled=1
gpgcheck=0
#additional packages that extend functionality of existing packages
[centosplus]
name=centosplus
baseurl=file:///root/docs/centosplus
gpgcheck=1
enabled=0
[mysql]
name=mysql
baseurl=file:///root/docs/mysql
enabled=1
gpgcheck=0
将local.repo 文件移动到yum.repos.d
1 然后安装
yum install -y httpd
开启httpd服务
systemctl start httpd.service
systemctl enable httpd.service
2 删除root下的docs 将rpms.tar.gz 解压至 /var/www/html/
tar -zxvf rpm.tar.gz -C /var/www/html/
3 解压完成 在浏览器查看ip:docs 是否可以解压成功
删除、etc/yum.repos.d 下的local.repo
将base.repo 上传至 /etc/yum.repos.d(每个节点都要上传同时删除掉每个节点改目录下的所有文件)可通过scp命令进行传输
scp base.repo hadoop002:/etc/yum.repos.d(根据自己的实际情况)
base.repo内容如下 mkdir 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=base
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://192.168.1.80/docs/x86_64
enabled=1
gpgcheck=0
[updates]
name=updates
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://192.168.1.80/docs/updates
enabled=1
gpgcheck=0
[extras]
name=extras
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://192.168.1.80/docs/extras
enabled=1
gpgcheck=0
#additional packages that extend functionality of existing packages
[centosplus]
name=centosplus
baseurl=http://192.168.1.80/docs/centosplus
gpgcheck=1
enabled=0
[mysql]
name=mysql
baseurl=http://192.168.1.80/docs/mysql
enabled=1
gpgcheck=0
修改base.repo (根据自己的实际情况修改ip)
4 每个节点都安装ntp服务
yum install -y nano wget ntp
待续。。。见下篇文章l离线安装mysql