Advertisement
Guest User

Untitled

a guest
Oct 26th, 2016
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.22 KB | None | 0 0
  1. NFS on CentOS as a server
  2. Install NFS package: # yum install nfs-utils nfs-utils-lib
  3. Start NFS service:
  4. # service rpcbind start
  5. # service nfs start
  6. # chkconfig nfs on && chkconfig rpcbind on
  7. Make directory for sharing: # mkdir /var/nfs
  8. NFS configuration
  9. # vi /etc/exports
  10. add /var/nfs 10.19.1.15(rw,sync,no_root_squash)
  11. NFS on CentOS as a client
  12. Create mount point
  13. # mkdir /mnt/windowsnfs
  14. # mkdir /mnt/freebsdnfs
  15. Mount to windows server
  16. # mount 10.19.1.15:/share1 /mnt/windowsnfs
  17. Mount to FreeBSD
  18. # mount 10.19.3.15:/var/nfs /mnt/freebsdnfs
  19. Samba on CentOS as a server
  20. Install Samba package
  21. # yum install samba samba-client samba-common
  22. Auto-start at boot time for samba
  23. # chkconfig smb on
  24. # chkconfig nmb on
  25. Disable SELinux
  26. Edit # vi /etc/selinux/config
  27. Set SELINUX=disabled
  28. Add Iptables rules
  29. # iptables -I INPUT 4 -m state --state NEW -m udp -p udp --dport 137 -j ACCEPT
  30. # iptables -I INPUT 5 -m state --state NEW -m udp -p udp --dport 138 -j ACCEPT
  31. # iptables -I INPUT 6 -m state --state NEW -m tcp -p tcp --dport 139 -j ACCEPT
  32. Configure samba file
  33. Edit # vi /etc/samba/smb.conf
  34. Navigate to global setting
  35. [global] workgroup = WORKGROUP (Windows Server domain)
  36. security = share
  37. map to guest = bad user
  38. Navigate to Share Definitions
  39. [centsmb]
  40. path = /var/smb
  41. browsable =yes
  42. writable = yes
  43. guest ok = yes
  44. read only = no
  45. Restart samba service
  46. # service smb restart
  47. # service nmb restart
  48. Create directory for sharing: # mkdir /var/smb
  49. Samba on CentOS as a client
  50. Create mount point
  51. # mkdir /mnt/windowssamba
  52. #mkdir /mnt/freebsdsamba
  53. Mount to windows server
  54. #mount -t cifs //10.19.1.15/share2 /mnt/windowssamba -o username=Administrator,password=xxxxxxx
  55. Mount to FreeBSD
  56. Mount_smbfs - I 10.19.3.15 //root@cao/bsdsmb /mnt/freebsdsamba
  57. Configure process accounting
  58. # yum install psacct
  59. # chkconfig psacct on
  60. # /etc/init.d/psacct start
  61. X-Windows
  62. # yum -y groups install "GNOME Desktop"
  63. # startx
  64.  
  65.  
  66.  
  67.  
  68. FreeBSD:
  69. NFS on FreeBSD as a server
  70. Edit # /etc/rc.conf
  71. nfs_server_enable="YES"
  72. nfs_server_flags="-u -t -n 4"
  73. rpcbind_enable="YES"
  74. mountd_flags="-r"
  75. mountd_enable="YES"
  76. Start NFS service
  77. # rpcbind
  78. # nfsd -u -t -n 4
  79. # mountd -r
  80. Make directory for sharing: # mkdir /var/nfs
  81. NFS on FreeBSD as a client
  82. Create mount point
  83. # mkdir /mnt/windowsnfs
  84. # mkdir /mnt/centnfs
  85. Mount to Windows Server
  86. Mount 10.19.1.15:/var/nfs /mnt/windowsnfs
  87. Mount to CentOS
  88. Mount 10.19.2.15:/var/nfs /mnt/centnfs
  89. Samba on FreeBSD as a server
  90. Install samba package
  91. #pkg install samba43
  92. Enable Samba at boot time
  93. # /etc/rc.conf
  94. Add samba_enable="YES"
  95. Configure Samba
  96. /usr/local/etc/smb.conf
  97. workgroup = WORKGROUOP
  98. path = /var/smb
  99. public = no
  100. writable = yes
  101. printable = no
  102. guest ok = no
  103. Samba on FreeBSD as a client
  104. # mkdir /mnt/windowssamba
  105. Mount to windows server
  106. #mount -t cifs //10.19.1.15/share2 /mnt/windowssamba -o username=Administrator,password=xxxxxxx
  107. Mount to CentOS
  108. Mount_smbfs - I 10.19.2.15 //root@cao/centsmb /mnt/centsamba
  109. Configure process accounting
  110. Edit /etc/rc.conf
  111. accounting_enable="YES"
  112. touch /var/account/acct
  113. accton /var/account/acct
  114. /etc/rc.d/accounting start
  115. X-Windows
  116. # cd /usr/ports/x11/xorg
  117. # make install clean
  118. # startx
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement