网络yum源的配置

1.准备:

光盘

元数据

2.网络服务http(s)  ftp

查看是否安装  which  vsftp;  ls  /misc/cd/Packages | grep vsftpd

安装  rpm  -ivh  /misc/cd/Packages/vsftpd…

查看服务脚本名  rpm  -ql  vsftp

查看服务端口是否打开  netstat  -ntl  

启动服务  centos 7.3    systemctl  start  vsftpd.service  ; 

              centos 6.9   service  vsftpd  start  或者  start  /etc/rc.d/init.d/vsftpd

开机自动启动服务  centos 7.3   systemctl  enable  vsftpd

                          centos 6.9  chkconfig  vsftpd on

3.停止防火墙服务

centos7.3

systemctl  stop  firewalld.service

systemctl  disable  firewalld.service

centos6.9

service  iptables  stop  开机禁用

chkconfig  iptables  off  马上禁用

查看防火墙是否关闭   iptables  -vnL

4.复制元数据repodata和rpm包文件

centos7

mkdir  /var/ftp/pub/{6,7}

cp  -rv  /misc/cd/repodata/   /var/ftp/pub/7

cp  -rv  /misc/cd/Packages/   /var/ftp/pub/7   复制一部分即可  ctrl+c

挂载centos6.9的光盘:

先检测一下是否挂载成功  ll  /misc/cd/ ,看到有centos6的文件即成功

cp  -rv  /misc/cd/repodata/   /var/ftp/pub/6

cp  -rv  /misc/cd/Packages/   /var/ftp/pub/6   复制一部分即可  ctrl+c

可能会用到的命令     yum  clean  all

                             yum  repolist

mv  6  6.9 ; mv  7   7.3;

ln  -s  6.9  6  ;  ln  -s  7.3  7;

同理centos6.9

5.客户端的配置

[ftpbase]

name=ftp service repo

baseurl=ftp://192.168.8.133/pub/$release

gpgcheck=0

实现第三方软件仓库

1.准备第三方软件RPM

mkdir  /var/ftp/pub/app   这个路径就是repodata的父目录

cp  /misc/cd/Packsges/*.rpm   /var/ftp/pub/app

2.创建元数据

which  createrepo

rpm   -qf  ‘`which  createrepo`’

yum  install  createrepo  -y

createrepo  /var/ftp/pub/app   在 app下生成repodata文件夹

3.客户端的配置

[app]

basename=the third app

baseurl=ftp://192.168.8.133/pub/app

gpgcheck=0

4.测试

yum  repolist

yum  clean  all

yum  install  app

网络yum源的配置网络yum源的配置网络yum源的配置

原创文章,作者:Miracle,如若转载,请注明出处:http://www.178linux.com/78046

(1)
MiracleMiracle
上一篇 2017-06-13 19:03
下一篇 2017-06-13 21:49

相关推荐

  • 在VMware Workstation上安装CentOS 7

    1.新建虚拟机设备设置 2.开启此虚拟机,进行安装设置    需设置4处  时间,SOFTWARE SELECTION,分区,NETWORK & HOST NAME    (1) 首先 时间设置,选中上海时间,设置现在的Windows时间,设置好后,点击Done退出。(下面同意Done保存退…

    2017-07-15
  • linux全方位掌握一个命令–思路比方法更重要

    Linux命令众多,当不清楚一个命令的使用方法时,我们该怎样了解命令的属性和帮助? 1.  用type命令了解一个命令的属性 [root@zejin240 testdir]# type cdcd is a shell builtin[root@zejin240 testdir]# type rmrm is aliased to `rm -i&#03…

    Linux干货 2016-10-30
  • linux命令查找locate find要点

           在文件系统上查找符合的文件        locate, find locate:          依赖于事先构建好的索引库:             &…

    Linux干货 2016-11-07
  • 网络管理之nmcli命令的使用

    nmcli命令      地址配置工具:nmcli nmcli[ OPTIONS ] OBJECT { COMMAND | help }     device -show and manage network interfaces     …

    Linux干货 2016-09-19
  • grep&正则表达式

    grep&正则表达式 grep(global search regular expression(RE) and print out the line,全面搜索正则表达式并把行打印出来)是一种强大的文本搜索工具,它能使用正则表达式搜索文本,并把匹配的行打印出来。 语法 grep [选项]… PATTERN [FILE]… 选项 -a 不要忽略…

    Linux干货 2018-03-23
  • wordpress配置安装

    1、首先进行lamp框架的搭建 服务器环境:Linux Centos 7.2.1511 64位 内存:2G  磁盘空间100GB IP地址:10.55.10.79 进行httpd,php,php-mysql,mariadb-server的安装,安装均使用yum安装 ~]# yum -y install httpd php php-mysql mar…

    Linux干货 2016-11-04