`
wutao8818
  • 浏览: 615194 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论

build a highly available cluster [1]

阅读更多
最近在读Karl Kopper 用商业硬件和免费软件构建高可用集群。顺便记录一些有价值的内容。同时也希望能对其它关心这方面内容的朋友有帮助。

书的开头介绍了一些很基础的linux操作。以前不是很清楚的地方,这次也一并熟悉一下。

1.2 使用init启动服务
内核启动并运行最初的初始步骤之后,init守护进程(所有进程的父进程)将被启动。然后init按照/etc/inittab配置中个的各项,启动必要的守护进程。

/etc/inittab 定义了0-6 7个系统运行级别 7行代码

每当系统的运行级别发生变化时,需要运行一次rc程序(/etc/rc.d/rc脚本)
init将包含运行级别号(0-6)的单字符参数传递给rc程序。然后rc程序启动/etc/rc.d目录下相应运行级别子目录中的所有以S开头的脚本。没有理解错的话S应该是start的缩写。
默认运行级别由/etc/inittab文件中的initdefault行定义:
id:3:initdefault

使用runlevel命令查看当前运行级别。

不运行图形界面的redhat linux默认级别为3.即init传递3给rc,rc运行/etc/rc3.d目录下以S开头的各个脚本,并为他们传递参数start。当系统管理员用shutdown命令时
传递给rc 3 ,rc运行/etc/rc3.d下以K(kill)开头的脚本,传递stop参数。

redhat 所有运行级别子目录内容

ls -l /etc/rc.d/rc?.d |less


值得注意的是这下面的kill start脚本只是指向/etc/rc.d/init.d目录下真实脚本的符号链接,可以通过创建移除这些符号链接来控制每个运行级别上运行的程序。






分享到:
评论

相关推荐

    Mastering.Hyper-V

    Using the book's effective step-by-step approach, build a highly available Hyper-V cluster Who This Book Is For This book is mainly targeted at the common network and system administrator who has to ...

    Learning Apache Cassandra - Second Edition

    Master the advanced features available in Cassandra 3.x through a step-by-step tutorial and build a scalable, high performance database layer Book Description Cassandra is a distributed database ...

    Distributed.Computing.with.Python.178588969

    You'll learn to write data processing programs in Python that are highly available, reliable, and fault tolerant Make use of Amazon Web Services along with Python to establish a powerful remote ...

    Unix solaris 11.1 iso最新版本

    highly available capabilities of Oracle Solaris Cluster 4.1 and the built-in virtualization of Oracle Solaris 11.1 helps customers bring their most mission-critical applications into a cost effective...

    AkkaScala.pdf

    By understanding these concepts and utilizing the tools provided by Akka, developers can build robust, scalable, and fault-tolerant applications that can handle a wide range of challenges. Whether you...

    微软内部资料-SQL性能优化5

    If you build a clustered index without specifying the unique keyword, SQL Server forces uniqueness by adding a uniqueifier to the rows when necessary. This uniqueifier is a 4-byte value added as an ...

    [Go语言入门(含源码)] The Way to Go (with source code)

    The Way to Go,: A Thorough Introduction to the Go Programming Language 英文书籍,已Cross the wall,从Google获得书中源代码,分享一下。喜欢请购买正版。 目录如下: Contents Preface......................

    The way to go

    Chapter 1—Origins, Context and Popularity of Go...............................................................1 1.1 Origins and evolution................................................................

    vxworks_kernel_programmers_guide_6.9

    1 Overview ...................................................................................................... 3 1.1 Introduction ......................................................................

Global site tag (gtag.js) - Google Analytics