当前位置:网站首页>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之间的文件共享,一般在局域网中使用
边栏推荐
- Monotonic stack - 739. Daily temperature
- 离职前一定要做好这7件事情,少一件都很麻烦。
- WordPress简约mkBlog博客主题模板v2.1
- Selenium--WEB自动化测试工具
- 【无标题】
- TypeError: ufunc ‘bitwise_ and‘ not supported for the input types, and the inputs could not be safely
- LeetCode 0141. 环形链表 - 三种方法解决
- Leetcode skimming: dynamic programming 08 (segmentation and subsets)
- [image classification] 2021 MLP mixer nips
- 构建“产业大脑”,以“数字化”提升园区运营管理及服务能力!
猜你喜欢

Selenium--WEB自动化测试工具

程序人生 | 测试工程师还只会点点点?7个捷径教给你快速学习新技术...

LabVIEW loads and uses custom symbols in tree control projects

8000 word explanation of OBSA principle and application practice

Dynamic planning - 62. Different paths

一名合格的软件测试工程师,应该具备哪些技术能力?

C language: find the number of 1 in binary stored in memory as an integer

servlet使用

Capacity expansion and reduction of RBD block storage device (VI)

Crowdfunding platform system based on JSP & Servlet
随机推荐
Advanced Mathematics (Seventh Edition) Tongji University exercises 3-5 personal solutions
【无标题】
数据挖掘-02
Interview essential skills: SQL query special training!
CV2. Threshold(), CV2. Findcontours(), CV2. Findcontours image contour processing
cookie与Session
Crowdfunding platform system based on JSP & Servlet
In depth introduction to sap ui5 fileuploader control - why do you need a hidden iframe trial
pip-script. py‘ is not present Verifying transaction: failed
Leetcode 0141. circular linked list - three solutions
Jumping game II in question 45 of C language power deduction. Ergodic jump
Differences among BRD, MRD and PRD
LeetCode 0140. 单词拆分 II
ES6 from getting started to mastering 09: symbol type
Which stock exchange has the lowest commission? Is it safe to open an account on your mobile phone
静态博客搭建工具汇总
un7.27:如何在idea中成功搭建若依框架项目?
[openvx] VX for basic use of objects_ convolution
Advanced Mathematics (Seventh Edition) Tongji University exercises 3-4 personal solutions (first 8 questions)
R notes mice