当前位置:网站首页>ftp服务器、nfs服务器的搭建和使用
ftp服务器、nfs服务器的搭建和使用
2022-07-28 03:57:00 【hgswnsa】
提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档
文章目录
文件服务器
文件服务器的作用:网络上上传和下载文件、集中管理、分享
ftp服务器搭建
ftp:可以实现Windows和Linux文件共享,实现文件的上传和下载
步骤:
1.查看系统环境
2.安装软件vsftpd
3.启动vsftpd服务
4.访问ftp服务器
1.查看系统环境
cat /etc/centos-release
2.安装软件vsftpd
vsftpd 即 very secure ftp deamonyum install vsftpd -y
3.启动vsftpd服务
service vsftpd start
4.访问ftp服务器
在浏览器中输入 ftp://你的ip地址,如:ftp://192.168.253.130
如果访问不到,可能是防火墙没关 或者是浏览器访问不到,能访问到的浏览器:360浏览器、搜狗浏览器

ftp服务器的使用
安装两个客户端的命令,用来登录ftp服务的yum install ftp lftp -y
nfs服务器的搭建
nfs:主要是实现Linux和Linux之间的文件共享,一般在局域网中使用
步骤:
1.安装软件
2.启动服务
3.修改配置文件,共享/share
1.安装软件
yum install nfs-utils -y
2.启动服务
service nfs start
3.修改配置文件,共享/share
# 创建一个共享文件夹,新建一些文件
[[email protected] ~]# mkdir /share
[[email protected] ~]# cd /share/
[[email protected] share]# touch xxx yyds yyjc
[[email protected] share]# ls
xxx yyds yyjc
# 修改配置文件,共享给192.168.2.1~192.168.2.254,共享的文件夹为/share
[[email protected] share]# vim /etc/exports
[[email protected] share]# cat /etc/exports
/share 192.168.2.0/24(rw)
# 刷新配置,重启nfs服务
[[email protected] share]# exportfs -rv
exporting 192.168.2.0/24:/share
[[email protected] share]# service nfs restart
Redirecting to /bin/systemctl restart nfs.service

nfs服务器的使用
在另外一台机器上操作
1.安装nfs-utils
yum install nfs-utils -y

2.挂载到/mnt下
mount 192.168.2.170:/share /mnt
这里的ip地址是你之前的那台机器的ip地址
使用 df -Th 命令查看是否挂载上去了
切换到 /mnt目录,可以看到/share文件夹下的文件
总结
ftp:可以实现Windows和Linux文件共享,实现文件的上传和下载
nfs:主要是实现Linux和Linux之间的文件共享,一般在局域网中使用
边栏推荐
- Greed 122. The best time to buy and sell stocks II
- Build an "industrial brain" and improve the park's operation, management and service capabilities with "digitalization"!
- Dynamic planning - 62. Different paths
- Greedy - 53. Maximum subarray sum
- 高等数学(第七版)同济大学 习题3-6 个人解答
- Error no matching function for call to 'std:: exception:: exception (const char [15])' problem solving
- C语言:不创建临时变量实现两数交换
- cookie与Session
- Common weak network testing tools
- Do you regret doing automated testing?
猜你喜欢

After 95, Alibaba P7 published the payroll: it's really heartbreaking

Advanced Mathematics (Seventh Edition) Tongji University exercises 3-6 personal solutions

In December, the PMP Exam adopted the new syllabus for the first time. How to learn?

Common weak network testing tools

Basic knowledge of day08 redis

高等数学(第七版)同济大学 习题3-6 个人解答

Iterator function operation of iterator learning

Read Plato farm's eplato and the reason for its high premium

LabVIEW loads and uses custom symbols in tree control projects

常用的弱网测试工具
随机推荐
LightPicture – 精致图床系统
搬家通知!
Differences among BRD, MRD and PRD
[openvx] VX for basic use of objects_ lut
Greed 122. The best time to buy and sell stocks II
servlet使用
It's amazing. This article completely explains the service interface testing
pip-script. py‘ is not present Verifying transaction: failed
Dynamic planning - 1049. Weight of the last stone II
WordPress simple mkblog blog theme template v2.1
ES6 from getting started to mastering 09: symbol type
In the official online CV2 document, check the optional values of OpenCV specific parameters
Capacity expansion and reduction of RBD block storage device (VI)
Appnium--APP自动化测试工具
Monotonous stack -- 42. Receiving rain -- a difficult problem that big factories must know
Iterator function operation of iterator learning
How to solve MySQL deep paging problem
conda虚拟环境总结与解读
[force deduction] 1337. Row K with the weakest combat effectiveness in the matrix
ES6 from entry to mastery 07: Deconstruction assignment