安装 ftp

1 ssh登录服务器
      首先检查有没有安装运行 ps -ef |grep vsftpd
       
2 yum安装vsftpd
       yum安装    yum install vsftpd -y

3 修改配置 、增加开机启动
    vi /etc/vsftpd/vsftpd.conf
        anonymous_enable=YES改成NO
        保存退出

查看vsftpd又没有被设置为开机自启动
        chkconfig --list
   
    加入开机启动
        chkconfig --level 35 vsftpd on

4 增加FTP用户、并设置密码
    cd alidata
    mkdir www
    useradd ftpadmin -s /sbin/nologin -d /alidata/www
    passwd ftpadmin
    chown ftpadmin www 或者 chmod 777 www
   
5 启动ftp
    service vsftpd start

来自视频:http://help.aliyun.com/view/11108189_13495137.html?spm=5176.7224473.1997282753.6.6VPxgo

发现这样配置后:可以再windows系统的dos下使用ftp命令登录。  但是不能使用ftp工具列出文件列表。这是怎么回事?

解决ftp无法list目录,配置主动、被动模式

FTP as protocol is a bit of an odd duck. It uses two TCP connections, rather than just the one most protocols use. You have port 21, the command and login connection, and a second connection, the data connection.

With passive FTP the second connection is to a randomly assigned available TCP port above 1024.

You problems seem to indicate you don't have that second port open in your firewall.

There's multiple ways to deal with that:

Fixed the PASV port(-range) One solution is to configure VSFTPD to use a small range of ports, or just a single port and create a firewall rule to open those ports:

# /etc/vsftpd/vsftpd.conf
# reserve TCP ports - for passive FTP
pasv_min_port=
pasv_max_port=

And then open the port range in your firewall. (The multiport module allows for a port range rather than 20 lines each opening a single port):

# iptables -I INPUT -p tcp -m state --state NEW -m tcp -m multiport --dports : -j ACCEPT
# service iptables save
# service iptables restart

摘自:http://serverfault.com/questions/555541/failed-to-retrieve-directory-listing-in-filezilla-connecting-to-vsftpd

关于 ftp主动模式和被动模式 可以参考:http://jackiechen.blog.51cto.com/196075/193883/

案例:ftp被动模式端口相同导致无法登录:http://u2l.info/3n6kav

6 /etc/vsftpd/vsftpd.conf详解

可以参考 http://blog.chinaunix.net/uid-24625974-id-2845256.html(有案例)

鸟哥的私房菜 对vsftpd的介绍 http://linux.vbird.org/linux_server/0410vsftpd/0410vsftpd.php

可以连接但是无法列举目录 问题解决:

现象:

命令: LIST
错误: 无法打开传输通道。原因:由于连接方在一段时间后没有正确答复或连接的主机没有反应,连接尝试失败。
错误: 无法取得目录列表
命令: REST 0

解决:

1 关闭selinux

# vi /etc/selinux/config

SELINUX=disabled

需要重启才能生效,重启命令是 #reboot

2 进行下面的设置

# /etc/vsftpd/vsftpd.conf
# reserve TCP ports 2121-2142 for passive FTP
pasv_min_port=2121
pasv_max_port=2142
# iptables -I INPUT -p tcp -m state --state NEW -m tcp -m multiport --dports 2121:2142 -j ACCEPT
# service iptables save
# service iptables restart

