您当前的位置: 首页 >  centos

少林码僧

暂无认证

  • 1浏览

    0关注

    317博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

通过ftp在Centos6和Centos7上搭建yum仓库

少林码僧 发布时间:2017-04-20 14:30:08 ,浏览量:1

yum网络仓库的搭建

## CentOS7

yum -y install vsftpd
systemctl start vsftpd
[318][root@liyong: yum.repos.d]# systemctl enable vsftpd

iptables -F
systemctl stop firewalld.service
systemctl disable firewalld.service
rpm -ql vsftpd #查看启动命令和共享目录
/usr/sbin/vsftpd
/var/ftp
/var/ftp/pub

访问ftp://172.16.255.19/pub
# 拷贝rpm包
cp /run/media/root/CentOS\ 7\ x86_64/Packages/tree-1.6.0-10.el7.x86_64.rpm ./

#生成repodata
yum install -y createrepo
createrepo ./
    Spawning worker 0 with 1 pkgs
    Spawning worker 1 with 0 pkgs
    Spawning worker 2 with 0 pkgs
    Spawning worker 3 with 0 pkgs
    Workers Finished
    Saving Primary metadata
    Saving file lists metadata
    Saving other metadata
    Generating sqlite DBs
    Sqlite DBs complete
    [346][root@liyong: pub]# ll
    total 52
    drwxr-xr-x. 2 root root  4096 Apr 20 21:40 repodata
    -rw-r--r--. 1 root root 47508 Apr 20 21:38 tree-1.6.0-10.el7.x86_64.rpm



#配置yum源
vim /etc/yum.repos
关注
打赏
1661398670
查看更多评论
立即登录/注册

微信扫码登录

0.0351s