hadoop实战-07.ubuntu14.04安装vsftpd服务

阅读更多

因为从总是要下载东西,虚拟机本身内存有限,所以考虑安装ftp服务,可以往虚拟机上上传文件。

 

#Ubuntu 安装 vsftpd 服务

sudo apt-get update

sudo apt-get install vsftpd

安装时老是提示没找到vsftp软件包,

 

改 gedit /etc/apt/sources.list  或vi /etc/apt/sources.list, 在最后加入

deb http://ftp.us.debian.org/debian stable main contrib non-free 

deb http://ftp.us.debian.org/debian-non-US stable/non-US main contrib non-free

deb http://ftp.us.debian.org/debian testing main contrib non-free

deb http://ftp.us.debian.org/debian-non-US testing/non-US main contrib non-free 

deb http://ftp.us.debian.org/debian unstable main contrib non-free

deb http://ftp.us.debian.org/debian-non-US unstable/non-US main contrib non-free

最后执行 apt-get update 更新软件库

安装vsftpd服务:sudo apt-get install vsftpd

安装时还是提示某些软件包没安装成功,然后就安装提示的补安装

更新软件库,重新安装vsftpd服务,终于成功

设置ftp用户的密码,输入sudo passwd ftp,然后输入密码,再确认密码。

创建ftp用户的家目录,使用sudo mkdir /home/ftp命令

设置ftp家目录的权限,我这里为方便直接使用sudo chmod 777 /home/ftp

设置vsftpd的文件,位置在/etc/vsftpd.conf,修改之前最好先备份下这个文件:

cp /etc/vsftpd.conf /etc/vsftpd.conf.old

因为我是虚拟机自己做实验,所以没有做过多的权限设置

#不让匿名用户使用

#anonymous_enable=YES

local_umask=022

#本地用户可用

local_enable=YES

#可用写操作

write_enable=YES

#不需要显示某目录下文件信息

#dirmessage_enable=YES

其他没做改动

 

测试一下:在其他主机上输入ftp://192.168.0.105

输入账号密码后登陆成功,可以上传和下载文件

 

 

启动服务:

sudo service vsftpd start

sudo service vsftpd restart

你可能感兴趣的:(ubuntu,vsftp,安装出错,没找到软件包)