Red Hat [Electronic resources] : The Complete Reference Enterprise Linux Fedora Edition؛ The Complete Reference نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Red Hat [Electronic resources] : The Complete Reference Enterprise Linux Fedora Edition؛ The Complete Reference - نسخه متنی

Richard L. Petersen

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید




Configuration Directories and Files



When you configure different elements of your system, like users, applications, servers, or network connections, you make use of configuration files kept in certain system directories. On Red Hat, configuration files are placed in the /etc directory, with more specific device and service configuration files located in the /etc/sysconfig directory.



Configuration Files: /etc



The /etc directory holds your system, network, server, and application configuration files. Here you can find the fstab file listing your file systems, the hosts file with IP addresses for hosts on your system, and grub.conf for the boot systems supported by the GRUB boot loader. This directory includes various subdirectories, such as /apache for the Apache Web server configuration files and /X11 for the X Window System and window manager configuration files. You can configure many applications and services by directly editing their configuration files, though it is best to use a corresponding administration tool, like those provided by Red Hat. Table 27-7 lists several commonly used configuration files found in the /etc directory.



/etc/sysconfig



On Red Hat systems, configuration and startup information is also kept in the /etc/sysconfig directory. Here you will find files containing definitions of system variables used to configure devices such as your keyboard and mouse. These entries were defined for you when you configured your devices during installation. You will also find network definitions as well as scripts for starting and stopping your network connections.


A sample of the keyboard file, /etc/sysconfig/ keyboard, is shown here.


KEYBOARDTYPE="pc"
KEYTABLE="us"























































Table 27-7: Configuration Files



File




Description




/etc/inittab




Sets the default state, as well as terminal connections




/etc/passwd




Contains user password and login configurations




/etc/shadow




Contains user-encrypted passwords




/etc/group




Contains a list of groups with configurations for each




/etc/fstab




Automatically mounts file systems when you start your system




/etc/grub.conf




The GRUB configuration file for the GRUB boot loader




/etc/modules.conf




Modules on your system to be automatically loaded




/etc/printcap




Contains a list of each printer and its specifications




/etc/termcap




Contains a list of terminal type specifications for terminals that could be connected to the system




/etc/skel




Directory that holds the versions of initialization files, such as


.bash_profile
, which are copied to new users' home directories




/etc/services




Services run on the system and the ports they use




/etc/profile




Default shell configuration file for users




/etc/shells




Shells installed on the system that users can use




/etc/motd




System administrator's message of the day




Several of these files are generated by Red Hat administration tools such as redhat- config-mouse, redhat-config-keyboard, or redhat-config-network. Table 27-8 lists several commonly used tools and the sysconfig files they control. For example, redhat-config- mouse generates configuration variables for the mouse device name, type, and certain features, placing them in the /etc/sysconfig/mouse file, shown here:


FULLNAME="Generic - 3 Button Mouse (PS/2)"
MOUSETYPE="PS/2"
XMOUSETYPE="PS/2"
XEMU3="no"
DEVICE=/dev/mouse


Other files like, hwconf, list all your hardware devices, defining configuration variables such as its class (video, CD-ROM, hard drive) the bus it uses (PCI, IDE), its device name (such as hdd or st0), the drivers it uses, and a description of the device. A CD-ROM entry is shown here:


class: CDROM
bus: IDE
detached: 0
device: hdd
driver: ignore
desc: "TOSHIBA DVD-ROM SD-M1402"


Several directories are included, such as network-scripts, which list several startup scripts for network connections—such as ifup-ppp, which starts up PPP connections.



































Table 27-8: Sysconfig Files with Corresponding Red Hat System Administration Tools



Tools




Configuration files




Description




authconfig-gtk




/etc/sysconfig/ authconfig/etd/sysconfig/network




Authentication options, such as enabling NIS, shadow passwords, Kerberos, and LDAP.




redhat-config-securitylevel




/etc/sysconfig/iptables




Selects the level of firewall protection: High, Medium, and None.




redhat-config-keyboard




/etc/sysconfig/keyboard




Selects the keyboard type.




redhat-config-mouse




/etc/sysconfig/mouse




Selects the mouse type.




redhat-config-network




/etc/sysconfig/network/ etc/sysconfig/network-scripts/ifcfg-ethN




Sets your network settings.




redhat-config-date




/etc/sysconfig/clock




Sets the time and date.




redhat-logviewer




/etc/sysconfig/redhat-logviewer




Red Hat Log Viewer, views and searches system logs.




Some administration tools use more than one sysconfig file. redhat-config-network places its network configuration information like the hostname and gateway in the /etc/sysconfig/network file. Specific Ethernet device configurations, which would include your IP address and netmask, are placed in the appropriate Ethernet device configuration file in the /etc/sysconfig/network-scripts directory. For example, the IP address and netmask used for the eth0 Ethernet device can be found in /etc/sysconfig/network-scripts/ifcfg-eth0. Local host settings are in /etc/sysconfig/network-scripts/ifcfg-lo.






Tip


Some administration tools, like authconfig-gtk, will further configure configuration files for the services selected. The authconfig-gtk tool configures /etc/sysconfig/authconfig as well as /etc/krb5.conf for Kerberos authentication, /etc/yp.conf for NIS support, and /etc/openldap/ldap.conf for LDAP authentication.




/ 328