zoukankan      html  css  js  c++  java
  • 在VM虚拟机中安装FTP服务

    自用的话,建议先关掉防火墙

    systemctl stop firewalld #关闭防火墙
    systemctl disable firewalld.service #设置开机禁用防火墙
    systemctl start firewalld #启动防火墙
    systemctl enable firewalld.service #设置开机启用防火墙
    systemctl status firewalld  #检查防火墙状态

    1. 安装ftp

    yum -y install vsftpd 

    查看

    vsftpd -v

    2. 取消匿名登陆

    修改vsftpd.conf文件

    vi /etc/vsftpd/vsftpd.conf

    把 anonymous_enable=YES,改为NO,然后重启vsftpd

    3、设置开机启动

    chkconfig vsftpd on

    4、启动ftp服务

    service vsftpd start

    检查服务状态

    service vsftpd status

    停止服务:

    service vsftpd stop

    重启服务

    service vsftpd restart

    5. vi /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=enforcing
    # SELINUXTYPE= can take one of three two values:
    #     targeted - Targeted processes are protected,
    #     minimum - Modification of targeted policy. Only selected processes are protected.
    #     mls - Multi Level Security protection.
    #SELINUXTYPE=targeted
    SELINUX=disabled

    6. 关闭防火墙

    setenforce 0 #设置SELinux 成为permissive模式 临时关闭selinux的防火墙

    查看SELinux状态

    getenforce

    修改好之后,reboot重启下,然后执行getenforce命令查看SELinux状态

    再次查看SELinux状态

    显示 Disabled

    7.获取本地IP地址

    ip address

    找到类似192.168.x.x的IP地址,记下来

    8. 连接FTP

    打开xshell,新建会话,输入192.168.x.x,点击连接,根据提示,输入用户名密码即可(用户名是当前用户root,密码是进入linux系统的密码,连接就可以了)。

    原文地址:在虚拟机中安装ftp_ITPUB博客

    喜欢本文章的朋友,欢迎关注公众号【程序员在职场】支持一下作者。

    声明:本博客原创文字只代表本人工作中在某一时间内总结的观点或结论,与本人所在单位没有直接利益关系。非商业,未授权,贴子请以现状保留,转载时必须保留此段声明,且在文章页面明显位置给出原文连接。
  • 相关阅读:
    python的三元运算符
    百度站长社区有价值SEO问题提炼(一)
    Python文件夹与文件的操作
    python核心编程课后题第二版第十章264页
    python核心编程课后题第二版第九章230页
    python核心编程课后题第二版第八章209页
    《python核心编程》课后题第二版第十一章308页
    PhoneGap源码分析1——说明
    EF db first 获取表名称
    SQL Server使用证书最小粒度授权
  • 原文地址:https://www.cnblogs.com/w821759016/p/14950313.html
Copyright © 2011-2022 走看看