zoukankan      html  css  js  c++  java
  • redhat7.6 搭建ftp yum服务器

    服务器端配置
     
    1.关闭防火墙,以及设置开启不自启
    [root@localhost network-scripts]# systemctl stop firewalld
    [root@localhost network-scripts]# systemctl disable firewalld
    Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
    Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
     
    2.关闭SELinux
    编辑文件/etc/selinux/config,更改为如下,需要重启生效
    [root@localhost network-scripts]# cat /etc/selinux/config
    # This file controls the state of SELinux on the system.
    # SELINUX= can take one of these three values:
    #     enforcing - SELinux security policy is enforced.
    #     permissive - SELinux prints warnings instead of enforcing.
    #     disabled - No SELinux policy is loaded.
    SELINUX=disabled
    # SELINUXTYPE= can take one of three values:
    #     targeted - Targeted processes are protected,
    #     minimum - Modification of targeted policy. Only selected processes are protected.
    #     mls - Multi Level Security protection.
    SELINUXTYPE=targeted
     
    临时关闭selinux
    setenforce 0
     
    3.安装ftp
     
    这里为了解决一些依赖包问题直接配置了一下本地yum
    vi /etc/yum.repos.d/redhat7.repo
    [rhel-source]
    name=Source
    baseurl=file:///mnt
    enabled=1
    gpgcheck=0
     
    yum clean all
    yum install -y vsftpd*
     
    4.启动ftp并设置为开机自启
    systemctl start vsftpd
    systemctl enable vsftpd
     
    5.创建仓库,仓库存放全部的rpm包
    mkdir /var/ftp/yum
    cp -a /mnt/Packages/* /var/ftp/yum
     
    6.生成索引文件
    yum install -y createrepo*
     
    createrepo /var/ftp/yum
     
    客户端配置
    1.配置yum源
    [root@bjyctzdb02 yum.repos.d]# vi redhat7.repo
    [rhel-source]
    name=Red Hat
    enabled=1
    gpgcheck=0
     
    2.清空缓存
    yum clean all
     
    3.yum安装测试
     
    yum install -y tree*
     
    Installed:
      tree.x86_64 0:1.5.3-3.el6                                                                                                                                            
    Complete!
     
  • 相关阅读:
    互联网公司做智能硬件要注意什么?
    移动GPU全解读(二)
    java JDK设置环境变量
    hive load文件第一个字段为NULL
    网页版微信和微信公共号扫码登陆原理分析
    Java&Xml教程(九)Java中通过XSD校验XML合法性
    47.Android 自己定义PopupWindow技巧
    ArcGIS中数据之间的转换接口IFeatureDataConverter2
    怎样衡量代码质量?
    iOS -读书笔记-网络请求
  • 原文地址:https://www.cnblogs.com/hanglinux/p/11772586.html
Copyright © 2011-2022 走看看