linux NFS 服务器的安装
1. 安装 nfs 服务
[root@allentuns ~]# yum -y install nfs-utils rpcbind
2. 启动 nfs 服务
[root@allentuns ~]# /etc/init.d/rpcbind start
Starting rpcbind: [ OK ]
[root@allentuns ~]# /etc/init.d/nfs start
Starting NFS services: [ OK ]
Starting NFS mountd: [ OK ]
Starting NFS daemon: [ OK ] Starting RPC idmapd: [ OK ]
3. 创建共享目录
[root@allentuns ~]# mkdir -pv /web/htdocs mkdir: created directory `/web'
mkdir: created directory `/web/htdocs'
[root@allentuns ~]# ll -d /web/htdocs/ 50
drwxr-xr-x. 2 root root 4096 May 3 18:50 /web/htdocs/
4. 添加共享目录其它用户有写权限 [root@allentuns ~]# chmod o+w /web/htdocs [root@allentuns ~]# ll -d /web/htdocs/
drwxr-xrwx. 2 root root 4096 May 3 18:50 /web/htdocs/
5. 修改配置文件,设置共享目录或者分区
[root@allentuns ~]# vim /etc/exports
#增加一行
/web/htdocs 192.168.1.5(rw)
6. 重读 exports 文件,使立刻生效
[root@allentuns ~]# exportfs -r
7. 查看服务器共享的文件。前提需要域名解析,否则报错
[root@allentuns ~]# uname -n
allentuns
[root@allentuns ~]# echo "127.0.0.1 allentuns" >> /etc/hosts
[root@allentuns ~]# showmount -e
Export list for allentuns:
/web/htdocs 192.168.1.5
相关文章
- 【Linux驱动】linux内核模块简介
- [Linux] ubuntu 安装 Wireshark
- linux上安装Docker(非常简单的安装方法)
- linux - mysql:查看 mysql 是否安装成功
- ArcGIS 10.1 for Server安装教程系列—— Linux下的单机安装
- linux安装jdk1.6
- linux下apache服务器的安装、启动、查看
- Linux Shell脚本自动化编程实战- while、until循环
- EasyRTMP实现的一套简单、高效、易用的全平台(Windows/Linux/ARM/Android/iOS)RTMP直播推送库
- linux服务器下安装phpstudy 如何命令行进入mysql
- linux:ubuntu21.04安装maven(maven 3.8.2)
- linux(centos8):centos8.1安装(详细过程/图解)(vmware fusion/CentOS-8.1.1911-x86_64)
- Linux系统centos下Nodejs安装方法
- Linux系统编程手册 错误 undefined reference to `usageErr‘ errExit errExit getLong cmdLineErr collect2: erro
- L75.linux命令每日一练 -- 第11章 Linux系统管理命令 -- lsof和uptime
- L36.linux命令每日一练 -- 第五章 Linux信息显示与搜索文件命令 -- locate和updatedb
- DNF 下载软件包而不在 Linux 上安装
- windows 7 与linux 双系统 安装
- linux安装tomcat
- (转载)linux那点事儿(上)
- Linux CentOS7 安装FTP服务器
- 【Deepin 20系统】Linux系统安装Anaconda和Tensorflow-gpu2.3
- Linux中删除、安装jdk
- Linux 安装及配置CentOS7
- Win:Win系统下安装Linux的Ubuntu系统的简介、安装之详细攻略
- 【已解决】Linux服务器安装JDK
- Java程序执行Linux命令
- 【K8S系列】第五讲:在 Linux 上安装 KubeSphere
- 使用串口重定向为服务器安装linux操作系统
- 【Linux入门篇】操作系统安装、网络配置
- 02 从头开始atac项目 ubuntu20 install r4.2 Linux系统环境配置 服务器版本的rstudio r install in linux /ubuntu/centos