ITPub博客

首页 > Linux操作系统 > Linux操作系统 > centos nfs(五)

centos nfs(五)

原创 Linux操作系统 作者:wisdomone1 时间:2010-04-16 11:09:48 0 删除 编辑
    centos nfs学习系列已到第五回了,前四回(节)相关链接,请参考:
centos nfs前四节

    本节主要讲述如何启动与停止nfs的相关服务

Starting and Stopping NFS
  启动和停止nfs


To run an NFS server, the portmap service must be running. To verify that portmap is active,
type the following command as root:
/sbin/service portmap status  ---验证portmap服务状态


If the portmap service is running, then the nfs service can be started. To start an NFS server,
as root type:
/sbin/service nfs start   ---启动nfs服务,记得以root用户哟


Note
nfslock also has to be started for both the NFS client and server to function
properly. To start NFS locking as root type: /sbin/service nfslock start. If
NFS is set to start at boot, please ensure that nfslock also starts by running
chkconfig --list nfslock. If nfslock is not set to on, this implies that you will
need to manually run the /sbin/service nfslock start each time the
computer starts. To set nfslock to automatically start on boot, type the following
command in a terminal chkconfig nfslock on.
    为了nfs功能运行正常,nfslock在nfs client和server两端也要启动。
如果nfslock未启动,可以用service nfslock start来启动它。假如在系统启动没有自动启动nfslock服务,可以手工运行service nfslock start
或者chkconfig nfslock on


To stop the server, as root, type:  ---停止nfs 服务
 

/sbin/service nfs stop  --停止nfs,这是一种用于变更nfs配置文件快速生效的方式
The restart option is a shorthand way of stopping and then starting NFS. This is the most
efficient way to make configuration changes take effect after editing the configuration file for
NFS.
To restart the server, as root, type:
/sbin/service nfs restart   ---重启nfs


The condrestart (conditional restart) option only starts nfs if it is currently running. This option
is useful for scripts, because it does not start the daemon if it is not running.
To conditionally restart the server, as root, type:
  /sbin/service nfs condrestart 
    condrestart选项,用于假如目前nfs已经在运行,仅仅启动nfs.对于脚本非常有用,因为它并不启动没有运行的进程

To reload the NFS server configuration file without restarting the service, as root, type:
/sbin/service nfs reload  ---不用重启nfs 服务,重载nfs server的配置文件


来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/9240380/viewspace-659899/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: centos nfs(四)
下一篇: centos nfs(六)
请登录后发表评论 登录
全部评论
提供针对oracle初学者及进阶的数据库培训,欢迎大家咨询: 微信: wisdomone 微信公众号: lovedb 工作经历: 中国普天 北京科蓝 北京云和恩墨 北京神州新桥

注册时间:2008-04-04

  • 博文量
    2189
  • 访问量
    12690170