zoukankan      html  css  js  c++  java
  • ubuntu16.04下ftp服务器的安装与配置

    由于要将本地程序上传至云服务器中,所以需要给云服务器端安装ftp服务器。记录一下ftp的安装过程,以便以后使用。服务器端所用系统为Ubuntu16.04.

    1. 安装ftp服务器,

    apt-get install vsftpd ftp

    2. 配置ftp服务器,在/etc/vsftpd.conf中修改,注意修改前先备份一份。

    cp /etc/vsftpd.conf /etc/vsftpd_bk.conf
    vim /etc/vsftpd.conf

    3.  

    # 上面默认下不变
    write_enable=YES
    utf8_filesystem=YES

    4. 重启ftp服务器

    systemctl restart vsftpd

    5. 命令行下运行试试

    zf ~ $ ftp localhost
    Connected to localhost.
    220 (vsFTPd 3.0.3)
    Name (localhost:zf): zf 
    331 Please specify the password.
    Password:
    230 Login successful.
    Remote system type is UNIX.
    Using binary mode to transfer files.
    ftp> 

    6. 也可以试试root用户是否可以登录,默认是不让登录的,如果要root登录的话,需要把/etc/ftpusers中的root注释掉。

    # /etc/ftpusers: list of users disallowed FTP access. See ftpusers(5).
    
    # root
    daemon
    bin
    sys
    sync
    games
    man
    lp
    mail
    news
    uucp
    nobody

    7.此时就可以通过浏览器连接到云服务器了,在地址栏输入ftp://服务器端IP.

    试试在服务器端新建或者删除文件,浏览器端是否可以看到改变。

    8. 我本地用的是Ubuntu16.04系统,它还有一个很方便的连接服务器方法,打开任意一个文件夹,选择它菜单栏的文件->连接到服务器

    输入服务器地址ftp://IP,然后输入用户名和密码就可以登录操作了,这样就像打开本地文件夹一样,操作也与本地无异,也可以在本地修改文档,保存,然后在服务器端执行。 

     9、卸载

    sudo apt-get remove --purge vsftpd

    (--purge 选项表示彻底删除改软件和相关文件)

  • 相关阅读:
    Unix进程和线程管理及其异同
    UnixIPC之共享内存
    Unix/Linux常用文件操作
    java中int和Integer比较
    JAVA四种引用类型
    JAVA-Exception&Error
    JAVA特性-跨平台/面向对象
    JAVA单向链表实现
    linux安装及配置c++的opencv库
    static_cast、const_cast、dynamic_cast、reinterpret_cast
  • 原文地址:https://www.cnblogs.com/zongfa/p/8213488.html
Copyright © 2011-2022 走看看