Archive for September, 2007

Chapter 26 . Running a File Server 661 (Cedant web hosting)

Sunday, September 30th, 2007

Chapter 26 . Running a File Server 661 Figure 26-1: NFS can make selected file systems available to other computers. In this example, a computer named oak makes its /apps/bin directory available to clients on the network (pine, maple, and spruce) by adding an entry to the /etc/ exports file. The client computer (pine) sees that the resource is available and mounts the resource on its local file system at the mount point /oak/apps, after which any files, directories, or subdirectories from /apps/bin on oak are available to users on pine (given proper permissions). Although it is often used as a file server (or other type of server), Linux is a generalpurpose operating system, so any Linux system can share file systems (export) as a server or use another computer s file systems (mount) as a client. Contrast this with dedicated file servers, such as NetWare, which can only share files with client computers (such as Windows workstations) and never act as a client. A file system is usually a structure of files and directories that exists on a single device (such as a hard disk partition or CD-ROM). A Linux file system refers to the entire directory structure (which may include file systems from several disks or NFS resources), beginning from root (/) on a single computer. A shared directory in NFS may represent all or part of a computer s file system, which can be attached (from the shared directory down the directory tree) to another computer s file system. Note /etc/exports File /apps/bin pine(rw), maple(rw), spruce(rw) OAK # mount oak:/apps/bin/oak/apps PINE / / apps/ bin/ file1 file2 file3 oak/ apps/
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.

660 Part V . (Web site directory) Running Servers Setting Up

Sunday, September 30th, 2007

660 Part V . Running Servers Setting Up an NFS File Server Instead of representing storage devices as drive letters (A, B, C, and so on), as they are in Microsoft operating systems, Linux systems connect file systems from multiple hard disks, floppy disks, CD-ROMs, and other local devices invisibly to form a single Linux file system. The Network File System (NFS) facility enables you to extend your Linux file system in the same way, to connect file systems on other computers to your local directory structure. An NFS file server provides an easy way to share large amounts of data among the users and computers in an organization. An administrator of a Linux system that is configured to share its file systems using NFS has to perform the following tasks to set up NFS: 1. Set up the network. If a LAN or other network link is already connecting the computers on which you want to use NFS, you already have the network you need. 2. Choose what to share on the server. Decide which file systems on your Linux NFS server to make available to other computers. You can choose any point in the file system to make all files and directories below that point accessible to other computers. 3. Set up security on the server. You can use several different security features to suit the level of security with which you are comfortable. Mount-level security lets you restrict the computers that can mount a resource and, for those allowed to mount it, lets you specify whether it can be mounted read/write or read-only. With user-level security, you map users from the client systems to users on the NFS server so that they can rely on standard Linux read/write/ execute permissions, file ownership, and group permissions to access and protect files. 4. Mount the file system on the client. Each client computer that is allowed access to the server s NFS shared file system can mount it anywhere the client chooses. For example, you may mount a file system from a computer called maple on the /mnt/maple directory in your local file system. After it is mounted, you can view the contents of that directory by typing ls /mnt/maple. Then you can use the cd command below the /mnt/maple mount point to see the files and directories it contains. Figure 26-1 illustrates a Linux file server using NFS to share (export) a file system and a client computer mounting the file system to make it available to its local users.
Searching for affordable and proven webhost to host and run your servlet applications? Go to Linux Web Hosting services and you will find it.

Running a File Server Most networked computers are

Saturday, September 29th, 2007

Running a File Server Most networked computers are on the network in the first place so that users can share information. Some users need to collectively edit documents for a project, share access to spreadsheets and forms used in the daily operation of a company, or perform any number of similar file-sharing activities. It also can be efficient for groups of people on a computer network to share common applications and directories of information needed to do their jobs. By far the best way to accomplish the centralized sharing of data is through a file server. A centralized file server can be backed up, preserving all stored data in one fell swoop. It can focus on the tasks of getting files to end users, rather than running user applications that can use client resources. And a centralized file server can be used to control access to information security settings can dictate who can access what. Linux systems include support for each of the most common file server protocols in use today. Among the most common file server types in use today are the Network File System (NFS), which has always been the file-sharing protocol of choice for Linux and other UNIX systems and Samba (SMB protocol), which is often used by networks with many Windows and OS/2 computers. This chapter describes how to set up file servers and clients associated with NFS and Samba and how to set up NetWare file servers set up in Linux. When selecting file services to provide, keep in mind that less is more. If your clients and servers support multiple-file access capabilities (NFS, SMB, and AppleTalk, for example), pick the service that lends itself to making the task less complicated. In many cases NFS is supported by clients and servers regardless of the operating system that they use. It s rare that you would need to enable more than one of the file services discussed in this chapter. Tip 2C H A6P6T E R . . . . In This Chapter Setting up an NFS file server in Linux Setting up a Samba file server in Linux . . . .
We highly recommend you visit web and email hosting services if you need stable and cheap web hosting platform for your web applications.

