[ Pobierz całość w formacie PDF ]
.The first field is an identifierthat uniquely labels an entry in the file; traditionally it is two characters, but modern versions allow four.Thesecond field is the list of run levels at which this entry should be active.A run level is a means of providingalternate machine configurations and is implemented using trees of startup scripts stored in directories called/etc/rc1.d, /etc/rc2.d, etc.This feature is typically implemented very simply, and you should modelyour entries on others in the file or refer to your system documentation for more information.The third fielddescribes when to take action.For the purposes of running a getty program, this field should be set torespawn, meaning that the command should be re-executed automatically when it dies.There are severalother options, as well, but they are not useful for our purposes here.The fourth field is the actual command toexecute; this is where we specify the mgetty command and any arguments we wish to pass it.In our simpleexample we're starting and restarting mgetty whenever the system is operating at either of run levels two orthree, and are supplying as an argument just the name of the device we wish it to use.The mgetty commandassumes the /dev/, so we don't need to supply it.This chapter was a quick introduction to mgetty and how to offer login prompts to serial devices.You can findmore extensive information in the Serial-HOWTO.After you've edited the configuration files, you need to reload init to make the changes take effect.Simply senda hangup signal to the init process; it always has a process ID of one, so you can use the following commandsafely:# kill -HUP 1Prev Home NextUsing the Configuration Utilities Up Configuring TCP/IP Networking[ Please note that the University of Edinburgh is not responsible for the content ofthese WWW pages.For queries please contact user@ph.ed.ac.uk whereuser appears after the ~ and before the / in the URL for this page ]Linux Network Administrators GuidePrev NextChapter 6.Name Service and Resolver ConfigurationRunning namednamed (pronounced name-dee) provides DNS on most Unix machines.It is a server program originally developed forBSD to provide name service to clients, and possibly to other name servers.BIND Version 4 was around for some timeand appeared in most Linux distributions.The new release, Version 8, has been introduced in most Linux distributions,and is a big change from previous versions.[1] It has many new features, such as support for DNS dynamic updates, DNSchange notifications, much improved performance, and a new configuration file syntax.Please check the documentationcontained in the source distribution for details.This section requires some understanding of the way DNS works.If the following discussion is all Greek to you, you maywant to reread the section the section called How DNS Works."named is usually started at system boot time and runs until the machine goes down again.Implementations of BINDprior to Version 8 take their information from a configuration file called /etc/named.boot and various files that mapdomain names to addresses.The latter are called zone files.Versions of BIND from Version 8 onwards use/etc/named.conf in place of /etc/named.boot.To run named at the prompt, enter:# /usr/sbin/namednamed will come up and read the named.boot file and any zone files specified therein.It writes its process ID to/var/run/named.pid in ASCII, downloads any zone files from primary servers, if necessary, and starts listening onport 53 for DNS queries.The named.boot FileThe BIND configuration file prior to Version 8 was very simple in structure.BIND Version 8 has a very differentconfiguration file syntax to deal with many of the new features introduced.The name of the configuration file changedfrom /etc/named.boot, in older versions of BIND, to /etc/named.conf in BIND Version 8.We'll focus onconfiguring the older version because it is probably what most distributions are still using, but we'll present an equivalentnamed.conf to illustrate the differences, and we'll talk about how to convert the old format into the new one.The named.boot file is generally small and contains little but pointers to master files containing zone information andpointers to other name servers.Comments in the boot file start with the (#) or (;) characters and extend to the nextnewline.Before we discuss the format of named.boot in more detail, we will take a look at the sample file for vlagergiven in Example 6-8.Example 6-8.The named.boot File for vlager;; /etc/named.boot file for vlager.vbrew.com;directory /var/named;; domain file;-----------------cache.named.caprimary vbrew.com named.hostsprimary 0.127.in-addr.arpa named.localprimary 16.172.in-addr.arpa named.revLet's look at each statement individually.The directory keyword tells named that all filenames referred to later in thisfile, zone files for example, are located in the /var/named directory.This saves a little typing
[ Pobierz całość w formacie PDF ]