Tanzania Teacher Colleges: How to Set Up a New Printer

  1. Ensure that the necessary packages are installed on each server:

    SUNWpcr, SUNWpcu, SUNWpsu, SUNWpsr, SUNWppm

    pkginfo | /usr/xpg4/bin/grep -E '\<(SUNWpcr|SUNWpcu|SUNWpsu|SUNWpsr|SUNWppm)\>'

    The output from the above command should be 5 lines:

    system      SUNWpcr                          Solaris Print - Client, (root)
    system      SUNWpcu                          Solaris Print - Client, (usr)
    system      SUNWppm                          Solaris Print Manager
    system      SUNWpsr                          Solaris Print - LP Server, (root)
    system      SUNWpsu                          Solaris Print - LP Server, (usr)
    			

    If any of the packages is missing, install it from original Solaris install media; see Appendix A below for details.

    Don't forget to check both servers.

  2. Physically set up the printer:

    1. Choose a location for the printer. It should be supervised at all times to prevent theft of paper and toner. It will need an electrical socket and a network connection.
    2. Connect the printer power cable.
    3. Use a network cable to connect the printer to a port on a thin client network switch (not an external network switch). This ensures that the printer is controlled directly by the Solaris servers, and is not accessible to other computers on the network except through the servers. This will simplify administration.

  3. Logically configure the printer:

    1. Choose a name for the printer. For this example, the name hp is used.
    2. Choose an IP address and mask for the printer. For this example, the address 10.0.10.254 is used, ip mask 255.255.0.0.
      This address must be excluded from the addresses that the servers allocate during BootP processing. How to do this has not yet been calculated.
    3. Assign the ip address & ip mask on the printer using the printer operator panel:
      1. Press the Menu button.
      2. Press "down arrow" button until CONFIGURE DEVICE is selected. Press the green "check mark" button.
      3. Press "down arrow" button until I/O is selected. Press the green "check mark" button.
      4. Press "down arrow" button until EMBEDDED JETDIRECT MENU is selected. Press the green "check mark" button.
      5. TCP/IP is selected; Press the green "check mark" button.
      6. Press "down arrow" button until IPV4 SETTINGS is selected. Press the green "check mark" button.
      7. Press "down arrow" button until MANUAL SETTINGS is selected. Press the green "check mark" button.
      8. IP ADDRESS is selected; Press the green "check mark" button.
      9. Use the "up arrow" and "down arrow" buttons to select the first part of the IP address you chose above. Press the green "check mark" button.
      10. Repeat the above step until all parts of the IP address have been entered. The "Setting saved" message will appear.
      11. Press "down arrow" button until SUBNET MASK is selected. Press the green "check mark" button.
      12. As with the IP Address, enter the subnet mask. The "Setting Saved" message will appear.
      13. Press the "Menu" button. Configuration is complete.

  4. Edit the /etc/hosts file

    On server 1 as root, add an entry to the /etc/hosts file for the printer, using the name and IP address that you chose above:

    10.0.10.254	hp
    		
  5. Use the print manager to add the printer

    On server 1 as root:

    1. Start the Print Manager:
      Launch -> Preferences -> System Preferences -> Add/Remove Printer
    2. Verify Naming Service is "files"; click "OK".
    3. Menu: Printer -> New Network Printer...
    4. Printer Name: enter the name you chose above.
    5. Printer Server: fixed - should be server 1
    6. Description: enter a description of the printer. It could include the type of printer and location, for example:"HP P3005DN in server room".
    7. Printer Make: as appropriate; for HP P3005DN, choose:HP
    8. Printer Model: as appropriate; for HP P3005DN, choose:HP LaserJet (it is the last LaserJet listed)
    9. Printer Driver: for HP 3005DN, choose default:foomatic/laserjet
    10. Fault Notification: Write to Superuser (default)
    11. Destination: enter the same name as you added to the /etc/hosts file, for example:hp
    12. Protocol: BSD
    13. Options/default: check "Default Printer" box
    14. Options/banner: Never print banner
    15. User Access List: all (default)
    16. Click on "OK" button at bottom. Printer will be added and should appear in list of printers.
    17. Close the Print Manager.

  6. Verify that printer is the default

    On server 1 as root:

    1. Start Printer Preferences:
      Launch -> Preferences -> Printer Preferences
    2. The new printer should appear with a green check-mark superimposed on it (indicating default). If it does not appear:
      1. Menu -> View -> Select Printers to Show
      2. Click "Show all".
      3. Click the checkbox next to the new printer.
      4. Cllick "OK".
    3. Close the Print Manager window.

  7. Re-start the lp scheduler

    On server 1 as root, enter the following commands:

    /usr/lib/lpshut
    /usr/lib/lpsched
    
  8. Test print - server 1

    On server 1, enter the following command:

    lp /etc/hosts
    

    The contents of the /etc/hosts file should print.

  9. Configure Server 2

    On server 2 as root, enter the following commands:

    lpadmin -p hp -s Server1\!hp
    lpadmin -d hp
    

    where hp is the printer name as selected above, and Server1 is the correct server name, e.g. Morogoro1.

  10. Test print - server 2

    On server 2, enter the following command:

    lp /etc/hosts
    

    the contents of the /etc/hosts file should print.

Appendix A

Installation of missing print packages

The missing packages should be on the original installation media. (Presumably they were not selected for installation.) For each of the missing packages (identified above) do the following:

(SUNWxxx represents the name of the package)

  1. Find the missing package.

    Assuming that the installation media is on /cdrom, run the following command:

    find /cdrom -follow -name SUNWxxx -print | grep "SUNWxxx$"
    

    This will print out the directory containing the necessary package files, for example:

    /cdrom/cdrom0/Solaris_10/Product/SUNWxxx
    
  2. Copy it to the install location.

    The package installer expects package files to be in /var/spool/pkg. Run the following command to move the files, substituting the location from the find command above and the correct name of the package:

    cp -r /cdrom/cdrom0/Solaris_10/Product/SUNWxxx /var/spool/pkg/SUNWxxx
    
  3. If moving it from one machine to another:

    It will be easier to archive all of the files into a single file, similar to a "zip" archive on a PC. You can do this with the following command, substituting the package name. It will create the file SUNWxxx.tar, which can be moved via FTP, copy via USB drive, etc:

    tar cv SUNWxxx.tar /var/spool/pkg/SUNWxxx
    

    Then, when the file is on the destination system, use the following command to extract the files:

    tar xf SUNWxxx.tar
    
  4. Install the package.

    Once the package files are in the /var/spool/pkg directory, use the following command to install the package:

    pkgadd SUNWxxx
    

Please send feedback to alingelb at yahoo dot com