Linux下chkconfig命令详解

【Linux命令大全】005.系统设置之chkconfig命令(实操篇) Linux的chkconfig命令是管理SysVinit系统服务启动级别的工具,主要用于RHEL/CentOS 6及更早版本。它允许管理员设置服务在不同运行级别下的启动状态,支持查看(--list)、启用(on)、禁用(off)服务等操作。高级用法包括设置特定运行级别状态(--level)、添加(--add)和删除(--del)服务管理。注意:现代Linux系统(如CentOS 7+)已改用systemctl命令。实用技巧包括批量管理服务和检查当前运行级别(runlevel)。 阅读详情

==================================================================

      here : http://www.cnblogs.com/panjun-Donet/archive/2010/08/10/1796873.html

==================================================================

Linux下chkconfig命令详解

chkconfig命令主要用来更新(启动或停止)和查询系统服务的运行级信息。谨记chkconfig不是立即自动禁止或激活一个服务,它只是简单的改变了符号连接。

使用语法:
chkconfig [--add][--del][--list][系统服务] 或 chkconfig [--level <等级代号>][系统服务][on/off/reset]

chkconfig在没有参数运行时,显示用法。如果加上服务名,那么就检查这个服务是否在当前运行级启动。如果是,返回true,否则返回false。如果在服务名后面指定了on,off或者reset,那么chkconfi 会改变指定服务的启动信息。on和off分别指服务被启动和停止,reset指重置服务的启动信息,无论有问题的初始化脚本指定了什么。on和off开关,系统默认只对运行级3,4,5有效,但是reset可以对所有运行级有效。

参数用法:
   --add  增加所指定的系统服务,让chkconfig指令得以管理它,并同时在系统启动的叙述文件内增加相关数据。
   --del  删除所指定的系统服务,不再由chkconfig指令管理,并同时在系统启动的叙述文件内删除相关数据。
   --level<等级代号>  指定读系统服务要在哪一个执行等级中开启或关毕。
      等级0表示:表示关机
      等级1表示:单用户模式
      等级2表示:无网络连接的多用户命令行模式
      等级3表示:有网络连接的多用户命令行模式
      等级4表示:不可用
      等级5表示:带图形界面的多用户模式
      等级6表示:重新启动
      需要说明的是,level选项可以指定要查看的运行级而不一定是当前运行级。对于每个运行级,只能有一个启动脚本或者停止脚本。当切换运行级时,init不会重新启动已经启动的服务,也不会再次去停止已经停止的服务。

    chkconfig --list [name]:显示所有运行级系统服务的运行状态信息(on或off)。如果指定了name,那么只显示指定的服务在不同运行级的状态。
    chkconfig --add name:增加一项新的服务。chkconfig确保每个运行级有一项启动(S)或者杀死(K)入口。如有缺少,则会从缺省的init脚本自动建立。
    chkconfig --del name:删除服务,并把相关符号连接从/etc/rc[0-6].d删除。
    chkconfig [--level levels] name:设置某一服务在指定的运行级是被启动,停止还是重置。

运行级文件:
每个被chkconfig管理的服务需要在对应的init.d下的脚本加上两行或者更多行的注释。第一行告诉chkconfig缺省启动的运行级以及启动和停止的优先级。如果某服务缺省不在任何运行级启动,那么使用 - 代替运行级。第二行对服务进行描述,可以用\ 跨行注释。
例如,random.init包含三行:
# chkconfig: 2345 20 80
# description: Saves and restores system entropy pool for \
# higher quality random number generation.

使用范例:
chkconfig --list        #列出所有的系统服务
chkconfig --add httpd        #增加httpd服务
chkconfig --del httpd        #删除httpd服务
chkconfig --level httpd 2345 on        #设置httpd在运行级别为2、3、4、5的情况下都是on(开启)的状态
chkconfig --list        #列出系统所有的服务启动情况
chkconfig --list mysqld        #列出mysqld服务设置情况
chkconfig --level 35 mysqld on        #设定mysqld在等级3和5为开机运行服务,--level 35表示操作只在等级3和5执行,on表示启动,off表示关闭
chkconfig mysqld on        #设定mysqld在各等级为on,“各等级”包括2、3、4、5等级

如何增加一个服务:
1.服务脚本必须存放在/etc/ini.d/目录下;
2.chkconfig --add servicename
    在chkconfig工具服务列表中增加此服务,此时服务会被在/etc/rc.d/rcN.d中赋予K/S入口了;
3.chkconfig --level 35 mysqld on
    修改服务的默认启动等级。



【Linux】Linux 基础命令 chkconfig命令 更简单一点,chkconfig是一个用于维护/etc/rc[0-6].d目录的命令行工具。从chkconfig 管理名单中删除该service,并且删除 /etc/rc[0-6].d 目录下所有与之关联的符号链接(symbolic links)。添加一个chkconfig管理的service,并在/etc/rc[0-6].d 目录下添加相应的符号链接(symbolic links)。netconsole 0:关 1:关 2:关 3:关 4:关 5:关 6:关。 阅读详情

相关推荐

