首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >centos部署ftp服务_文件服务器搭建

centos部署ftp服务_文件服务器搭建

作者头像
全栈程序员站长
发布于 2022-10-01 07:34:37
发布于 2022-10-01 07:34:37
1.8K00
代码可运行
举报
运行总次数:0
代码可运行

大家好,又见面了,我是你们的朋友全栈君。

Linux 搭建FTP服务器步骤详解

操作系统: Centos7.2

1. 安装vsftpd

  1. 安装vsftpd
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
# yum -y install vsftpd
Installed:
  vsftpd.x86_64 0:3.0.2-11.el7_2                                                                                                                                                                                                              
Dependency Installed:
  logrotate.x86_64 0:3.8.6-7.el7_2                                                                                                                                                                                                            
Complete!
  1. 查看vsftpd版本
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
# vsftpd -v
vsftpd: version 3.0.2

2. vsftpd.conf 配置

vsftpd配置文件的默认路径是 /etc/vsftpd/vsftpd.conf

如果想了解全部的FTP配置项请参考这里 全部配置项

完整配置

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
#############################
##### 认证方式(虚拟用户模式) ####
#############################
#
# Controls whether anonymous logins are permitted or not. If enabled, both the usernames ftp and anonymous are recognised as anonymous logins. Default: YES
anonymous_enable=NO
#
# Controls whether local logins are permitted or not. If enabled, normal user accounts in /etc/passwd (or wherever your PAM config references) may be used to log in. This must be enable for any non-anonymous login to work, including virtual users. Default: NO
local_enable=YES
#
# This string is the name of the PAM service vsftpd will use.
pam_service_name=vsftpd
#
# If enabled, vsftpd will load a list of usernames, from the filename given by userlist_file. If a user tries to log in using a name in this file, they will be denied before they are asked for a password. This may be useful in preventing cleartext passwords being transmitted. See also userlist_deny. Default: NO
userlist_enable=YES
#
# This option is examined if userlist_enable is activated. If you set this setting to NO, then users will be denied login unless they are explicitly listed in the file specified by userlist_file. When login is denied, the denial is issued before the user is asked for a password. Default: YES
userlist_deny=NO
#
# This option is the name of the file loaded when the userlist_enable option is active.
# Default: /etc/vsftpd.user_list
userlist_file=/etc/vsftpd/user_list
#############################
########## 用户权限 ##########
#############################
#
# This controls whether any FTP commands which change the filesystem are allowed or not. These commands are: STOR, DELE, RNFR, RNTO, MKD, RMD, APPE and SITE. Default: NO
write_enable=YES
#
# The value that the umask for file creation is set to for local users. NOTE! If you want to specify octal values, remember the "0" prefix otherwise the value will be treated as a base 10 integer! Default: 077
# 022 is used by most other ftpd's
local_umask=022
#
# This powerful option allows the override of any config option specified in the manual page, on a per-user basis. Usage is simple, and is best illustrated with an example. If you set user_config_dir to be /etc/vsftpd_user_conf and then log on as the user "chris", then vsftpd will apply the settings in the file /etc/vsftpd_user_conf/chris for the duration of the session. The format of this file is as detailed in this manual page! PLEASE NOTE that not all settings are effective on a per-user basis. For example, many settings only prior to the user's session being started. Examples of settings which will not affect any behviour on a per-user basis include listen_address, banner_file, max_per_ip, max_clients, xferlog_file, etc.
user_config_dir=/etc/vsftpd/virtual_user
#
# If set to YES, anonymous users will be permitted to upload files under certain conditions. For this to work, the option write_enable must be activated, and the anonymous ftp user must have write permission on desired upload locations. This setting is also required for virtual users to upload; by default, virtual users are treated with anonymous (i.e. maximally restricted) privilege. Default: NO
anon_upload_enable=YES
#
# If set to YES, anonymous users will be permitted to create new directories under certain conditions. For this to work, the option write_enable must be activated, and the anonymous ftp user must have write permission on the parent directory. Default: NO
anon_mkdir_write_enable=YES
#
# If set to YES, anonymous users will be permitted to perform write operations other than upload and create directory, such as deletion and renaming. This is generally not recommended but included for completeness. Default: NO
anon_other_write_enable=YES
#
#############################
########## 日志配置 ##########
#############################
#
# If enabled, a log file will be maintained detailling uploads and downloads. By default, this file will be placed at /var/log/vsftpd.log, but this location may be overridden using the configuration setting vsftpd_log_file.
# Default: NO (but the sample config file enables it)
xferlog_enable=YES
#
# If enabled, the transfer log file will be written in standard xferlog format, as used by wu-ftpd. This is useful because you can reuse existing transfer statistics generators. The default format is more readable, however. The default location for this style of log file is /var/log/xferlog, but you may change it with the setting xferlog_file. Default: NO
xferlog_std_format=NO
#
# This option is the name of the file to which we write the wu-ftpd style transfer log. The transfer log is only written if the option xferlog_enable is set, along with xferlog_std_format. Alternatively, it is written if you have set the option dual_log_enable. Default: /var/log/xferlog
xferlog_file=/var/log/xferlog
#
# If enabled, two log files are generated in parallel, going by default to /var/log/xferlog and /var/log/vsftpd.log. The former is a wu-ftpd style transfer log, parseable by standard tools. The latter is vsftpd's own style log. Default: NO
dual_log_enable=YES
#
# When enabled, all FTP requests and responses are logged, providing the option xferlog_std_format is not enabled. Useful for debugging. Default: NO
log_ftp_protocol=YES
#
#This option is the name of the file to which we write the vsftpd style log file. This log is only written if the option xferlog_enable is set, and xferlog_std_format is NOT set. Alternatively, it is written if you have set the option dual_log_enable. One further complication - if you have set syslog_enable, then this file is not written and output is sent to the system log instead.
# Default: /var/log/vsftpd.log
vsftpd_log_file=/export/Logs/vsftpd/vsftpd.log
#
#############################
########## 交互设置 ##########
#############################
#
# You may fully customise the login banner string:
ftpd_banner=Welcome to FTP service.
#
# If enabled, users of the FTP server can be shown messages when they first enter a new directory. By default, a directory is scanned for the file .message, but that may be overridden with the configuration setting message_file.
# Default: NO (but the sample config file enables it)
dirmessage_enable=YES
#
# If enabled, vsftpd will display directory listings with the time in your local time zone. The default is to display GMT. The times returned by the MDTM FTP command are also affected by this option. Default: NO
use_localtime=YES
#
# If set to YES, local users will be (by default) placed in a chroot() jail in their home directory after login. Warning: This option has security implications, especially if the users have upload permission, or shell access. Only enable if you know what you are doing. Note that these security implications are not vsftpd specific. They apply to all FTP daemons which offer to put local users in chroot() jails. Default: NO
# chroot_local_user=NO
#
# If activated, you may provide a list of local users who are placed in a chroot() jail in their home directory upon login. The meaning is slightly different if chroot_local_user is set to YES. In this case, the list becomes a list of users which are NOT to be placed in a chroot() jail. By default, the file containing this list is /etc/vsftpd.chroot_list, but you may override this with the chroot_list_file setting. Default: NO
chroot_list_enable=YES
#
# The option is the name of a file containing a list of local users which will be placed in a chroot() jail in their home directory. This option is only relevant if the option chroot_list_enable is enabled. If the option chroot_local_user is enabled, then the list file becomes a list of users to NOT place in a chroot() jail. Default: /etc/vsftpd.chroot_list
chroot_list_file=/etc/vsftpd/chroot_list
#
# Have no idea if still available!
allow_writeable_chroot=YES
#
#############################
########## 连接设置 ##########
#############################
#
## 指令连接
#
# If enabled, vsftpd will run in standalone mode. This means that vsftpd must not be run from an inetd of some kind. Instead, the vsftpd executable is run once directly. vsftpd itself will then take care of listening for and handling incoming connections. Default: YES
listen=YES
#
# If vsftpd is in standalone mode, this is the port it will listen on for incoming FTP connections.
listen_port=21
#
# If enabled, and vsftpd was compiled with tcp_wrappers support, incoming connections will be fed through tcp_wrappers access control. Furthermore, there is a mechanism for per-IP based configuration. If tcp_wrappers sets the VSFTPD_LOAD_CONF environment variable, then the vsftpd session will try and load the vsftpd configuration file specified in this variable.
tcp_wrappers=YES
#
# If vsftpd is in standalone mode, this is the maximum number of clients which may be connected. Any additional clients connecting will get an error message.
max_clients=0
#
# If vsftpd is in standalone mode, this is the maximum number of clients which may be connected from the same source internet address. A client will get an error message if they go over this limit.
max_per_ip=0
#
# The timeout, in seconds, which is the maximum time a remote client may spend between FTP commands. If the timeout triggers, the remote client is kicked off.
idle_session_timeout=300
#
## 数据连接
### PORT模式:主动模式
# The port from which PORT style connections originate (as long as the poorly named connect_from_port_20 is enabled).
ftp_data_port=20
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# The timeout, in seconds, for a remote client to respond to our PORT style data connection.
connect_timeout=60
#
### 被动模式
#
# Set to NO if you want to disallow the PASV method of obtaining a data connection. Default: YES
pasv_enable=YES
#
# The maximum port to allocate for PASV style data connections. Can be used to specify a narrow port range to assist firewalling.
pasv_max_port=61000
#
# The minimum port to allocate for PASV style data connections. Can be used to specify a narrow port range to assist firewalling.
pasv_min_port=60000
#
# The timeout, in seconds, for a remote client to establish connection with a PASV style data connection.
accept_timeout=60
#
# The timeout, in seconds, which is roughly the maximum time we permit data transfers to stall for with no progress. If the timeout triggers, the remote client is kicked off.
data_connection_timeout=300

