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博客

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

    声明:本博客原创文字只代表本人工作中在某一时间内总结的观点或结论,与本人所在单位没有直接利益关系。非商业,未授权,贴子请以现状保留,转载时必须保留此段声明,且在文章页面明显位置给出原文连接。
  • 相关阅读:
    Linux 进程间通信(一)(经典IPC:消息队列、信号量、共享存储)
    Linux 进程间通信(一)(经典IPC:管道、FIFO)
    Linux I/O 进阶
    Linux 信号
    Linux 进程(二):进程关系及其守护进程
    转载:什么是B+树?
    转载:什么是B树?
    Redis批量删除脚本
    Java时间工具类
    JSP2.2自定义标签、EL函数
  • 原文地址:https://www.cnblogs.com/w821759016/p/14950313.html
Copyright © 2011-2022 走看看