Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Linux+ Certification Bible.pdf
Скачиваний:
46
Добавлен:
15.03.2015
Размер:
3.78 Mб
Скачать

Chapter 8 User Environment Settings 273

Printers

3.8 Add and configure printers

The task of configuring printers for the modern Linux system can entail a large number of steps by the administrator. Linux can support serial, parallel, USB (Universal Serial Bus), and network printers. However, Linux makes the installation of these printers easy with the linuxconf program. To use the linuxconf program, follow these steps:

1.From the main menu of linuxconf, select the Peripherals option and then select the Printer option.

2.If the lpd (line printer spooler) daemon, which provides the ability to print, is not installed or configured correctly, you are presented with the option to configure it.

3.Use the options shown in Figure 8-2 to allow the configuration of a printer.

Figure 8-2: Configure a printer

4.Select Add/Edit printers to name the printer. When you select the add option, you are presented with the menu shown in Figure 8-3.

274 Part III Configuration

Figure 8-3: Add a printer

5.From this menu, you can also choose to configure a local printer, a remote printer, an SMB/Windows printer, and a Netware Printer (NCP). Enter the name of the printer and select the method of connection to the printer. Then make any additional configurations to allow the newly attached printer to be used on the system.

Configuration files

3.11 Identify the purpose and characteristics of configuration files (e.g., BASH, inittab, fstab, /etc/*)

Several files, which are listed in Table 8-4, control the configuration of many devices.

Chapter 8 User Environment Settings 275

 

Table 8-4

 

System Configuration Files

 

 

File

Description

 

 

/etc/sysconfig

Directory on Red Hat Linux that holds system configuration

 

files

 

 

/etc/rc.d/rc.sysinit

Initialization file for the system

 

 

/etc/rc.config

Configuration file for SuSE Linux system

 

 

/etc/rc.d/rc.local

Initialization file for custom commands

 

 

/etc/rc.d/rc.modules

Loads kernel modules on startup of the system

 

 

/etc/rc.d/init.d

Directory that holds many of the daemons, servers, and scripts

 

for the System V init startup control standard

 

 

/sbin/init.d

Directory that holds many of the daemons, servers, and scripts

 

for a SuSE system

 

 

/etc/rc.d/init.d/lpd

Start up and shut down the lpd printing daemon

 

 

/etc/rc.d/init.d/inet

Operations to start and stop the inetd internet services

 

daemon

 

 

/etc/rc.d/init.d/network

Operations to start and stop the network connections

 

 

/etc/X11

X Windows configuration files

 

 

/etc/lilo.conf

LILO configuration file

 

 

/etc/fstab

List of Linux file systems to mount automatically at startup

 

 

/etc/inittab

The default state and terminal connections

 

 

See Chapter 5 for more information on system files.

Editing these system files with the vi editor allows for the manual configuration of the Linux system and enables new devices and other environmental variables.

276 Part III Configuration

Setting environment variables

3.3 Set environment variables (e.g, PATH, DISPLAY, TERM)

Setting up environmental variables, such as the display, terminal, initialization level, system paths, and many other settings are configuration parameters that affect all of your Linux sessions. One of the major files used to control a Linux system is the inittab file, usually found at /etc/inittab, and this file usually contains information similar to the following:

# inittab

This file describes how the INIT process should set up

#

the system in a certain run-level.

#

 

# Author:

Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>

#Modified for RHS Linux by Marc Ewing and Donnie Barnes

#Default runlevel. The runlevels used by RHS are:

#0 - halt (Do NOT set initdefault to this)

#1 - Single user mode

#2 - Multiuser, without NFS (The same as 3, if you do not have

#networking)

#3 - Full multiuser mode

#4 - unused

#5 - X11

#6 - reboot (Do NOT set initdefault to this)

#

id:5:initdefault:

# System initialization. si::sysinit:/etc/rc.d/rc.sysinit

l0:0:wait:/etc/rc.d/rc 0 l1:1:wait:/etc/rc.d/rc 1 l2:2:wait:/etc/rc.d/rc 2 l3:3:wait:/etc/rc.d/rc 3 l4:4:wait:/etc/rc.d/rc 4 l5:5:wait:/etc/rc.d/rc 5 l6:6:wait:/etc/rc.d/rc 6

#Things to run in every runlevel. ud::once:/sbin/update

#Trap CTRL-ALT-DELETE ca::ctrlaltdel:/sbin/shutdown -t3 -r now

#When our UPS tells us power has failed, assume we have a few minutes

#of power left. Schedule a shutdown for 2 minutes from now.

#This does, of course, assume you have powerd installed and your

#UPS connected and working correctly.

pf::powerfail:/sbin/shutdown -f -h +2 “Power Failure; System Shutting Down”

Соседние файлы в предмете Операционные системы