配置文件中的目录|文件需要手动创建。

3. 认证方式:虚拟用户模式

3.1 建立本地映射用户并设置主目录权限

创建 edi 分组,分组下创建 edi 用户(注意此 edi 用户与FTP虚拟用户 edi 不同,此处的 edi 用户为Linux用户);为edi用户设置主目录 /home/vsftpsite 。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
# groupadd edi
# useradd –d /home/vftpsite –s /sbin/nologin edi
# usermod -G edi edi

新建chroot_list文件,添加用户 edi 。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
# vi chroot_list
edi

3.2 添加虚拟用户口令文件(/etc/vsftpd/vftpuser.txt)

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
# vi vftpuser.txt
# 奇数行为用户名、偶数行为密码
edi # 用户名
edi # 密码

3.3 生成虚拟用户口令认证文件

将刚添加的vftpuser.txt虚拟用户口令文件转换成系统识别的口令认证文件。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
db_load -T -t hash -f vftpuser.txt vftpuser.db

3.4 编辑vsftpd的PAM认证文件

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
# vi /etc/pam.d/vsftpd
#%PAM-1.0
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
session    required     pam_loginuid.so
session    include      password-auth
# 新增以下两行代码
auth required pam_userdb.so db=/etc/vsftpd/vftpuser
account required pam_userdb.so db=/etc/vsftpd/vftpuser

