centos6 搭建在线yum源
2017-09-02 21:27
141 查看
一.搭建在线yum源的优势
1.架设自己的yum源,节省带宽
2.避免通过网络访问延迟
3.对于有联网限制的服务器
二.搭建步骤
1.安装nginx
2.搭建国内yum源
(1)备份原始yum源
3.同步网络yum源
(1)创建目录
(2)安装工具包
(3)扫描yum源配置目录
至此本地yum源搭建成功
三 . 测试
(1)备份自带yum 源
(2)配置yum源
1.架设自己的yum源,节省带宽
2.避免通过网络访问延迟
3.对于有联网限制的服务器
二.搭建步骤
1.安装nginx
yum install nginx -y 修改配置文件 vim /usr/local/nginx/conf/nginx.conf server { listen 80; server_name localhost; #charset koi8-r; #access_log logs/host.access.log main; location / { root /rpm; index index.html index.htm; autoindex on; }
/usr/local/nginx/sbin/nginx ##启动nginx
2.搭建国内yum源
(1)备份原始yum源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup wget -O /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-6.repo yum clear all yum repolist
3.同步网络yum源
(1)创建目录
mkdir /rpm
(2)安装工具包
yum -y install yum-utils cd /rpm reposync -r base ##缓存网络源到本地
(3)扫描yum源配置目录
createrepo base/Packages/
至此本地yum源搭建成功
三 . 测试
(1)备份自带yum 源
mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup
(2)配置yum源
相关文章推荐
- CentOS6.5 搭建在线yum源
- [zz]搭建centos6.0本地yum源(32位)
- centos 创建本地yum源搭建本地yum仓库 亲测可用
- 【CentOS 7】【yum源】CentOS搭建内网yum源(转载)
- centos服务器搭建本地yum源 2
- centos6.5本地yum源搭建及使用方法
- CentOS7搭建本地yum源之http服务
- Centos 本地yum源的搭建
- CentOS6.5环境下使用镜像文件搭建本地yum源
- RedHat Enterprise Linux 6.4使用Centos 6 的yum源 分类: 服务器搭建 Nginx 2015-07-14 14:11 5人阅读 评论(0) 收藏
- Centos中搭建光盘yum源
- 阿里云 ECS(centos 7.2镜像) 搭建 Etherpad(在线协作编辑 与一起写相仿)
- CentOS 7搭建本地yum源
- centos用ISO光盘镜像搭建本地yum源
- Centos6.5上搭建FTP远程yum源
- Linux编程yum在线安装光盘搭建yum源
- CentOS 搭建本地yum源
- CentOS6搭建本地局域网YUM源
- RHEL6.4 和centos5.8搭建本地yum源
- centos6.5本地yum源搭建及使用方法