Providing NFS Service on a Windows RDP Server
Total Page:16
File Type:pdf, Size:1020Kb
Providing NFS Service on a W indows RDP Server HP will not support this configuration œ This is to be used only as a guide for organizations wishing to implement such a service. July 1, 2004 Documentation by: Gordon Leonard [email protected] enterprise solutions & architecture This document is the property of and is proprietary to HP Corporation. H2NFS v0.03 Page 1 Introduction This documentation was developed to provide a solution to environments, which desire to deploy Linux scripted installs from the a Windows based RDP server. Because of the nature of this document, instructions will not provide a tremendous amount of technical depth. Nor will it attempt to cover every aspect of NFS, Windows services, or every Linux distribution. Modifications may be made to address other Linux distributions, this document should help establish a foundation to make this easily accomplished. Please forward any correction or additions to [email protected] This document is based off and assumes: Windows 2003 RDP 1.60 Smart Start 7.10 All programs were installed on the drive C: using the default locations. CDROM drive is D: Red Hat Enterprise AS 3.0 update 2 The RDP server‘s IP is 192.168.33.20 The server‘s name is —rdpnfs“ 50,000-Foot Overview Under current configuration guidelines two deployment servers are required if deploying Windows and Linux using the unattended install process. Using this process it‘s possible to consolidate the software distribution points from two servers into one. Changes from v0.02 • Isolated the NFS files from the Altiris directory structure. • Updated to current version of RDP 1.60. • Corrected nfsshare command line. • Add page numbers. This document is the property of and is proprietary to HP Corporation. H2NFS v0.03 Page 2 Tools Windows Services for UNIX 3.5 Also know as SFU (Services for Unix). As of this writing is free provided it‘s installed on a Windows server based platform. Location: http://www.microsoft.com/windows/sfu/downloads/default.asp After downloading, run the program and extract to a temporary directory. AB-Edit Feature rich text editor that can edit UNIX and PC text files. This program requires an install process. (Freeware) Location: http://www.ograhl.com/en/ab-edit/ TextEdit Streamline text editor that can edit UNIX and PC text files. Unzip the program and run. (Freeware) Location: http://www.haxial.com/products/textedit/ This document is the property of and is proprietary to HP Corporation. H2NFS v0.03 Page 3 Copy Distribution CDs Ensure directory structure remains intact when coping from the distribution . CD‘s. Create the distribution directory. For this paper all information copied will assume the default of: C:\NFS Create the directory NFS on the root of C:. Under the NFS directory create cpqrdp. Under the cpqrdp directory Create the directory rhas3 Create the directory ss.710 On the RPD 1.60 CD Copy the complete contents from: D:\pim-nfs\ss.710 To C:\NFS\cpqrdp\ss.710 Because variable information is passed during the ! OS installation the OS directory name should match the SmartStart package name. This document is the property of and is proprietary to HP Corporation. H2NFS v0.03 Page 4 Copy the complete contents of Red Hat Enterprise AS 3.0 OS distribution CD‘s (in order of distribution and allow for overwrites) to: C:3NFS\cpqrdp\rhas3 Modify Linux Configuration Files Remove the READ-ONLY attributes on the all files in the ss7.10 directory: Edit the configuration files (.cfg) with an editor that can handle UNIX text files. ! Unix uses LF to terminate a line, Windows and DOS uses CR + LF. It‘s important to note that it‘s possible to use a Windows command line tool with SED like functions to perform a find and replace across multiple files. For this document a simple editor (noted in the tools section) was used. This document is the property of and is proprietary to HP Corporation. H2NFS v0.03 Page 5 Edit all the —cfg“ files in each OS section (in this case only the files in the —rhas3“ directory). C:\NFS\cpqrdp\ss.710\rhas3 bl10e.ks.cfg bl20p.ks.cfg bl30p.ks.cfg bl40p.ks.cfg ks.cfg Find and Replace with ~NFSSERVER~ 192.168.33.20 (This is a sample IP) ~SS~ ss.710 —~NFSSERVER~“ is the IP of your RDP server, now functioning as a NFS server. —~SS~“ is directory containing your Smart Start files. In RDP under —Red Hat Enterprise Linux AS 3 Scripted Install Events“ modify each job. This document is the property of and is proprietary to HP Corporation. H2NFS v0.03 Page 6 Replace 0.0.0.0 with 192.168.33.20 (Used for this document) This document is the property of and is proprietary to HP Corporation. H2NFS v0.03 Page 7 Windows Services for UNIX 3.5 Install & Configure In the temporary directory which Windows Services for UNIX 3.5 was extracted run (this will install the NFS service using default location is C:\SFU) œ . —NFSServer“ and —NFSServerAuth“ are case sensitive items for ADDLOCAL. msiexec /i sfusetup.msi ADDLOCAL="NFSServer,NFSServerAuth" /qb A Window should display the install progress Change to the directory C:\SFU and create two files using —copy con“ called: passwd. group. *These files must not have an extension (for example .txt). *These files do not have to contain anything, they just have to exist. Type copy con passwd (return) Type ^Z (return) Example output C:\SFU>copy con passwd ^Z 1 file(s) copied. C:\SFU>copy con group ^Z 1 file(s) copied This document is the property of and is proprietary to HP Corporation. H2NFS v0.03 Page 8 Set Windows access to allow for anonymous connections œ cacls "C:\NFS" /T /E /G "anonymous logon":R Example output … processed file: C:\NFS\cpqrdp\ss.710\ul10\csp\ucdsnmp-4.2.5- 79.ul10.i386.rpm processed file: C:\NFS\cpqrdp\ss.710\ul10\csp\ucdsnmp-4.2.5- 79.ul10.i386.xml processed file: C:\NFS\cpqrdp\ss.710\ul10\csp\ul10.sh processed file: C:\NFS\cpqrdp\ss.710\ul10\csp\vlan-1.8.0- 14.src.rpm … *Open up a new DOS window to obtain the new path created by the SFU install program to run the next commands.* Turn on —simple mapping“ for NFS œ Mapadmin config œi YES Example output C:\>mapadmin config -i YES The settings were successfully updated. Set the NFS security mapping. In this example the server name is —rdpnfs“ also if you don‘t have the files —passwd“ and —group“ in the C:\SFU directory this will fail œ mapadmin adddomainmap -d \\rdpnfs -f c:\sfu Example output C:\>mapadmin adddomainmap -d \\rdpnfs -f c:\sfu The settings were successfully updated. This will setup the NFS share œ nfsshare usr="C:\NFS" -o anon=yes Example output C:\>nfsshare usr="C:\NFS" -o anon=yes usr was shared successfully FYI - This document is the property of and is proprietary to HP Corporation. H2NFS v0.03 Page 9 To stop and start the Mapping and NFS service. nfsadmin server stop mapadmin stop D mapadmin start nfsadmin server start To check the NFS service go to a Linux server and type (using your RDP IP): showmount œe 192.168.33.20 * Should show: Export list for 192.168.33.20: /usr (everyone) To perform a mount go to a Linux server and type (using your RDP IP): cd /mnt mkdir nfs * mount œt nfs 192.168.33.20:/usr /mnt/nfs ls /mnt/nfs Should list the directory contents on the NFS share point. Summary By following the above process it will be possible to use the RDP server for Linux scripted installs. Clearly this is not a plug and go process and will require a certain amount of administration to maintain. This document is the property of and is proprietary to HP Corporation. H2NFS v0.03 Page 10 .