3.5 添加虚拟用户的ftp配置

在/etc/vsftpd/ 目录下新建 virtual_user 目录,新建 edi(与虚拟用户同名) 文件,进行用户级别设置。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
# vi /etc/vsftpd/virtual_user/edi
guest_enable=YES
guest_username=edi		# 这里的edi是Linux本地用户
anon_world_readable_only=NO
anon_upload_enable=YES
anon_other_write_enable=YES
anon_mkdir_write_enable=YES

3.6 添加用户到 user_list

只有添加到 user_list 的用户才有权访问 ftp 服务器

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
# vi user_list
# If userlist_deny=YES (default), never allow users in this file, and
# do not even prompt for a password.
# Note that the default vsftpd pam config also checks /etc/vsftpd/ftpusers
# for users that are denied.
edi
test

3.7 重新启动 vsftpd 服务

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
# service vsftpd restart

4. 网络配置

如果需要对外网提供FTP服务,需要进行相关的网络配置。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
-A PREROUTING -d pub_ip -p tcp -m multiport --dport 60000:61000 -i eth0 -j DNAT --to-destination ftp-server-ip
-A PREROUTING -d pub_ip -p tcp --dport 21 -j DNAT --to-destination ftp-server-ip:21
-A PREROUTING -d pub_ip -p tcp --dport 20 -j DNAT --to-destination ftp-server-ip:20
-A POSTROUTING -s ftp-server-ip -o eth0 -j SNAT --to-source pub_ip

5. FTP 服务验证

FTP客户端使用的是mac。

5.1 登录验证

可以通过FTP客户端工具或 ftp 命令访问FTP服务。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
$ ftp 
ftp> open ftp-server-ip
Connected to ftp-server-ip.
220 Hello...
Name (ftp-server-ip:local-user): edi
331 Please specify the password.
Password: 
230 Login successful.
ftp> 

5.2 文件查询

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
ftp> ls
200 PORT command successful. Consider using PASV.
150 Here comes the directory listing.
226 Directory send OK.
ftp> 

执行 ls 命令,默认使用哪个 PORT 模式(主动模式),如果想切换到被动模式可以执行 passive 命令。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
ftp> passive
Passive mode on.
ftp> passive
Passive mode off.

使用被动模式结果展示

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
ftp> ls
227 Entering Passive Mode (10,170,143,242,237,175)
150 Here comes the directory listing.
226 Directory send OK.

5.3 文件上传

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
ftp> put /export/x509-certificate.der /x509-certificate.der
227 Entering Passive Mode (10,170,143,242,235,205)
553 Could not create file.

553 Could not create file. 检查是否有文件操作权限。 在 ftp 服务器端,我们使用root用户创建的 /home/vftpsite 文件夹,通过客户端访问 ftp 时实际上我们使用的是Linux本地用户 edi 。在服务器端执行以下命令变更文件夹拥有人。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
chown edi.edi /home/vftpsite/

再次执行上传命令

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
ftp> put /export/x509-certificate.der /x509-certificate.der
227 Entering Passive Mode (10,170,143,242,237,227)
150 Ok to send data.
226 Transfer complete.
874 bytes sent in 0.00547 seconds (156 kbytes/s)
ftp> ls
227 Entering Passive Mode (10,170,143,242,237,89)
150 Here comes the directory listing.
-rw-------    1 1002     1002          874 Sep 30 16:53 x509-certificate.der
226 Directory send OK.
ftp> 

5.4 文件下载

FTP服务支持两种传输模式 字符模式(ASCII)和二进制模式(Binary)。默认是ASCII模式,如果上传非文本文件需要使用二进制模式,由于服务器未启用ASCII模式,所以所有的上传下载均以二进制模式进行。

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
ftp> get /x509-certificate.der /export/x509-certificate-local.der
227 Entering Passive Mode (10,170,143,242,234,175)
150 Opening BINARY mode data connection for /x509-certificate.der (874 bytes).
226 Transfer complete.
874 bytes received in 0.000287 seconds (2.9 Mbytes/s)
ftp> 
ftp> !ls /export
x509-certificate-local.der
x509-certificate.der