Linux 中的 chkconfig 命令及示例

命令用于列出所有可用的服务并查看或更新其运行级别设置。简而言之,它用于列出服务或任何特定服务的当前启动信息,更新服务的。运行级别设置以及在管理中添加或删除服务。chkconfig --列出 rhnsd。chkconfig rhnsd 关闭。chkconfig rhnsd 打开。chkconfig 删除 rhnsd。chkconfig 添加 rhnsd。chkconfig --添加。chkconfig --删除。chkconfig --覆盖。chkconfig --列表。

wly476923083的博客 745

【Shell 命令集合 系统设置 】Linux 管理系统服务 chkconfig命令 使用指南

在Linux中,chkconfig命令用于管理系统服务的启动和停止。它允许用户设置在系统启动时自动运行的服务,并可指定服务的启动级别。

探索C++编程的奥秘,分享深入的技术见解和实践,旨在激发读者创造力与解决问题的思维。 3216

逆向拆解dy接口a_bogus 1.0.1.19版本核心算法(纯算版)第二部分

本文深入解析了dy接口a_bogus 1.0.1.19版本的核心算法,重点介绍了逆向分析的基础方法论、魔改Base64编码识别与还原、随机数生成与位运算解析等关键技术。通过详细的代码示例和实用技巧,帮助开发者掌握逆向工程中的关键步骤,特别是针对a_bogus参数的生成逻辑和混淆处理。

weixin_29288313的博客 408

linux 下 chkconfig 命令详解

Linux 提供了chkconfig 命令用来更新和查询不同运行级上的系统服务。语法为: chkconfig --list [name] 用来列表服务chkconfig --add name 用来添加服务chkconfig --del name 用来删除服务chkconfig [--level levels] name 改变启动信息以及检查特定服务的启动状态。on 和 off 分别指服务在改变运行级时的启动和停止。reset 指初始化服务信息。对于 on 和 off 开关,系统默认只对运行级 3,4, 5有

风声世界的专栏 1172

【Matlab/Unity】跨平台UDP通信实战:从数据发送到实时可视化

本文详细介绍了Matlab与Unity之间通过UDP协议实现跨平台通信的实战方法,涵盖数据发送、接收和实时可视化全流程。针对科研仿真和工业设计场景,提供优化代码示例和性能对比数据,帮助开发者解决低延迟传输、线程安全等关键问题,显著提升跨平台协作效率。

weixin_29044713的博客 153

Python_构建同花顺问财智能选股API服务

本文详细介绍了如何使用Python构建同花顺问财智能选股API服务,涵盖从环境准备、核心API开发到高级功能扩展的全过程。通过Flask框架和pywencai库,开发者可以快速搭建稳定可靠的选股接口,实现自动化股票筛选与交易系统集成,提升量化投资效率。

weixin_30596343的博客 330

Linux中chkconfig命令详解

chkconfig命令用来更新和查询不同运行级上的系统服务 简单地说,比如你安装了mysql,并且你把启动的脚本放在了/etc/rc.d/init.d目录下,有时候你需要开机自动启动它,而有时候则不需要,因此,就可以使用chkconfig命令来进行控制,这个命令就相当于一个开关,不过这个开关有6个档,表示在不同级别下的运行状态是on还是off。 chkconfig命令主要用来更新(启动或停止)和查询系统服务的运行级信息。谨记chkconfig不是立即自动禁止或激活一个服务,它只是简单的改变了符号连接。 使用

过往很淡的博客 1万+

LLC型自驱动半桥谐振变换器:电压电流变化与自然换向解析

变换器的工作状态经历了多个阶段,从模态一的关断状态,到模态二和三的电流供电状态,每个阶段都得到了合理的设计和优化。的工作原理,尤其是在半个周期内的电压和电流变化。上图 展示了该变换器在工作时的电压和电流波形,它为我们揭示了变换器如何通过精确的电流和电压控制,优化性能并实现高效能转换。,并根据负载情况调整电流和电压的工作模式,能够极大提升变换器的效率,尤其是在零电压开通和自然换向的设计中,发挥着关键作用。这意味着,电流会随着时间周期的变化,呈现典型的振荡波形,从而达到良好的电流控制。是两个关键的电流变量。

weixin_43199439的博客 279

linux chkconfig命令用法详解

linux chkconfig命令用法详解

h123_58的博客 2721

Open3D 计算点云配准的旋转和平移误差

通过计算旋转误差和平移误差来量化配准结果与真实变换之间的偏差。

点云侠的博客 250

【100%通过率】华为OD机试真题 Python 实现【网上商城优惠活动 / 模拟商场优惠打折II】

某网上商场举办优惠活动,发布了满减、打折、无门槛3种 优惠券,分别为: 1:每满100元优惠10元,无使用数限制,如100~199元可以使用1张减10元,200~299可使用2张减20元,以此类推; 2:92折券,1次限使用1张,如100元,则优惠后为92元, 3:无门槛5元优惠券,无使用数限制,直接减5元。

MISAYAONE的博客 9371

linux中chkconfig命令的作用,Linux下chkconfig命令详解