658 Part V . Running Servers After your (Sex offenders web site)

Friday, September 28th, 2007

658 Part V . Running Servers After your shared printer appears in the window, configure a pointer to that printer by opening (double-clicking) the printer icon. A message tells you that you must set up the printer before you can use it. Click Yes to proceed to configure the printer for local use. The Add Printer Wizard appears. Answer the questions that ask you how you intend to use the printer, and add the appropriate drivers. When you are done, the printer will appear in your printer window. Another way to configure an SMB printer from a Windows XP operating system is to go to Start.Printers and Faxes. In the Printers and Faxes window that appears, click the Add a Printer icon in the upper-left portion of the window, and then select Network Printer from the first window. From there you can browse and/or configure your SMB printer. Summary Providing network printing services is an essential efficiency on today s business network. With the use of a few network attached devices, you can focus your printer spending on a few high-quality devices that multiple users can share instead of numerous lower-cost devices. In addition, a centrally located printer can make it easier to maintain the printer, while still enabling everyone to get his or her printing jobs done. The default printing service in Linux is the Common UNIX Printing Service (CUPS). Any Linux system that includes CUPS offers the CUPS Web-based administrative interface for configuring CUPS printing. It also offers configuration files in the /etc/ cups directory for configuring printers and the CUPS service (cupsd daemon). In Fedora and other Red Hat Linux systems, you can configure your printer with the Printer Configuration windows available in both K Desktop and GNOME environments under the systems menu. A variety of filters make it possible to print to different kinds of printers, as well as to printers that are connected to computers on the network. You can set up your computer as a Linux print server, and you can also have your computer emulate an SMB (Windows) print server. After your network is configured properly and a local printer is installed, sharing that printer over the network as a UNIX or SMB print server is not very complicated. . . .
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

Web site layout - Chapter 25 . Running a Print Server 657

Thursday, September 27th, 2007

Chapter 25 . Running a Print Server 657 These example settings are the result of configuring Samba from the Samba Server Configuration window in Fedora Linux. The lines show that printers from /etc/ printcap were loaded and that the CUPS service is being used. Password encryption is on, and the /etc/samba/smbpasswd file stores the encrypted passwords. Because password sync is on, each user s Samba password is synchronized with the user s local UNIX password. The last few lines are the actual printers definition. It shows that users can print to all printers (printable = yes). Setting Up SMB Clients Chances are good that if you re configuring a Samba printer on your Linux computer, you will want to share it with Windows clients. If Samba is set up properly on your computer and the client computers can reach you over the network, their finding and using your printer should be fairly straightforward. The first place a client computer looks for your shared Samba printer is in Network Neighborhood (or My Network Places, for Windows 2000). From the Windows 9x desktop, double-click the Network Neighborhood icon. (From Windows 2000 or XP, double-click the My Network Places icon.) The name of your host computer (the NetBIOS name, which is probably also your TCP/IP name) appears on the screen or within a workgroup folder on the screen. Open the icon that represents your computer. The window that opens shows your shared printers and folders. If your computer s icon doesn t appear in Network Neighborhood or My Network Places, try using the Search window. From Windows XP, choose Start.Search. Computer or People.A Computer on the Network. Type your computer s name into the Computer Name box and click Search. Double-click your computer in the Search window results panel. A window displaying the shared printers and folders from your computer appears (see Figure 25-4). Figure 25-4: You can search for your computer s printers.
We recommend you use shared web hosting services, because many users agree that it is cheap, reliable and customer-satisfying webhost.

656 Part V (Web server iis) . Running Servers Now you

Wednesday, September 26th, 2007

