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 FTP user.
anon_uploa

本文详细介绍了如何在Deepin操作系统上通过安装VSFTPD和配置nginx来搭建文件服务器。首先创建用户并安装VSFTPD,然后安装必要的依赖库和nginx,完成nginx的基本配置。最后,通过上传图片并成功访问验证了配置的成功。
最低0.47元/天 解锁文章
1321

被折叠的 条评论
为什么被折叠?



