deepin通过nginx+vsftpd搭建文件服务器

本文详细介绍了如何在Deepin操作系统上通过安装VSFTPD和配置nginx来搭建文件服务器。首先创建用户并安装VSFTPD,然后安装必要的依赖库和nginx,完成nginx的基本配置。最后,通过上传图片并成功访问验证了配置的成功。
摘要由CSDN通过智能技术生成

Deepin搭建文件服务器

前言

在项目中,需要使用到图片上传等功能,故考虑到自己搭建一个文件服务器,其中nginx用来对我们浏览器中的url解析,映射到linux上的指定目录上去;而vsftpd作为一个ftp服务器软件,能够提供传输文件的服务,服务器安装了vsftpd后,我们即可以很方便地进行不同主机之前的文件传输等。

VSFTPD的安装

apt-get install vsftpd

新建用户
useradd vsftpd
修改密码
passwd vsftpd
两次输入密码后成功

cd /home

mkdir vsftpd

vim /etc/vsftpd.conf

修改为如下:

# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
#
#
# Run standalone?  vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
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.
#listen_ipv6=YES
#
# Allow anonymous FTP? (Disabled by default).
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
#local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FT
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值