6. 创建 FTP 虚拟用户脚本

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
#!/bin/bash
# Argument 
# dir: new directory; username: user name; password: password
if [ $# -lt 3 ];then
echo "error, need 3 arguments:dir, username and password."
exit
fi
# variable definiton
# arguments
dir=$1
username=$2
pwd=$3
# linux local vitural user
local_vuser='edi.edi'
# ftp virtual user store file
user_file='vftpuser.txt'
# ftp virtual user store database
user_db='vftpuser.db'
# data storage base directory
dir_base='/home/vftpsite'
# user-specific configuration store directory
dir_vuser='virtual_user'
# write ftp virtual user/pass to user file and change to db
echo $username>>/etc/vsftpd/$user_file
echo $pwd>>/etc/vsftpd/$user_file
db_load -T -t hash -f $user_file $user_db
# create directory - change owner to local virtual user
mkdir $dir_base/$dir
chown -R $local_vuser $dir_base/$dir
# add ftp virtural user configuration
cat >/etc/vsftpd/$dir_vuser/$username<<EOF local_root=$dir_base/$dir guest_enable=YES guest_username=edi anon_world_readable_only=NO EOF
# add user to user_list file
echo $username>>/etc/vsftpd/user_list
# create default sub-directory
cd $dir_base/$dir
mkdir po ro sc share
chown -R $local_vuser $dir_base/$dir
echo "Configuration successful."

参考

Vsftpd文件传输服务(三种认证模式:匿名开放 、本地用户、虚拟用户) [PAM (简体中文)](https://wiki.archlinux.org/index.php/PAM_(%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87) 详解Linux中/etc/passwd文件 db_load 两种方式建立Vsftpd虚拟用户 mac ftp命令安装即使用

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员栈长,转载请注明出处:https://javaforall.cn/194702.html原文链接:https://javaforall.cn

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2022年9月12日 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
SpringMVC的架构有什么优势?——控制器(一)
控制器是Spring MVC中最重要的组件之一,它处理来自客户端的请求并返回响应。控制器通常使用注解或XML配置方式将请求映射到处理方法上。 控制器(Controller)是Spring MVC中最重要的组件之一,它负责接收来自客户端的请求并执行相应的业务逻辑,并将结果返回给客户端。Spring MVC框架提供了多种方式来实现控制器,其中最常用的方式是使用注解或XML配置方式将请求映射到处理方法上。
一只
2024/07/02
2850
SpringMVC的架构有什么优势?——控制器(一)
杨校老师项目之基于SSM企业物流快递配送管理系统
分享是快乐的,也见证了个人成长历程,文章大多都是工作经验总结以及平时学习积累,基于自身认知不足之处在所难免,也请大家指正,共同进步。
杨校
2022/05/07
4020
杨校老师项目之基于SSM企业物流快递配送管理系统
SpringMVC框架介绍[通俗易懂]
1、前端控制器DispatcherServlet(不需要程序员开发) 作用接收请求,响应结果,相当于转发器,中央处理器。 有了DispatcherServlet减少了其它组件之间的耦合度。
全栈程序员站长
2022/09/06
1.3K0
SpringMVC框架介绍[通俗易懂]
SSM框架(spring+springmvc+mybatis)+Mysql实现的高校运动会管理系统(角色分为管理员和普通用户 功能包含普通学生老师参赛、开幕广播
本系统为了解决高校运动会复杂流程的管理,通过分学生、教师、管理员端,实现了管理员对器材、用户、项目、院系、班级、学生、教师、成绩等管理,普通用户端可以查看运动会项目信息、可以选择参赛,极大的提升了运动会线下组织和沟通人员的繁琐。
用户6334815
2022/07/24
7811
SSM框架(spring+springmvc+mybatis)+Mysql实现的高校运动会管理系统(角色分为管理员和普通用户 功能包含普通学生老师参赛、开幕广播
Spring MVC控制器的14个技巧
这是创建可以处理一个或多个请求的控制器类的最简单方法。仅通过用构造型注释一个类@Controller ,例如:
程序员小假
2025/04/19
2260
Spring+SpringMvc+Mybatis框架集成搭建教程三(框架整合测试程序开发)
(2).在main文件夹下的java源文件夹下创建com.hafiz.www包,并在该包下依次创建:
阿豪聊干货
2018/08/09
3420
Spring+SpringMvc+Mybatis框架集成搭建教程三(框架整合测试程序开发)
抛开深层次底层,快速入门SpringMVC
SpringMVC主要有三个核心部分组成,DispatcherServlet、Controller、ViewResolver。      DispatcherServlet:      请求输入时:类似于一个带分配功能的Filter,其直接与前端交互,并截所有符合 url-pattern 的请求,并根据Mapping路径分发给处理对应请求的Controller。      请求处理完毕时:将ViewResolver渲染好的视图回传给前端。      Controller:      处理Http传来的请求,通常调用Service,再在Service中调用Dao持久层进行完整的数据处理,并将处理完毕的数据返回,返回以ModelAndView的形式,Model,通俗来讲,就是承载数据的一个HashMap,而View则是数据要发送的逻辑视图名,如果View缺省,默认是转发到HTTP发起的页面。      ViewResolver:      根据Controller处理好的数据,对指定目录下的文件进行渲染解析,完毕后将视图(不一定为页面、可能是Joson、Map各种数据类型,这根据Controller回传的数据决定)返回给DispatcherServlet。
Rekent
2018/09/04
5320
抛开深层次底层,快速入门SpringMVC
分享 14 个 Spring MVC 顶级技巧!
通常,在Spring MVC中,我们编写一个控制器类来处理来自客户端的请求。然后,控制器调用业务类来处理与业务相关的任务,然后将客户端重定向到逻辑视图名称,该名称由Spring的调度程序Servlet解析,以呈现结果或输出。
Java技术栈
2020/03/10
1.2K0
SpringMVC 常用注解
1、@Controller      @Controller 用于标记在一个类上,使用它标记的类就是一个SpringMVC Controller 对象。分发处理器将会扫描使用了该注解的类的方法,并检测该方法是否使用了@RequestMapping 注解。@Controller 只是定义了一个控制器类,而使用@RequestMapping 注解的方法才是真正处理请求的处理器。      @Controller 标记在一个类上还不能真正意义上的说它就是SpringMVC 的一个控制器类,因为这个时候Spring
二十三年蝉
2018/02/28
4.5K0
Java基于ssm框架的restful应用开发
Java基于ssm框架的restful应用开发 好几年都没写过java的应用了,这里记录下使用java ssm框架、jwt如何进行rest应用开发,文中会涉及到全局异常拦截处理、jwt校验、token拦截器等内容。 1、jwt工具类 直接贴代码了,主要包括jwt的sign、verify、decode三个方法,具体实现如下: package com.isoft.util; import java.util.Date; import com.auth0.jwt.JWT; import com.auth0.j
用户1141560
2018/05/28
7050
SpringMVC的架构有什么优势?——视图与模型(二)
视图是展示结果的组件,它们负责渲染模型数据并生成HTML输出。Spring MVC支持多种视图技术,包括JSP、Thymeleaf等。 视图(View)是Spring MVC中渲染并呈现结果的组件,它们负责将模型数据渲染成HTML输出。Spring MVC支持多种视图技术,包括JSP、Freemarker、Velocity和Thymeleaf等。下面我们将深入探讨Spring MVC视图的核心概念和相应Java代码示例。
一只
2024/07/02
2710
BS1064-基于大数据存储实现互联网电子商城网站及数据分析系统
本基于大数据存储实现互联网电子商城网站及数据分析系统,系统主要采用java,hbase,springboot,mysql,mybatis,商品推荐算法,数据分析存储技术,实现基于互联网商品实现针对用户购买推荐,
计算机程序优异哥
2023/09/18
2260
BS1064-基于大数据存储实现互联网电子商城网站及数据分析系统
springmvc rest风格化案例
RESTful(RESTful Web Services)一种架构风格,表述性状态转移,它不是一个软件,也不是一个标准,而是一种思想,不依赖于任何通信协议,但是开发时要成功映射到某协议时也需要遵循其标准,但不包含对通信协议的更改
张哥编程
2024/12/17
1080
系统学习javaweb-13-SpringMVC+Hibernate
名称:SpringMVC+Hibernate 说明:分为注解版和XML版本,注解版较完善
csxiaoyao
2019/02/20
7840
Spring MVC 学习总结(九)——Spring MVC实现RESTful与JSON(Spring MVC为前端提供服务)
 很多时候前端都需要调用后台服务实现交互功能,常见的数据交换格式多是JSON或XML,这里主要讲解Spring MVC为前端提供JSON格式的数据并实现与前台交互。RESTful则是一种软件架构风格、
张果
2018/01/04
2.3K0
Spring MVC 学习总结(九)——Spring MVC实现RESTful与JSON(Spring MVC为前端提供服务)
SpringMVC传递模型数据到视图
要求:处理方法返回值类型为 ModelAndView。在方法体中我们通过该ModelAndView对象添加模型数据。
Tim在路上
2020/08/04
1.1K0
分布式事务 TCC-Transaction 源码分析 —— 运维平台
1. 概述 本文分享 运维平台。TCC-Transaction 提供了相对精简的运维平台,用于查看在《TCC-Transaction 源码分析 —— 事务存储器》提到的事务存储。目前暂时只有两个功能:
芋道源码
2018/03/27
8550
分布式事务 TCC-Transaction 源码分析 —— 运维平台
Maven工程搭建spring boot+spring mvc+JPA
1、maven工程,少不了pom.xml,spring boot的引入可参考官网:
JQ实验室
2022/02/09
4980
SpringMVC 后台跳转总结大全
很久不使用了,可以拿代码复制到项目工程下作为Demo随时查看,小白入门开发必备!!!
静谧星空TEL
2021/04/27
7340
SpringMVC+Mybatis整合的增删改查
项目文件下载地址:http://download.csdn.net/detail/u010634066/8188965
石臻臻的杂货铺[同名公众号]
2021/07/14
3580
推荐阅读
相关推荐
SpringMVC的架构有什么优势?——控制器(一)
更多 >
LV.1
广州前端开发
目录
  • Linux 搭建FTP服务器步骤详解
  • 1. 安装vsftpd
  • 2. vsftpd.conf 配置
  • 3. 认证方式:虚拟用户模式
    • 3.1 建立本地映射用户并设置主目录权限
    • 3.2 添加虚拟用户口令文件(/etc/vsftpd/vftpuser.txt)
    • 3.3 生成虚拟用户口令认证文件
    • 3.4 编辑vsftpd的PAM认证文件
    • 3.5 添加虚拟用户的ftp配置
    • 3.6 添加用户到 user_list
    • 3.7 重新启动 vsftpd 服务
  • 4. 网络配置
  • 5. FTP 服务验证
    • 5.1 登录验证
    • 5.2 文件查询
    • 5.3 文件上传
    • 5.4 文件下载
  • 6. 创建 FTP 虚拟用户脚本
  • 参考
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档