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