使用语法:chkconfig [--add][--del][--list][系统服务] 或 chkconfig [--level ][系统服务][on/off/reset]chkconfig在没有参数运行时,显示用法。如果加上服务名,那么就检查这个服务是否在当前运行级启动。如果是,返回true,否则返回false。如果在服务名后面指定了on,off或者reset,那么chkconfi 会改变指定服...

weixin_28921621的博客 422

一文读懂 STAR-CCM+:多物理场仿真王者,从入门到精通全攻略(附实战路线)

STAR-CCM+是西门子旗下的多物理场仿真平台,集流体、传热、结构、电磁等耦合求解于一体。其核心优势包括:全自动网格处理技术(支持十亿级网格)、多物理场无缝耦合、CPU/GPU并行加速计算、流程自动化与设计探索等。广泛应用于汽车(空气动力学优化、电池热管理)、航空航天(气动设计、发动机仿真)、能源(风电叶片流固耦合)、电子(芯片散热)等行业。相比ANSYS Fluent和OpenFOAM,STAR-CCM+在多物理场耦合和复杂几何处理方面更具优势,适合工业级高精度仿真需求。学习路径建议从基础操作入手,逐步

源代码杀手的博客 339

Linux系统之chkconfig命令详解

chkconfig 是一个用于管理系统服务运行级别信息的工具。它通过管理 /etc/rc[0-6].d 目录中的符号链接,简化了系统管理员手动管理服务启动和停止的任务。chkconfig 支持添加、删除、列出、更改和检查服务的启动信息。

weixin_56303229的博客 597

Neo4j:入门基础(二)之导入CSV文件

导入CSV文件的方式  主要的两种方式如下:   1、使用 Cypher 命令LOAD CSV,这种方式可以处理中小型数据(可达10 million条记录)   2、使用批量导入工具neo4j-admin ,用来直接导入大数据集 三、上述方式具体导入过程   1、Cypher 命令LOAD CSV 参数 1、USING PERIODIC COMMIT 300 使用批量提交,每满300条提交一次,防止内存溢出 2、WITH HEADERS 从文件中读取第一行作为参数名,...

Puzzle的博客 3万+

RU DOS版、EFI版32bit/64bit BIOS常用工具

DOS版、EFI版的RU工具,可用来查看IO、MEM、PCI、SMBIOS等资源。亲测在EFI SHELL下可用。

Linux学习之chkconfig命令详解

本文和大家分享的主要是linux中chkconfig相关内容,一起来看看吧,希望对大家学习linux有所帮助。   chkconfig命令主要是LinuxRed Hat系列发行版用来检查、设置系统的各种服务。chkconfig可以非常方便的把一个服务加入开机启动,也可以把某个服务从开机启动中删除。chkconfig不是立即自动禁止或激活一个服务,它只是简单的改变了符号连接。   chk

qq_32506555的博客 452

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

linux中chkconfig命令的作用,Linux系统下chkconfig命令使用详解

chkconfig命令可以用来检查、设置系统的各种服务使用语法:chkconfig [--add][--del][--list][系统服务] 或 chkconfig [--level ][系统服务][on/off/reset]参数用法:--addà增加所指定的系统服务,让chkconfig指令得以管理它,并同时在系统启动的叙述文件内增加相关数据。--delà删除所指定的系统服务,不再由chkco...

weixin_30579759的博客 1426

IEM模型,地表粗糙度模拟

利用微波反演土壤水分时候,利用IEM模型可以实现对随机地表的模拟

IMSL CNL 7.0.0 (x86-64)Crack

IMSL CNL 7.0.0 (x86-64)Crack intel的算法库破解文件,这是C++版本的破解文件

[Linux]chkconfig命令详解

chkconfig是 Linux 系统中用于管理服务(daemons)的命令。该命令可以用来设置服务是否在系统启动时自动启动,以及在不同运行级别下的启动和停止顺序。在一些发行版中,可能使用systemctl或其他不同的命令来管理服务,因此请确保你的系统支持chkconfig并了解使用的命令。

hmx224_2014的专栏 1590

转【Linux下chkconfig命令详解】

Linux下chkconfig命令详解 chkconfig命令主要用来更新(启动或停止)和查询系统服务的运行级信息。谨记chkconfig不是立即自动禁止或激活一个服务,它只是简单的改变了符号连接。 使用语法:chkconfig [--add][--del][--list][系统服务] 或 chkconfig [--level <等级代号>][系统服务][on/off/rese...

weixin_30535565的博客 70

Linux下设置开机启动命令chkconfig详解

Linux下chkconfig命令详解chkconfig 命令简介chkconfig 使用语法chkconfig 参数用法chkconfig 使用示例增加一个服务 chkconfig 命令简介 chkconfig命令主要用来更新\启动\停止和查询系统服务的运行级信息。谨记chkconfig不是立即自动禁止或激活一个服务,它只是简单的改变了符号连接。 chkconfig 使用语法 chkconfi...

徊忆羽菲 550
上一篇: 成为 vim superstar
下一篇: grep 参数
HeyITMan
博客等级 码龄14年 5粉丝 9原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值