656 Part V . Running Servers Now you can configure other computers to use your printer, as described in the Setting Up Printers section of this chapter. If you try to print from another computer and it doesn t work, here are a few troubleshooting tips: . Open your firewall. If you have a restrictive firewall, it may not permit printing. You must enable access to port 513 (UDP and TCP) to allow access to printing on your computer. See Chapter 17 for information on configuring your firewall. . Enable LPD-style printing. Certain applications may require an older LPD-style printing service to print on your shared printer. To enable LPD-style printing on your CUPS server, you must turn on the cups-lpd service. Most Linux distributions that include CUPS should also include cups-lpd. In Fedora and other Red Hat systems, type chkconfig cups-lpd on as root user. Then restart the xinetd daemon (service xinetd restart). . Check names and addresses. Make sure that you entered your computer s name and print queue properly when you configured it on the other computer. Try using the IP address instead of the host name (if that works, it indicates a DNS name resolution problem). Running a tool such as ethereal enables you to see where the transaction fails. Access changes to your shared printer are made in the /etc/cups/cupsd.conf file. Configuring a Shared Samba Printer Your Linux printers can be configured as shared SMB printers. To share your printer as though it were a Samba (SMB) printer, all you need to do is configure basic Samba server settings as described in Chapter 26. All your printers should be shared on your local network by default. The next section shows what the resulting settings look like and how you might want to change them. Understanding smb.conf for Printing When you configure Samba, the /etc/samba/smb.conf file is constructed to enable all of your configured printers to be shared. Here are a few lines from the smb.conf file that relate to printer sharing: printcap name = /etc/printcap load printers = yes printing = cups encrypt passwords = yes smb passwd file = /etc/samba/smbpasswd unix password sync = Yes [printers] comment = All Printers path = /var/spool/samba browseable = yes writeable = no printable = yes
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.

Freelance web design - Chapter 25 . Running a Print Server 655

Tuesday, September 25th, 2007

Chapter 25 . Running a Print Server 655 Order Deny,Allow Deny From All Allow From 127.0.0.1 AuthType None Allow from All Instead of Allow from All, you could allow a particular network (for example, 10.0.0.0/255.255.255.0), network interface (Allow from @IF(eth0)), or individual IP address (Allow from 10.0.0.1). On Fedora and other Red Hat Linux systems, it s best to set up your printer as a shared printer using the Printer Configuration window. Here s how: 1. From the main red hat menu, select System Settings.Printing. The Printer Configuration window appears. 2. Click the name of the printer you want to share. (If the printer is not yet configured, refer to the Setting Up Printers section earlier in this chapter.) 3. Select Action.Sharing. The Sharing Properties window appears. 4. On the Queue tab, click the check box next to This Queue Is Available to Other Computers. The words All hosts should appear in the Allowed Hosts box, indicating that all computers that can access your computer from the network can access the selected printer. If you don t want the printer accessible to everyone, you can always click Edit and change the configuration to share your printer in one of the following ways: All hosts The default, where any computer can print on the printer. Network devices If you have a LAN connection, you can select Network Devices and click the interface (such as eth0) to allow computers on the LAN to access your printer. This is a good choice if, for example, your computer is acting as a router. You could allow computers on your LAN to access your printer but not allow computers from the Internet to use the printer. Network address You can restrict access to your printer to a select set of network addresses. The address pool can be indicated with a CIDR address (for example, a CIDR equivalent for a class C netmask of 255.255.255.0 is /24). Single IP address You can indicate that a particular IP address can access your printer. Repeat this step to add more than a single IP address. 5. If you want only selected hosts to access your printer, click Remove (to remove the All Hosts line), and then click Add. 6. Click OK to continue. 7. In the Sharing Properties window, click OK. 8. From the Printer Configuration window, click Apply to apply the changes.
Note: If you are looking for cheap and reliable webhost to host and run your mysql application check mysql web server services.

654 Part V (Java web server) . Running Servers The root

Thursday, September 20th, 2007

