免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 5211 | 回复: 10
打印 上一主题 下一主题

[系统安装] 系统自启动服务和手动启动服务的区别 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2012-09-08 09:36 |只看该作者 |倒序浏览
在使用nfs的时候需要启动2个服务,在启动nfs服务的时候,如果使用chkconfig nfs on,启动的时候,系统无法启动mounted进程;在设置chkconfig --delete nfs之后,重启机器,使用/etc/init.d/nfs start,可以正常启动mounted进程,莫非这两个的启动有区别?
操作系统环境:redhat 6.2

论坛徽章:
0
2 [报告]
发表于 2012-09-08 09:57 |只看该作者
系统自启动服务和手动启动服务的区别

论坛徽章:
13
15-16赛季CBA联赛之同曦
日期:2016-01-28 19:52:032015亚冠之北京国安
日期:2015-10-07 14:28:19NBA常规赛纪念章
日期:2015-05-04 22:32:03处女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午马
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56狮子座
日期:2013-09-08 08:37:52
3 [报告]
发表于 2012-09-08 10:08 |只看该作者
本帖最后由 ulovko 于 2012-09-08 10:11 编辑
系统自启动服务和手动启动服务的区别

自动:顾名思义省事
手动:多数测试用、运行个一次两次


RPC(Remote Procedure Call) rpc.nfsd rpc.mountd rpc.lockd rpc.statd  --> mount是由RPC控制 而不是nfs

  1. > more nfs.txt
  2. # NFS (Network FileSystem)
  3. # NFS ==> nfs-utils
  4. RPC(Remote Procedure Call) rpc.nfsd rpc.mountd rpc.lockd rpc.statd
  5. # ===> ATTENTION: <===
  6. # Replace x with an unused port number
  7. vim /etc/sysconfig/nfs
  8. MOUNTD_PORT="x" STATD_PORT="x" LOCKD_TCPPORT="x" LOCKD_UDPPORT="x"

  9. #  To configure a firewall to allow NFS:
  10. 1.Allow TCP and UDP port 2049 for NFS.
  11. 2.Allow TCP and UDP port 111 (portmap/sunrpc).
  12. 3.Allow the TCP and UDP port specified with MOUNTD_PORT="x"
  13. 4.Allow the TCP and UDP port specified with STATD_PORT="x"
  14. 5.Allow the TCP port specified with LOCKD_TCPPORT="x"
  15. 6.Allow the UDP port specified with LOCKD_UDPPORT="x"
  16. RQUOTAD_PORT="4005"
  17. STATD_OUTGOING_PORT="4006"

  18. /etc/exports            (NFS file systems being exported (for Kernel based NFS)
  19. /usr/sbin/exportfs      (Maintain list of NFS exported file systems)
  20. /usr/sbin/showmount     (show mount information for an NFS server)
  21. /var/lib/nfs/etab       (Records the NFS shared Dir and Permission)
  22. /var/lib/nfs/xtab       (Client's connection records)
  23. /var/lib/nfs/*.tab

  24. # man exports   (Read the Specification)
  25. vim /etc/exports
  26. /tmp    192.168.0.0/24(ro)      localhost(rw,async)     *.example.com(ro,sync)
  27. /tmp    *(rw,root_squash)
  28. /home/public    192.168.0.0/24(rw)      *(ro)
  29. # all_squash ==> (Map all uids and gids to the anonymous user)
  30. cat /etc/passwd |egrep 'nobody|nfsnobody'
  31. nobody ==> 99
  32. nfsnobody ==> 65534
  33. /home/linux     *.example.com(rw,all_squash,anonuid=99,anongid=99,sync)
  34. # sample /etc/exports file
  35.        /               master(rw) trusty(rw,no_root_squash)
  36.        /projects       proj*.local.domain(rw)
  37.        /usr            *.local.domain(ro) @trusted(rw)
  38.        /home/joe       pc001(rw,all_squash,anonuid=150,anongid=100)
  39.        /pub            (ro,insecure,all_squash)

  40. /etc/init.d/portmap restart
  41. /etc/init.d/nfs restart
  42. /etc/init.d/nfslock restart
  43. rpcinfo -p localhost
  44. cat /var/lib/nfs/etab

  45. showmount -e localhost  
  46. exportfs -arv
  47. exportfs -auv
  48. exportfs -o async django:/usr/tmp
  49. mount -t nfs -o nosuid,noexec,nodev,bg,rw,soft 192.168.0.2:/home/public /home/nfs
  50. mount -t nfs 192.168.0.2:/home/public /home/nfs
  51. #chkconfig netfs on
  52. #service netfs restart
  53. vim /etc/fstab
  54. 192.168.0.2:/home/public        /home/nfs       nfs nosuid,noexec,nodev,bg,rw,soft,rsize=32768,wsize=32768      0 0

  55. # TCP Wrappers Control
  56. vim /etc/hosts.allow
  57. mountd,portmap: 192.168.0.0/255.255.255.0
  58. mountd: 192.168.0.

  59. # AutoMounter for NFS
  60. chkconfig autofs on
  61. service autofs restart
  62. vim /etc/auto.master
  63. /home/guests    /etc/auto.guests        --timeout=60
  64. cp /etc/auto.misc /etc/auto.guests
  65. vim /etc/auto.guests
  66. * -rw,soft,intr 192.168.1.1:/home/guests/&
  67. >
复制代码

论坛徽章:
0
4 [报告]
发表于 2012-09-08 10:09 |只看该作者
有区别吗?~~~~~~~`

论坛徽章:
0
5 [报告]
发表于 2012-09-08 10:39 |只看该作者
在我没有启动nfs的时候,portmap服务也没启动,这个时候是没有mounte进程的
当我启动了nfs的时候,mounted进程有了,当然,一般的启动顺序是先portmap,然后再nfs
但是这不就说明了mouted进程属于nfs?

回复 3# ulovko


   

论坛徽章:
0
6 [报告]
发表于 2012-09-08 10:43 |只看该作者
大哥,你的文档都是这样来记录的?

回复 3# ulovko


   

论坛徽章:
13
15-16赛季CBA联赛之同曦
日期:2016-01-28 19:52:032015亚冠之北京国安
日期:2015-10-07 14:28:19NBA常规赛纪念章
日期:2015-05-04 22:32:03处女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午马
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56狮子座
日期:2013-09-08 08:37:52
7 [报告]
发表于 2012-09-08 10:46 |只看该作者

论坛徽章:
13
15-16赛季CBA联赛之同曦
日期:2016-01-28 19:52:032015亚冠之北京国安
日期:2015-10-07 14:28:19NBA常规赛纪念章
日期:2015-05-04 22:32:03处女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午马
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56狮子座
日期:2013-09-08 08:37:52
8 [报告]
发表于 2012-09-08 10:48 |只看该作者
回复 6# kellyseeme123


    怎么了呢 ^_^

论坛徽章:
0
9 [报告]
发表于 2012-09-08 10:52 |只看该作者

意思就是rpc.mountd这个进程在启动nfs服务的时候启动,而不是由RPC来控制。。。上面你写的红色字撒、、、


回复 3# ulovko


   

论坛徽章:
13
15-16赛季CBA联赛之同曦
日期:2016-01-28 19:52:032015亚冠之北京国安
日期:2015-10-07 14:28:19NBA常规赛纪念章
日期:2015-05-04 22:32:03处女座
日期:2015-01-15 19:45:44卯兔
日期:2014-10-28 16:17:14白羊座
日期:2014-05-24 15:10:46寅虎
日期:2014-05-10 09:50:35白羊座
日期:2014-03-12 20:52:17午马
日期:2014-03-01 08:37:27射手座
日期:2014-02-19 19:26:54子鼠
日期:2013-11-30 09:03:56狮子座
日期:2013-09-08 08:37:52
10 [报告]
发表于 2012-09-08 10:59 |只看该作者
回复 9# kellyseeme123


    是这个意思没错 但是 这些都是 rpc控制的喲 ^_^
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP