Optional Mainserver Setup Instructions for OS X Support Essentials Friday, November 2, 2012 Summary Some of the exercises in Apple Pro Training Series: OS X Support Essentials require access to a specially configured OS X Server computer, known as Mainserver. If you have a spare computer that can run OS X Mountain Lion, you can follow these instructions to set it up to support these optional exercises. Note: Setting a computer up following these instructions makes changes that are hard to undo. It is best to use a computer that can be erased when you have finished the exercises. Setup options: The exercises in OS X Support Essentials are intended to be performed in any of four configurations: With a single OS X Mountain Lion computer and whatever Internet connection it has available. With that, plus an additional computer configured as a server according to these instructions. With the single computer, plus a private network configured according to the Optional Network Setup Instructions. With both the additional computer configured as a server, and a private network configured according to the Optional Network Setup Instructions. If you are going to provide both the private network and the additional server computer, you should set up the network before setting up the server. Also, be aware both the network setup instructions and the server setup instructions depend on whether the other is being set up (for example, these instructions have several sections that only apply if you are also setting up the private network). These dependencies will be given in the instructions at the relevant places. Network connections: The Mainserver computer must be connected to the same network segment that the exercise computer is connected to. If you have set up a private network configured according to the Optional Network Setup Instructions, both Mainserver and the exercise computer should be connected via ethernet to the router s LAN ports. Exercises that use the Mainserver server: Exercise 3.4: Download the Student Materials in a Classroom Exercise 19.3: Use a Drag-and-Drop Install Exercise 25.1: Configure a Network Service Account Exercise 25.2: Use File Sharing Services Exercise 25.3: Troubleshoot Network Services Exercise 28.1: Configure a Bonjour Printer Exercise 28.2: Manage Printing Exercise 28.3: Troubleshoot the Printing System Note that several of these exercises can also be performed in a slightly different form without Mainserver. The server computer can also be used for exercises that require a second (non-server) computer.
Setup Instructions Part 1 - Initial setup of the Mainserver computer: 1. Follow the instructions in the appropriate exercises in Lesson 2 of OS X Support Essentials, referred to going forward as the guide, to install OS X Mountain Lion on the computer that you will use as Mainserver (note: This is in addition to following them on the computer you will use as your primary exercise computer). 2. Follow the instructions in the Exercise 3.1 of the guide to create the Local Admin account on the computer that you will use as Mainserver (note: Again, this is in addition to following them on the computer you will use as your primary exercise computer). 3. From the Apple menu, choose System Preferences. 4. In System Preferences, click Sharing. 5. In the Computer Name field, enter Mainserver. 6. Click Show All. 7. If you want to, follow the instructions in the Adjust Your Mouse/Trackpad Preferences section of Exercise 3.3 to customize your mouse settings. 8. If you have also set up a private network to support these exercises (following the Optional Network Setup Instructions): a. Open the Network preference pane. b. Select the active Ethernet service in the service list. c. Click Advanced, near the lower right of the window. d. From the Configure IPv4 pop-up menu, choose Manually. e. In the IPv4 Address field, enter 10.0.0.2/24 and press Tab. This will automatically fill in the Subnet Mask and Router fields correctly. f. Click the DNS tab. g. If there are any entries in the DNS Servers or Search Domains lists, remove them by selecting them and then clicking Delete ( ) below the list. h. Click Add (+) under the DNS Servers list, and enter the IP address of a DNS server that can be used on your Internet connection. If you do not know the best server to use, 8.8.8.8 will work from almost all network locations. i. Click Add (+) under the Search Domains list, and enter pretendco.com j. Click OK. k. Click Apply. 9. Quit System Preferences (choose System Preferences > Quit, or press Command-Q). 10. From the Apple menu, choose Software Update. 11. If any updates are available for your computer, click Update to bring your software up to date. a. If any of the updates required the computer to restart, log back in as Local Admin (password: ladminpw). b. If any updates were installed, repeat from step 10 to check for additional updates.
Part 2 - Install Server.app: In order to set this computer up as a server, you need to install the OS X Server application on it. This can be purchased and downloaded from the Mac App Store (see Reference 19.1 and Exercise 19.1 in the guide for more details on the Mac App Store): 1. If the App Store is not already open, choose Apple menu > App Store. 2. Choose Store menu > Sign In. a. If you have an itunes/app Store account, enter your Apple ID and password, and click Sign In. Follow any necessary prompts to verify payment information. b. If you do not have an itunes/app Store account, click Create Apple ID, and follow the prompts to set up an account. 3. If you have already purchased OS X Server: a. Click the Purchases button. b. Click the Install button to the right of OS X Server in your purchases list. 4. If you have not purchased OS X Server yet: a. In the App Store, search for os x server b. Select OS X Server from the search results. c. Click the price to purchase OS X Server. d. Click Buy App. e. Follow the prompts to complete the purchase. 5. Wait for Server.app to be downloaded and installed. 6. Quit the App Store. Part 3 - Set up Server.app: 1. If necessary, open the Server application. You can open it by clicking Launchpad (the rocketship icon) in the Dock, or by navigating to the Applications folder in the Finder (choose Go > Applications, or press Command- Shift-A). 2. At the Set up your Server pane, click Continue. 3. At the License agreement, click Agree. 4. Authenticate as Local Admin (password: ladminpw) to allow the setup. 5. At Accessing your Server, select Local Network, and then click Continue. 6. At Connecting to your Server, enter the following information: Computer Name: Mainserver Host Name: mainserver.local Leave the Network Address as it is and click Continue. 7. If an AirPort Management pane appears, deselect Use Server to manage... and then click Continue. 8. At Apple Push Notifications, leave it blank and click Continue. 9. At Configuring Services, wait for the setup to complete. 10. When Congratulations appears, click Finish.
The Server application will display a summary of your server s configuration. You can quit it if you want to, but it is usually more convenient to leave it running as you will need it again soon. Part 4 - Install Mountain Lion 101 Mainserver Setup files: 1. Open Safari. 2. Navigate to www.peachpit.com/apts.osxmountainlion. Click the Register your product link. 3. Enter the guide s 13-digit ISBN and click Submit. 4. If you do not already have a Peachpit account, follow the prompts to create one. You will be taken to the Registered Products page of your account. 5. Click the Access Bonus Content link to access the bonus material. 6. Click the link to download the Mainserver Setup Files. The Mainserver Setup Files will be downloaded as a Zip archive and automatically expanded into the Mainserver Setup File folder. 7. Click the Downloads button (down-arrow icon) near the top right of the Safari window. 8. Click the View button (magnifying glass icon) next to Mainserver Setup Files. Your Downloads folder opens in the Finder, showing Mainserver Setup Files inside it. 9. Drag Mainserver Setup Files to your desktop. 10. Close the Downloads folder. 11. Open Mainserver Setup Files on your desktop. 12. Open Mainserver Setup.pkg. The Installer application opens, and prepares to install the files used by the exercises: /Shared Items/Public/StudentMaterials - files used throughout book /Shared Items/Public/copy.rtf, DropBox, and SMB_DropBox - files and folders used in Exercise 25.2 /Library/Server/Web/Data/Sites/Default, and PretendcoInternal - web files used in Lessons 19 and 23 13. At the Welcome pane, click Continue. 14. At the Standard Install pane, click Install. 15. Authenticate as Local Admin, and click Install Software. 16. When the installation completes, click Close. Part 5 - Set up file sharing: 1. If necessary, open the Server application. a. If prompted to Choose a Mac, select This Mac - Mainserver, and click Continue. b. If prompted, authenticate as Local Admin. 2. Select the File Sharing service in the sidebar. 3. Double-click the Public share point: a. Select Allow guest users to access this share (note: You may need to scroll down to see this option). b. Click Done. 4. Use the switch near the upper right of the window to turn the File Sharing service on.
Part 6 - Set up DNS: 1. In the Server application s sidebar, select DNS. 2. Click Add (+) under the Host Names list, and enter the following information: Host Name: internal.pretendco.com IP addresses: click Add (+), then enter 172.31.255.1 Click Done. 3. If you have set up a private network to support these exercises (following the Optional Network Setup Instructions), click Add (+) under the Host Names list again, and enter the following information: Host Name: mainserver.pretendco.com IP addresses: click Add (+), then enter 10.0.0.2 Aliases: click Add, then enter www Click Done. 4. If the DNS service is not running, switch it on. 5. Open the Network pane in System Preferences: a. Select the primary service (i.e., the one at the top of the list). b. Click Advanced. c. Click the DNS tab. d. Remove any existing entries in the DNS Servers list by selecting them and clicking Delete ( ) under the list. e. Click Add (+) under the DNS Servers list, and enter 127.0.0.1 f. Click OK. g. Click Apply. h. Quit System Preferences. Part 7 - Set up Open Directory: 1. In the Server application s sidebar, select Mainserver. 2. Click the Network tab. 3. Verify that the Computer Name is listed as Mainserver, and the Host Name is mainserver.local. If either of these is not correct, click the corresponding Edit button and correct it. 4. In the sidebar, select Open Directory. 5. Switch the Open Directory service on. 6. In the Configure Network Users and Groups pane, select Create a new Open Directory Domain and then click Next. 7. In the Directory Administrator pane, enter the following information: Name: Directory Administrator (this should already be set) Account Name: diradmin (this should already be set) Password: diradminpw Verify: diradminpw
Click Next. 8. In the Organization Information pane, enter the following information: Organization Name: Pretendco Admin Email Address: ladmin@mainserver.local Click Next. 9. In the Confirm Settings pane, verify the settings and click Set Up. 10. Wait for the setup process to complete. Part 8 - Set up network accounts: 1. From the Manage menu, choose Import Accounts from File: a. Navigate to the Mainserver Setup Files folder, and select (single-click) the Mainserver Users file. b. From the Type pop-up menu, select Local Network Accounts. c. Enter Admin Name: diradmin d. Enter Password: diradminpw e. Click Import. 2. Wait as the user accounts are imported. The progress will be shown at the bottom right of the Server window. 3. When the import finishes, select Users from the sidebar, and make sure the user accounts (David Doe, Diane, Doug Doe, etc.) imported successfully. 4. Select all of the user accounts (Command-A). 5. From the Action (gear icon) pop-up menu, choose Edit Access to Services : a. Select any services that are not already selected. b. Click OK. 6. From the Manage menu, choose Import Accounts from File: a. In the Mainserver Setup Files folder, select (single-click) the Mainserver Groups file. b. Set Type to Local Network Accounts. c. Enter Admin Name: diradmin d. Enter Password: diradminpw e. Click Import. 7. Wait as the group accounts are imported. 8. Select Groups from the sidebar, and make sure the group accounts (does, families, etc.) imported successfully. 9. Double-click the students group, and make sure that the Student accounts (Student, Student Eight, Student Eighteen, etc.) are members. Note that it may take a few seconds for the Members list to fill in. 10. Click Done. Part 9 (optional) - Set up DHCP service: You should set up the DHCP service only if you have set up a private network to support these exercises (following the Optional Network Setup Instructions), including turning off DHCP on the local router. If you have not set your network up this way, skip ahead to part 10 of the setup process.
1. In the Server application s sidebar, select DHCP. 2. If there is an entry in the Networks list, double-click it; if not, click the Add (+) button under the list to create one. 3. Enter the following information: Name: 10.0.0 Ethernet (this may already be set) Lease Duration: choose 1 day Network Interface: choose Ethernet (or whatever interface connects to the private network) Starting IP address: 10.0.0.210 Ending IP address: 10.0.0.254 Subnet Mask: 255.255.255.0 Router: 10.0.0.1 4. Next to DNS, click Edit: i. Change the entry under Provide these name servers... to 10.0.0.2 ii. Click Add (+) under the Provide these search domains... and enter pretendco.com iii. Click OK. 5. Click Done. 6. Switch the DHCP service on. Part 10 (optional) - Set up Printer Sharing: This part of the setup is needed only if you want to use Mainserver as a stand-in printer for the Lesson 28 (Print and Scan) exercises. If you have a real printer, you can use that instead and skip ahead to Part 11 or the setup process. 1. In the Utilities folder (Command-Shift-U in the Finder), open the Terminal utility. a. Run the command: sudo launchctl load -w /System/Library/LaunchDaemons/org.cups.cups-lpd.plist (Note that this is a single-line command, with a space after -w.) b. Authenticate with Local Admin s password (ladminpw) when prompted. Note that nothing will be displayed as you type. c. Quit Terminal. 2. Open System Preferences, and click the Print & Scan preference pane: a. Click Add (+) under the printer list. b. Click IP in the Add Printer window s toolbar. c. Check or enter the following information: Address: 127.0.0.1 Protocol: Line Printer Daemon - LPD Queue: NewQueue
Name: NewQueue Location: (leave blank) Print Using: choose Select Printer Software 1. Select Apple Color LaserWriter 12/660 PS v2014.108 and then click OK. Click Add. d. In the Setting up NewQueue... dialog, leave the defaults and click OK. e. With NewQueue selected, select Share this printer on the network. f. Click the Sharing Preferences button. g. Select the checkbox for Printer Sharing. h. Click Show All. Part 11 - Set up the Web Service: 1. In the Server application s sidebar, select Websites. 2. Switch the Websites service on. 3. Quit the Server application. 4. In System Preferences, open the Network preference pane. a. Select the primary network service in the service list (the one at the top of the list). b. From the Action (gear icon) pop-up menu, choose Duplicate Service. c. Name the service Internal, then click Duplicate. d. If necessary, select the new service. e. Click Advanced, near the lower right of the window. f. From the Configure IPv4 pop-up menu, choose Manually. g. In the IPv4 Address field, enter 172.31.255.1/25 and press Tab. This will automatically fill in the Subnet Mask and Router fields correctly. h. Click the DNS tab. i. If there are any entries in the DNS Servers or Search Domains lists, remove them by selecting them and then clicking Delete ( ) below the list. j. Click Add (+) under the DNS Servers list, and enter 172.31.255.1 k. Click Add (+) under the Search Domains list, and enter pretendco.com l. Click OK. m. Click Apply. n. Quit System Preferences. 5. Reopen the Server application. 6. Reselect Websites in the sidebar. 7. Under the Websites list, click Add (+), and enter the following information: Domain Name: internal.pretendco.com (when you finish typing the status indicator should turn green)
IP Address: any Port: 80 SSL Certificate: None Store Site Files In: Automatically create new folder (note: this is not accurate, as the folder was already created by the Mainserver installation package.) Leave any other settings at the defaults. Click Done. Part 12 - Set up the VPN Service: 1. Select VPN from the sidebar: 2. Enter the following information: Configure VPN for: choose L2TP VPN Host Name mainserver.local Shared Secret: apple 3. Select Show shared secret and confirm that the secret is entered correctly. 4. Click Edit on the Client Addresses line, and enter the following information: Assign: 31 addresses for VPN (this should already be set) Starting at: 172.31.255.10 Click OK. 5. Click Edit on the Client DNS Settings line, and add or remove entries as needed to give the following settings: Provide these name servers to connected clients: 172.31.255.1 Provide these search domains to connected clients: pretendco.com (note that it should be listed only once) Click OK. 6. Switch the VPN service on. Part 13 - Set up the, Contacts and Mail services: 1. Select Contacts from the sidebar. 2. Switch the Contacts service on. 3. Select Mail from the sidebar. 4. Click Edit on the Provide Mail for line: a. Set the Domain Name to pretendco.com b. Click OK. 5. Select Relay outgoing mail through ISP. a. Set the Outgoing Mail Relay to 127.0.0.55 b. Click OK. 6. Switch the Mail service on.
7. Open the Mainserver Setup Files on your desktop. 8. Open send_welcome.command. This is a shell script that sends welcome messages to the student accounts on the server; you will see this message in Exercise 25.1. a. If you receive a warning that it was downloaded from the Internet, click Open to open it anyway. send_welcome.command opens and runs in the Terminal utility. b. The send_welcome.command script runs several configuration checks to make sure the server is set up correctly; if it finds a problem it will print an error message in red, and may also make suggestions about how to correct the problem. If this happens, correct the problem and then run the script again. c. If the script does not detect any problems, it will send the messages and then print Messages sent sucessfully in green. 9. When the script finishes, quit Terminal. Your server is now fully set up and ready to use in the guide s exercises.