本人小白,写下这篇博客意在记录踩过的坑,大神请绕道~

准备工作

安装自己喜欢的连接软件(一般是putty或者xshell),本人选择的是xshell,软件如图 :

通过软件中的ssh连接连接上已经购买的服务器,具体账号密码可在阿里云的控制台设置 。

在控制台选择主机系统为CentOS7.2,连接上了之后首先先将服务器更新至最新版本。

 yum -y update 

接着安装编译源代码的开发工具 。

 yum -y groupinstall "Development Tools" 

FTP的安装

1.安装vsftpd的服务器和客户端

 sudo yum install ftp vsftpd

2.安装一个加密工具

 sudo yum install libdb-utils.x86_64

【大坑提醒】

不知道是我的个人情况还是通病,在使用VIM时会报

 -bash: vim: command not found.

但是VI命令使用正常,遇到这种情况一般是VIM相关组件没有安装完成,可以通过命令查看

 # rpm -qa |grep vim

VIM命令可用时返回为

 vim-minimal-7.0.-.el5
vim-common-7.0.-7.2.el5
vim-enhanced-7.0.-7.2.el5

以上三条缺一不可,如果有空缺可用代码重新安装

 yum -y install vim*

VIM的使用

进入编辑模式 a

进入命令行模式 esc

直接退出 :q

保存退出 :wq

vsftpd的配置

创建vsftp的登录用户和主目录

 sudo useradd -d /home/myftp -s /sbin/nologin myftp(myftp是ftp的登录用户,替换成你自己的用户)

进入修改相对应用户的密码

 passwd myftp

创建出vsftpd虚拟用户

 sudo touch /etc/vsftpd/vftpuser.txt

文件里为

 用户1
用户1密码
用户2
用户2密码
......
 sudo db_load -T -t hash -f /etc/vsftpd/vftpuser.txt /etc/vsftpd/vftpuser.db 

添加vsftpd的虚拟用户的验证

 sudo vim /etc/pam.d/vsftpd 

替换其中account和auth

 session    optional     pam_keyinit.so    force revoke
#auth required pam_listfile.so item=user sense=deny file=/etc/vsftpd/ftpusers onerr=succeed
#auth required pam_shells.so
#auth include password-auth
#account include password-auth
auth required pam_userdb.so db=/etc/vsftpd/vftpuser
account required pam_userdb.so db=/etc/vsftpd/vftpuser
session required pam_loginuid.so
session include password-auth

修改vsftpd的配置文件

 sudo vim /etc/vsftpd/vsftpd.conf 

以下为删除了注释的配置好的版本

 # 是否运行匿名登录(NO)
anonymous_enable=NO
# 是否允许本地用户登录
local_enable=YES
# 允许ftp的任何写方式
write_enable=YES
# 文件创建只有的权限是755=(-)
local_umask=
# 是否允许匿名用户上传文件
#anon_upload_enable=YES
# 是否允许匿名用户创建文件或者删除文件
#anon_mkdir_write_enable=YES
# 用户进入目录信息提示
dirmessage_enable=YES
# 是否允许vsftp的日志
xferlog_enable=YES
# Make sure PORT transfer connections originate from port (ftp-data).
connect_from_port_20=YES
#
#chown_uploads=YES
#chown_username=whoever
# 日志文件的路径
xferlog_file=/var/log/xferlog
# 日志文件的格式
xferlog_std_format=YES
#
#idle_session_timeout=
#
#data_connection_timeout=
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd/banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
# (Warning! chroot'ing can be very dangerous. If using chroot, make sure that
# the user does not have write access to the top level directory within the
# chroot)
chroot_local_user=YES
chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd/chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
# 只监听ipv4的地址
listen=YES
#
# This directive enables listening on IPv6 sockets. By default, listening
# on the IPv6 "any" address (::) will accept connections from both IPv6
# and IPv4 clients. It is not necessary to listen on *both* IPv4 and IPv6
# sockets. If you want that (perhaps because you want to listen on specific
# addresses) then you must run two copies of vsftpd with two configuration
# files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=YES pam_service_name=vsftpd
userlist_enable=YES
tcp_wrappers=YES
# 下面是自己添加的
anon_root=/home/pageftp/open
virtual_use_local_privs=YES
guest_enable=YES
guest_username=pageftp
# 虚拟用户的配置文件(可以对每一个虚拟用户进行单独的权限配置)
user_config_dir=/etc/vsftpd/vconf/
chroot_local_user=YES
allow_writeable_chroot=YES

配置虚拟用户的权限

 sudo mkdir /etc/vsftpd/vconf/
touch 用户1 用户2 ……
vim 用户1

配置结果如下

 cmds_allowed=ABOR,ACCT,APPE,CWD,CDUP,DELE,HELP,LIST,MODE,MDTM,MKD,NOOP,NLST,PASS,PASV,PORT,PWD,QUIT,REIN,RETR,RMD,RNFR,RNTO,SITE,SIZE
,STOR,STAT,STOU,STRU,SYST,TYPE,USER
write_enable=yes
download_enable=yes
anon_upload_enable=yes
anon_mkdir_write_enable=yes
anon_other_write_enable=yes
anon_world_readable_only=no

最后启动vsftpd服务

 sudo systemctl enable vsftpd
sudo service vsftpd start

使用刚设置的用户名和密码通过FTP连接观察,本人选用软件FlashFXP。

配置参考地址:http://blog.csdn.net/m47838704/article/details/51636379

Node.js环境安装

使用最新源码安装,资源从Node.js网站获取,地址为http://nodejs.org/download

 wget http://nodejs.org/dist/v6.5.0/node-v6.5.0.tar.gz (版本号可根据实际需求自行替换)

解压源文件并进入相应文件夹

 tar zxf node-v6.5.0.tar.gz
cd node-v6.5.0

执行编译预处理

 ./configure 

编译源代码

 make

放置至系统路径

 make install

成功安装

阿里云 CentOS7.2 配置FTP+Node.js环境的更多相关文章

  1. 阿里云 CentOS7中搭建FTP服务器

    1配置 vsftpd-3.0.2-27.el7.x86_64 阿里云 centos 7.0 2 ftp工作模式 2.1 ftp通道 ftp工作会启动两个通道: 控制通道,数据通道 在ftp协议中,控制 ...

  2. 阿里云CentOS7.3配置Java Web应用和Tomcat步骤

    阿里云的Linux系统包括CentOS7.3配置了密钥对 怎样将自己ECS实例绑定密钥对,并启用秘钥: https://help.aliyun.com/document_detail/51798.ht ...

  3. 阿里云Centos7 apache配置

    其实很简单,主要是有坑. 首先填坑,在阿里云安全策略上开放要访问的端口,然后配置firewall添加对应端口开放. firewall-cmd --zone=public --add-port=8011 ...

  4. 阿里云ECS安装最新版本Node.js

    原文  http://www.w3ctech.com/topic/1610 主题 Node.js操作系统服务器 我的ECS实例是Ubuntu操作系统,直接使用 apt-get install node ...

  5. mac 上node.js环境的安装与测试

    如果大家之前做过web服务器的人都知道,nginx+lua与现在流行的Node.js都是可以做web服务器的,前者在程序的写法和配置上要比后者麻烦,但用起来都是差不多.在这里建议大家如果对lua脚本语 ...

  6. mac 上node.js环境的安装与测试【转】

    http://blog.csdn.net/baihuaxiu123/article/details/51868142 一 摘要 如何大家之前做过web服务器的人都知道,nginx+lua与现在流行的n ...

  7. 阿里云centos7.4下tomcat8.5配置ssl证书

    环境 阿里云centos7.4 域名也是阿里申请的 jdk1.8 tomcat8.5 1.申请证书 登录到阿里云的域名管理,可以看到已经申请过得域名,我这里第一个已经配置了ssl,第二个未配置,点击更 ...

  8. <亲测>阿里云centos7 挂载数据盘配置

    阿里云centos7 挂载数据盘配置 2018年07月17日 15:13:53 阅读数:235更多 个人分类: linux阿里云ECS数据盘挂载   查看磁盘情况 fdisk -l  其中/dev/v ...

  9. 在阿里云Centos7.6上面配置Mysql主从数据库(master/slave),实现读写分离

    原文转载自「刘悦的技术博客」https://v3u.cn/a_id_85 在之前的一篇文章中,阐述了如何在高并发高负载的场景下使用nginx做后台服务的负载均衡:在阿里云Centos上配置nginx+ ...

随机推荐

  1. RSA算法优化

    RSA算法优化 大数乘法 模乗优化 剩余定理(孙子定理) RSA加解密 python的RSA计算优化 #-*- coding: utf-8 -*- ''' /********************* ...

  2. java.sql.Types,数据库字段类型,java数据类型的对应关系

    以下转自:http://kummy.itpub.net/post/17165/172850 本文在原文基础上有增减. 本概述是从<JDBCTM Database Access from Java ...

  3. 某大神C#框架后台发送信息的查找及破解

    最近在博客园瞎逛的时候,发现了某个大神发布的一个c#框架,一看框架,叫牛逼框架,嗯,装B效果太好了,界面很炫,虽然有很多的组件还是不怎么完善,但是,已经可以初步运用于项目了. 先来看看界面:   在进 ...

  4. MyBatis 框架笔记

    Mybatis 框架笔记   ------技术源于热爱! 获取更多内容请关注小编的个人微信公众平台 1       Mybatis入门 1.1     单独使用jdbc编程问题总结 1.1.1  jd ...

  5. Java中Animal b = new Dog();Dog c = new Dog();的区别

    由于在编译阶段,只是检查参数的引用类型.然而在运行时,Java虚拟机(JVM)指定对象的类型并且运行该对象的方法.因此在下面的例子中,b.move()之所以能编译成功,是因为Animal类中存在mov ...

  6. java中的ArrayList 、List、LinkedList、Collection关系详解

    一.基础介绍(Set.List.Map) Set(集):集合中的元素不按特定方式排序,并且没有重复对象.他的有些实现类能对集合中的对象按特定方式排序. List(列表):集合中的元素按索引位置排序,可 ...

  7. ASP.NET Zero--8.一个例子(1)菜单添加

    以一个商品分类管理功能来编写,代码尽量简单易懂.从一个实体开始,一直到权限控制,由浅到深一步步对功能进行完善. 1.打开语言文件 [..\MyCompanyName.AbpZeroTemplate.C ...

  8. 常见sql语句

    1.去最新插入表数据与当前时间差额 select  *,(TIME_TO_SEC(SYSDATE())-TIME_TO_SEC(t.cre_time)) from t_sms_flow t where ...

  9. Qt 富文本处理

    富文本处理 所有的类围绕 QTextDocument 展开, 它保证了用户可以创建和修改 富文本块, 而无须定义中间语言.一个 QTextDocument 可以通过两个接口操作, 一个是用于编辑的 C ...

  10. iOS BUG的解决

    当iOS程序报这样的错误 ld:261 dulicate symbols for architecture x86_64 clang:error:linker command failed with ...