654 Part V . Running Servers The root user can remove all the print jobs for a specific user by indicating that user on the lprm command line. For example, to remove all print jobs for the user named mike, the root user would type the following: $ lprm mike To remove an individual print job from the queue, indicate its job number on the lprm command line. To find the job number, type the lpq command. Here s what the output of that command may look like: $ lpq printer is ready and printing Rank Owner Job Files Total Size Time active root 133 /home/jake/pr1 467 2 root 197 /home/jake/mydoc 23948 The output shows two printable jobs waiting in the queue. (The printer is ready and printing the job listed as active.) Under the Job column, you can see the job number associated with each document. To remove the first print job, type the following: # lprm 133 Configuring Print Servers You ve configured a printer so that you and the other users on your computer can print to it. Now you want to share that printer with other people in your home, school, or office. Basically, that means configuring the printer as a print server. The printers that are configured on your Linux system can be shared in different ways with other computers on your network. Not only can your computer act as a Linux print server (by configuring CUPS), it can also look to client computers such as an SMB print server. After a local printer is attached to your Linux system and your computer is connected to your local network, you can use the procedures in this section to share it with client computers using a Linux (UNIX) or SMB interface. Configuring a Shared CUPS Printer Making the local printer added to your Linux computer available to other computers on your network is fairly easy. If a TCP/IP network connection exists between the computers sharing the printer, you simply grant permission to all hosts, individual hosts, or users from remote hosts to access your computer s printing service. To manually configure a printer entry in the /etc/cups/cupsd.conf file to accept print jobs from all other computers, add an Allow from All line. Using an example from a cupsd.conf entry earlier in this chapter, here s what the new entry would look like:
From our experience, we are can tell you that you can find a reliable and cheap webhost service at Java Web Hosting services.

Chapter 25 . Running a Print Server 653 (Web hosting billing)

Wednesday, September 19th, 2007

Chapter 25 . Running a Print Server 653 export PRINTER=lp3 To override the default printer, specify a particular printer on the lpr command line. The following example uses the -P option to select a different printer: $ lpr -P canyonps doc1.ps The lpr command has a variety of options that enable lpr to interpret and format several different types of documents. These include -# num, where num is replaced by the number of copies to print (from 1 to 100) and -l (which causes a document to be sent in raw mode, presuming that the document has already been formatted). To learn more options to lpr, type man lpr. Listing Status with lpc Use the lpc command to list the status of your printers. Here is an example: $ lpc status hp: printer is on device parallel speed -1 queuing is enabled printing is disabled no entries daemon present deskjet_5550: printer is on device /dev/null speed -1 queuing is enabled printing is disabled no entries daemon present This output shows two active printers. The first (hp) is connected to your parallel port. The second (deskjet_5550) is a network printer (shown as /dev/null). The hp printer is currently disabled (offline), although the queue is enabled so people can continue to send jobs to the printer. Removing Print Jobs with lprm Users can remove their own print jobs from the queue with the lprm command. Used alone on the command line, lprm removes all the user s print jobs from the default printer. To remove jobs from a specific printer, use the -P option, as follows: $ lprm -P lp0 To remove all print jobs for the current user, type the following: $ lprm -
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

652 Part V . Running Servers The first (Web host server)

Tuesday, September 18th, 2007

652 Part V . Running Servers The first three examples show the form for local printers (parallel, serial, and scsi). The other examples are for remote hosts. In each case, hostname can be the host s name or IP address. Port numbers or paths identify the locations of each printer on the host. If you find that you are not able to print because a particular printer driver is not supported in CUPS, you can set up your printer to accept jobs in raw mode. This can work well if you are printing from Windows clients that have the correct print drivers installed. To enable raw printing in CUPS, uncomment the following line in the /etc/cups/mime.types file in Linux: application/octet-stream And uncomment the following line in the /etc/cups/mime.convs file: application/octet-stream application/vnd.cups-raw 0 - After that, you can print files as raw data to your printers without using the -oraw option to print commands. Using Printing Commands To remain backward compatible with older UNIX and Linux printing facilities, CUPS supports many of the old commands for working with printing. Most command-line printing with CUPS can be performed with the lpr command. Word-processing applications such as StarOffice, OpenOffice, and AbiWord are set up to use this facility for printing. You can use the Printer Configuration window to define the filters needed for each printer so that the text can be formatted properly. Options to the lpr command can add filters to properly process the text. Other commands for managing printed documents include lpq (for viewing the contents of print queues), lprm (for removing print jobs from the queue), and lpc (for controlling printers). Printing with lpr You can use the lpr command to print documents to both local and remote printers. Document files can be either added to the end of the lpr command line or directed to the lpr command using a pipe (|). Here s an example of a simple lpr command: $ lpr doc1.ps When you specify just a document file with lpr, output is directed to the default printer. As an individual user, you can change the default printer by setting the value of the PRINTER variable. Typically, you would add the PRINTER variable to one of your startup files, such as $HOME/.bashrc. Adding the following line to your .bashrc file, for example, would set your default printer to lp3: Tip
From our experience, we are can tell you that you can find a reliable and cheap webhost service at Java Web Hosting services.