1 / 16

Linux Initialization

Linux Initialization. Kernel assumes control after Linux loaded Executes first daemon process (init daemon) /etc/inittab: Configuration file for init daemon. init and its Scripts. init program Master control program Starts many other programs Runs scripts to initialize system services

rodney
Download Presentation

Linux Initialization

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Linux Initialization • Kernel assumes control after Linux loaded • Executes first daemon process (init daemon) • /etc/inittab: Configuration file for init daemon

  2. init and its Scripts • init program • Master control program • Starts many other programs • Runs scripts to initialize system services • Controlled by /etc/inittab configuration file • Three main configuration files located in /etc/rc.d • rc.sysinit • rc • rc.local

  3. Understanding Run Levels • Run level • Numbered mode of operation • Preconfigured set of services is activated • Defined in /etc/inittab file • Default run level 5 • init or telinit command • Change to different run level • Commonly done only to restart or halt system

  4. Understanding Run Levels

  5. Understanding rc Scripts • rc script • Located in /etc/rc.d directory • Started with parameter that includes run level • Starts appropriate system services based on selected run level • Each run level is associated with subdirectory • Located in /etc/rc.d directory

  6. Understanding rc Scripts • Each file begins with K or S followed by two-digit number • Begin with K―stopped (killed) • Begin with S―started • Files symbolic links to scripts that stop and start services

  7. Understanding rc Scripts

  8. Controlling Services • Many services listed in run-level directories relate to networking • Scripts allow user to change almost anything on Linux system without restarting computer

  9. Managing Services • service command • Control service • Must know service name • Examples: • service “service” stop • service “service” start • service “service” restart • service “service” status

  10. Managing Services • chkconfig command • Alter files in run-level directories • Modify services started or stopped each time system started • By default alters run levels 2 through 5 • Example: • chkconfig named on • chkconfig named off • chkconfig named –list

  11. Managing Services Graphically • Service configuration utility • Main window lists services available on system • Determined by contents of /etc/rc.d/init.d • Active services • Shown with check mark next to them

  12. Managing Services Graphically

  13. Configuring System Services • Initialization scripts in /etc/rc.d/init.d • Typically use configuration information located in /etc/sysconfig directory and subdirectories • Files in /etc/sysconfig • Named for services • Each file contains name-value pairs • Define configuration options for service

  14. Configuring System Services • Use system-config-network utility to configure • /etc/sysconfig/ network file • Files within /etc/sysconfig/network-scripts • system-config-securitylevel utility • Alters /etc/sysconfig/system-config-securitylevel file • Based on firewall selections • Service itself often has another set of configuration files in /etc directory

  15. Runlevels • Runlevel: Defines number and type of daemons loaded into memory and executed • init daemon responsible for changing runlevels • Often called initstates • runlevel command: Displays current and most recent runlevel • init command: Change OS runlevel • telinit command: Alias to init command

  16. ntsysv utility: Modifies file entries in /etc/rc.d/rc*.d directories Figure 9-10: Results of ntsysv―level 5 command

More Related