This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Manage Network Services: DNS, File and Print Services
S E C T I O N 1 0 Manage Network Services: DNS, File and Print Services
In this section of the workbook, you learn how to do the following:
■ “Configure a DNS Caching-only Server” on 10-1
■ “Set Up and Manage Network File System (NFS)” on 10-3
■ “Configure a Basic Samba Server” on 10-7
■ “Configure CUPS Network Printing Services” on 10-11
Exercise 10-1 Configure a DNS Caching-only Server
A caching only DNS Server queries other servers and keeps the answers in its cache. If the same query comes again later, it is answered out of the cache without contacting servers in the Internet.
Such a DNS server acts as a proxy and makes direct connections from the clients in the LAN to DNS servers in the Internet unnecessary.
To configure a caching-only DNS server, do the following:
Manage Network Services: DNS, File and Print Services
S E C T I O N 1 0 Manage Network Services: DNS, File and Print Services
In this section of the workbook, you learn how to do the following:
■ “Configure a DNS Caching-only Server” on 10-1
■ “Set Up and Manage Network File System (NFS)” on 10-3
■ “Configure a Basic Samba Server” on 10-7
■ “Configure CUPS Network Printing Services” on 10-11
Exercise 10-1 Configure a DNS Caching-only Server
A caching only DNS Server queries other servers and keeps the answers in its cache. If the same query comes again later, it is answered out of the cache without contacting servers in the Internet.
Such a DNS server acts as a proxy and makes direct connections from the clients in the LAN to DNS servers in the Internet unnecessary.
To configure a caching-only DNS server, do the following:
Getting Started with Linux: Novell’s Guide to CompTIA’s Linux+ / Self-Study Workbook
3. From the YaST Control Center, select
Software > Install and Remove Software
4. From the filter drop-down menu, select Search.
5. In the Search field, enter bind; then select Search.
6. On the right, select the bind package.
7. Select Accept; then insert the requested SLES 9 CD.
8. When installation is complete, remove the CD and close the YaST Control Center.
Part II: Configure a DNS Caching-only Server
Be sure that the VMWare machine da1 is up and running before you start this exercise, as it is used as the forwarder in this exercise.
1. Open a terminal window and su to root.
2. Open the file /etc/named.conf in a text editor.
3. Configure the forwarders line to match the following:
forwarders { 10.0.0.254; };
Make sure that you delete the comment character from the beginning of the forwarders line.
4. Save and close the file.
5. Open a second terminal window and su to root.
6. Enter the following command:
tail -f /var/log/messages
7. Switch to the first terminal window and start bind with the following command:
rcnamed start
x If there are errors in the file /etc/named, they are noted in the output (with specific references and line numbers). The named daemon will not start until these errors are fixed.
Getting Started with Linux: Novell’s Guide to CompTIA’s Linux+ / Self-Study Workbook
3. From the YaST Control Center, select
Software > Install and Remove Software
4. From the filter drop-down menu, select Search.
5. In the Search field, enter bind; then select Search.
6. On the right, select the bind package.
7. Select Accept; then insert the requested SLES 9 CD.
8. When installation is complete, remove the CD and close the YaST Control Center.
Part II: Configure a DNS Caching-only Server
Be sure that the VMWare machine da1 is up and running before you start this exercise, as it is used as the forwarder in this exercise.
1. Open a terminal window and su to root.
2. Open the file /etc/named.conf in a text editor.
3. Configure the forwarders line to match the following:
forwarders { 10.0.0.254; };
Make sure that you delete the comment character from the beginning of the forwarders line.
4. Save and close the file.
5. Open a second terminal window and su to root.
6. Enter the following command:
tail -f /var/log/messages
7. Switch to the first terminal window and start bind with the following command:
rcnamed start
x If there are errors in the file /etc/named, they are noted in the output (with specific references and line numbers). The named daemon will not start until these errors are fixed.
Manage Network Services: DNS, File and Print Services
8. From the second terminal window, watch the log output of bind for any messages such as Unknown RR Type or File Not Found. (If there are no such error messages, then your server is most probably configured correctly.)
9. If any errors occur, try to fix them and restart BIND.
10. From the first terminal window, start BIND automatically when the system is booted by entering the following:
insserv named
11. Open the file /etc/resolv.conf in a text editor.
12. Delete all existing nameserver entries.
13. Add the following entry as the first entry:
nameserver 127.0.0.1
14. Save and close the file.
Other names (like www.novell.com) are only resolved if da1 is able to resolve these addresses.
15. Verify that your DNS server works, querying the nameserver running on da1.digitalairlines.com, by entering
host da20.digitalairlines.com
(End of Exercise)
Exercise 10-2 Set Up and Manage Network File System (NFS)
Today it is more the rule than the exception that files on some file server are exported to client workstations. In a purely Unix/Linux environment this is usually accomplished using NFS.
The purpose of this exercise is to walk you through the necessary steps to export and import such directories.
In this exercise, you use NFS as a server and a client to share files between Linux hosts.
Manage Network Services: DNS, File and Print Services
8. From the second terminal window, watch the log output of bind for any messages such as Unknown RR Type or File Not Found. (If there are no such error messages, then your server is most probably configured correctly.)
9. If any errors occur, try to fix them and restart BIND.
10. From the first terminal window, start BIND automatically when the system is booted by entering the following:
insserv named
11. Open the file /etc/resolv.conf in a text editor.
12. Delete all existing nameserver entries.
13. Add the following entry as the first entry:
nameserver 127.0.0.1
14. Save and close the file.
Other names (like www.novell.com) are only resolved if da1 is able to resolve these addresses.
15. Verify that your DNS server works, querying the nameserver running on da1.digitalairlines.com, by entering
host da20.digitalairlines.com
(End of Exercise)
Exercise 10-2 Set Up and Manage Network File System (NFS)
Today it is more the rule than the exception that files on some file server are exported to client workstations. In a purely Unix/Linux environment this is usually accomplished using NFS.
The purpose of this exercise is to walk you through the necessary steps to export and import such directories.
In this exercise, you use NFS as a server and a client to share files between Linux hosts.
Manage Network Services: DNS, File and Print Services
❑ Enter mount -t nfs partner_IP:/export/data /mnt/share
or
❑ Use the YaST NFS Client module to mount the directory.
11. Verify that your partner’s directory is mounted by entering
mount
12. Start Konqueror in the Super User Mode by pressing Alt + F2 and entering kdesu konqueror; then select Run.
13. Enter a password of novell and select OK.
14. View your NFS export by entering the following URL:
nfs://localhost
15. View your partner’s NFS export by entering the following URL:
nfs://partner_server_IP_address
16. (Optional) If you finish early, try changing the entry in the /etc/exports file so that only you or your partner can write to the file system, and only one of you can read from it.
17. When you finish, close all open windows and dialogs.
(End of Exercise)
Exercise 10-3 Configure a Basic Samba Server
NFS clients for Windows machines exist, but it is far more common to use the SMB protocol instead of NFS when Windows machines are involved in sharing resources (files, printers) over the network.
Samba offers a large variety of configuration options. Only the most common ones are covered in this exercise. Its purpose is to help you set up a simple Samba service.
Manage Network Services: DNS, File and Print Services
❑ Enter mount -t nfs partner_IP:/export/data /mnt/share
or
❑ Use the YaST NFS Client module to mount the directory.
11. Verify that your partner’s directory is mounted by entering
mount
12. Start Konqueror in the Super User Mode by pressing Alt + F2 and entering kdesu konqueror; then select Run.
13. Enter a password of novell and select OK.
14. View your NFS export by entering the following URL:
nfs://localhost
15. View your partner’s NFS export by entering the following URL:
nfs://partner_server_IP_address
16. (Optional) If you finish early, try changing the entry in the /etc/exports file so that only you or your partner can write to the file system, and only one of you can read from it.
17. When you finish, close all open windows and dialogs.
(End of Exercise)
Exercise 10-3 Configure a Basic Samba Server
NFS clients for Windows machines exist, but it is far more common to use the SMB protocol instead of NFS when Windows machines are involved in sharing resources (files, printers) over the network.
Samba offers a large variety of configuration options. Only the most common ones are covered in this exercise. Its purpose is to help you set up a simple Samba service.
It is usually more economical to have one larger printer within a department than to equip each workstation with a printer of its own. This printer is then used by several persons via the network.
There are various protocol possible to address such a printer. Cups uses primarily the Internet Printing Protocol (IPP).
In this exercise you set up and manage a CUPS printing environment on your SLES 9 server by doing the following:
■ Part I: Manage the Printer from the Command Line
■ Part II: Manage the Printer with YaST
■ Part III: Provide Access to the CUPS Administrator
■ Part IV: Print to a Remote CUPS Printer
x You have to set up a printer in Exercise 4.4 to complete this exercise.
It is usually more economical to have one larger printer within a department than to equip each workstation with a printer of its own. This printer is then used by several persons via the network.
There are various protocol possible to address such a printer. Cups uses primarily the Internet Printing Protocol (IPP).
In this exercise you set up and manage a CUPS printing environment on your SLES 9 server by doing the following:
■ Part I: Manage the Printer from the Command Line
■ Part II: Manage the Printer with YaST
■ Part III: Provide Access to the CUPS Administrator
■ Part IV: Print to a Remote CUPS Printer
x You have to set up a printer in Exercise 4.4 to complete this exercise.
Manage Network Services: DNS, File and Print Services
5. Log in by entering the following:
❑ Username: root
❑ Password: N0v3ll.
The CUPS administrator page appears.
Part IV: Print to a Remote CUPS Printer
The HP LaserJet 4 printer is configured to print locally through your parallel port. However, a CUPS network printer is also available on the Digital Airlines office network that you would like to access.
x In a classroom environment, this printer has already been set up for students on the DA1 server. If there is no CUPs printer configured on another server, you can use your own server and print queue for this part of the exercise.
Unlike in the courseroom, there’s no printer set up in the VMWare image of da1.
Do the following:
1. From the YaST Control Center select Hardware > Printer.
The Printer Configuration dialog appears.
2. Add a new CUPS printer by selecting Configure.
3. Select Print via CUPS Network Server; then select Next.
4. Select Remote IPP Queue; then select Next.
5. Next to the Host name of the printer server field, select Lookup; then select Scan for IPP Servers.
6. From the drop-down list, select da1.digitalairlines.com.
If da1.digitalairlines.com does not appear in the drop-down list, enter da1.digitalairlines.com in the field.
7. Next to the Name of the remote queue field, select Lookup to select the default queue configured on DA1.
8. Test connectivity to the printer server by selecting
Manage Network Services: DNS, File and Print Services
5. Log in by entering the following:
❑ Username: root
❑ Password: N0v3ll.
The CUPS administrator page appears.
Part IV: Print to a Remote CUPS Printer
The HP LaserJet 4 printer is configured to print locally through your parallel port. However, a CUPS network printer is also available on the Digital Airlines office network that you would like to access.
x In a classroom environment, this printer has already been set up for students on the DA1 server. If there is no CUPs printer configured on another server, you can use your own server and print queue for this part of the exercise.
Unlike in the courseroom, there’s no printer set up in the VMWare image of da1.
Do the following:
1. From the YaST Control Center select Hardware > Printer.
The Printer Configuration dialog appears.
2. Add a new CUPS printer by selecting Configure.
3. Select Print via CUPS Network Server; then select Next.
4. Select Remote IPP Queue; then select Next.
5. Next to the Host name of the printer server field, select Lookup; then select Scan for IPP Servers.
6. From the drop-down list, select da1.digitalairlines.com.
If da1.digitalairlines.com does not appear in the drop-down list, enter da1.digitalairlines.com in the field.
7. Next to the Name of the remote queue field, select Lookup to select the default queue configured on DA1.
8. Test connectivity to the printer server by selecting