阿里云上安装vsftp笔记的更多相关文章

  1. 阿里云上安装 Ubuntu + MariaDB

    阿里云上安装 Ubuntu + MariaDB 任务 安装第二个磁盘 设置第二个磁盘为数据盘 安装 MariaDB 配置 MariaDB 的数据文件目录 配置 MariaDB 远程访问 安装第二个磁盘 ...

  2. 阿里云上安装 OpenStack 是什么体验

    阿里云上跑火车(安装 OpenStack Train 版本),猜猜最终花了多少钱? 前言 前面给大家提供了用虚拟机安装 OpenStack 的镜像,虽然已经很简便了,但还是略显笨重.一来镜像文件比较大 ...

  3. 阿里云上安装mysql步骤/ 阿里云ECS搭建Java+mysql+tomcat环境

    使用阿里云ECS挺长一段时间了.这两天碰巧朋友小白让我一步一步教他在ECS上搭建Java+mysql+tomcat环境,所以把在这里把步骤在这简单整理了一下,以便需要的人查阅. 我购买的阿里云服务器系 ...

  4. 阿里云上安装pip3(Ubuntu)

    安装pip3: 这个简单啊,到网上下载get-pip.py的脚本,然后scp到你的阿里云服务器上,python3 get-pip.py即可. 如果不会scp,哈哈,按照下面的几步: wget http ...

  5. 在阿里云上安装python3.4和pycharm

    一. 安装python3.4 二. 安装pycharm 三. 安装可视化界面和远程桌面连接 四. 启动和配置pycharm 五. 安装更多字体 六. 给pycharm设置桌面快捷方式 一. 安装pyt ...

  6. 阿里云上安装启动nginx 以及在个人电脑上通过公网ip访问遇到的问题

    1.安装依赖包 //一键安装上面四个依赖 yum -y install gcc zlib zlib-devel pcre-devel openssl openssl-devel 2.下载并解压安装包 ...

  7. 阿里云上如何利用yum安装jenkins

    一. 安装jdk 确保安装jenkins前jdk已经安装,如何安装见<如何在阿里云上部署war包到tomcat服务器> 二. 安装jenkins 使用以下命令安装jenkins: wget ...

  8. 阿里云mysql安装

    阿里云上安装mysql还是遇到些问题,感觉不是傻瓜式一键安装,还是写个帖子以后看 1.安装 https://yq.aliyun.com/articles/47237 启动mysql的时候报了问题 My ...

  9. 阿里云上如何利用war包安装jenkins

    一. 前提条件:已安装jdk和tomcat 如何安装,请参考<如何在阿里云上部署war包到tomcat服务器> 二. 下载war包 下载地址:http://mirrors.jenkins- ...

随机推荐

  1. Python开源框架Scrapy安装及使用

    一.安装问题 环境: CentOS  + Python 2.7 + Pip 1) 安装时遇到 ”UnicodeDecodeError: 'ascii' codec can't decode byte  ...

  2. 基于HTML5技术的电力3D监控应用(三)

    继(一)和(二)之后不少,不少网友问我移动终端的使用问题,因为我们项目这次采用Android平板终端,所以我对这方面有点肤浅的研究,这篇分享些项目经验总结,希望对大家有所帮助. 电力3D项目去年底刚立 ...

  3. 用cart(分类回归树)作为弱分类器实现adaboost

    在之前的决策树到集成学习里我们说了决策树和集成学习的基本概念(用了adaboost昨晚集成学习的例子),其后我们分别学习了决策树分类原理和adaboost原理和实现, 上两篇我们学习了cart(决策分 ...

  4. C#设计模式——模板方法(Template Method)

    一.概述在软件开发中,对某一项操作往往有固定的算法结构,而具体的子步骤会因为不同的需要而有所不同.如何可以在稳定算法结构的同时来灵活应对子步骤变化的需求呢?二.模板方法模板方法是一种常见的设计模式,它 ...

  5. ASP.NET使用UpdatePanel实现AJAX

    ScriptManager和UpdatePanel控件联合使用可以实现页面异步局部更新的效果.其中的UpdatePanel就是设置页面中异 步局部更新区域,它必须依赖于ScriptManager存在, ...

  6. 查询分页的几种Sql写法

    查询分页的几种Sql写法 摘自:http://www.cnblogs.com/zcttxs/archive/2012/04/01/2429151.html 1.创建测试环境,(插入100万条数据大概耗 ...

  7. mssql server提示无权限

    mssqlserver在查询系统视图时(如:select * from sys.syscacheobjects),有时会报出如下提示: 消息 300,级别 14,状态 1,第 1 行VIEW SERV ...

  8. Microsoft Excel软件打开文件出现文件的格式与文件扩展名指定格式不一致?

    今天winform代码做一个datagridview数据导出功能,导出的excel文件的后缀是*.xls(Micorsoft Excel 2000), 而本机新建的excel文件的后缀是 *.xlsx ...

  9. 重新想象 Windows 8 Store Apps (38) - 契约: Search Contract

    [源码下载] 重新想象 Windows 8 Store Apps (38) - 契约: Search Contract 作者:webabcd 介绍重新想象 Windows 8 Store Apps 之 ...

  10. No.012:Integer to Roman

    题目: Given an integer, convert it to a roman numeral.Input is guaranteed to be within the range from ...