如何在ubuntu中安装设置ftp服务器

如何在ubuntu中安装设置ftp服务器,第1张

安装
apt-get install vsftpd
mkdir /home/ftp
创角用户
useradd -d /home/ftp -s /bin/bash ftpname
修改密码
passwd ftpname
修改配置
vi vsftpdconf
设置属性值
anonymous_enable=NO #禁止匿名访问
local_enable=YES
write_enable =YES
启动vsftpd服务
service vsftpd start

多个不同IP段的 /etc/network/interfaces 配置文件的范例如下:
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 8882
netmask 255255255248
gateway 8881 要注意这里,多个不同IP段,只要1个gateway配置即可,其他IP不需要配置gateway
auto eth0:0
iface eth0:0 inet static
address 8883
netmask 255255255248
auto eth0:1
iface eth0:1 inet static
address 8884
netmask 255255255248
auto eth0:2
iface eth0:2 inet static
address 8885
netmask 255255255248
auto eth0:3
iface eth0:3 inet static
address 8886
netmask 255255255248
auto eth0:4
iface eth0:4 inet static
address 666130 注意这里,虽然这是不同的IP段,但是不需要配置gateway,只需要配置netmask即可
netmask 255255255224
auto eth0:5
iface eth0:5 inet static
address 666131
netmask 255255255224
更多ip也类似配置即可。
配置文件完成后,用命令 /etc/initd/networking restart 重启网络,不需要reboot重启服务器。 /etc/initd/networking restart 重启网络的时候,如果你的配置文件有错误,那么他会提示你。比如IP重复了,书写错误了,等等。在执行此命令前,一定要小心检查interfaces配置文件,不然可能就把网络弄瘫痪,那时候就需要机房的工作人员去处理,十分麻烦。
/etc/initd/networking restart错误分析案例:
root@>

欢迎分享,转载请注明来源:内存溢出

原文地址: http://www.outofmemory.cn/zz/13508839.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-08-21
下一篇 2023-08-21

发表评论

登录后才能评论

评论列表(0条)

保存