当前位置: 首页 > news >正文

网站建设与管理维护怎么给公司做网站

网站建设与管理维护,怎么给公司做网站,电子商务网站设计与实现论文,代理公司注册商标案例:通过脚本实现仅sshd、rsyslog、crond、network、sysstat服务在开机时自启动。 Linux系统在开机的服务通常工作在文本模式3级别,因此只需要查找3级别以上的开启的服务即可。查看命令: chkconfig --list |grep 3:on [rootvm1 ~]# chkco…

案例:通过脚本实现仅sshd、rsyslog、crond、network、sysstat服务在开机时自启动。

Linux系统在开机的服务通常工作在文本模式3级别,因此只需要查找3级别以上的开启的服务即可。查看命令:

chkconfig --list |grep 3:on
[root@vm1 ~]# chkconfig --list |grep 3:onNote: This output shows SysV services only and does not include nativesystemd services. SysV configuration data might be overridden by nativesystemd configuration.If you want to list systemd services use 'systemctl list-unit-files'.To see services enabled on particular target use'systemctl list-dependencies [target]'.network         0:off   1:off   2:on    3:on    4:on    5:on    6:off
[root@vm1 ~]#

默认情况下开启的服务比较少,只有network。

[root@vm1 ~]# for name in `chkconfig --list |grep 3:on|awk '{print $1}'`;do chkconfig --level 3 $name off;doneNote: This output shows SysV services only and does not include nativesystemd services. SysV configuration data might be overridden by nativesystemd configuration.If you want to list systemd services use 'systemctl list-unit-files'.To see services enabled on particular target use'systemctl list-dependencies [target]'.[root@vm1 ~]# for name in crond network rsyslog sshd sysstat;do chkconfig --level 3 $name on;done
Note: Forwarding request to 'systemctl enable crond.service'.
Note: Forwarding request to 'systemctl enable rsyslog.service'.
Note: Forwarding request to 'systemctl enable sshd.service'.
error reading information on service sysstat: No such file or directory[root@vm1 ~]# chkconfig --list |grep 3:on

说明:将默认开启的服务都关闭,然后开启需要开启的服务。

方法2:

[root@vm1 ~]# for name in `chkconfig --list|grep 3:on|awk '{print $1}'|grep -vE "crond|network|sshd|rsyslog|sysstat"`;do chkconfig $name off;doneNote: This output shows SysV services only and does not include nativesystemd services. SysV configuration data might be overridden by nativesystemd configuration.If you want to list systemd services use 'systemctl list-unit-files'.To see services enabled on particular target use'systemctl list-dependencies [target]'.

Linux系统管理员,需要遵循的原则是最小化原则,尽量不安装不使用的软件,尽量不开启不需要开启的服务,只要不用,就不开启。

我们再理解下for循环语句的结构。chkconfig命令获取到取值变量列表,然后for循环语句“遍历”这个列表,进行处理。

http://www.ds6.com.cn/news/57166.html

相关文章:

  • 高中生做网站semir
  • 西安市社交网站制作公司山东百搜科技有限公司
  • wordpress如何撤销301重庆seo论
  • 西红门模板网站建设推广关键词排名方法
  • 怎么做属于自己的领券网站专业网站推广引流
  • 织梦网站地图怎么做shodan搜索引擎
  • 限制WordPress站点百度搜索风云榜小说
  • 快站登录在线营销推广
  • 东莞想做网站找什么公司百度推广联系方式
  • 中国b2b网站排名cps推广联盟
  • 天津网站制作专业关键词优化快排
  • 为什么百度地图嵌入网站不显示免费产品推广软件
  • 手机营销型网站制作软文发布平台
  • 淘宝客如何做网站搜索关键词排名优化软件
  • 西安外贸网站建设公司重庆网站建设外包
  • 免费域名证书申请网络推广seo教程
  • 石景山网站制作建设公司四川seo哪里有
  • 企业网站建设的成本构成技能培训网
  • 如何做网站管理维护商品标题关键词优化
  • 做网站页面深圳网站建设专业乐云seo
  • 怎么建免费论坛网站中国培训网的证书含金量
  • 服务器建站用哪个系统好重庆seo小潘大神
  • wordpress加底部by沈阳seo关键词
  • 企业网站可以做商城类最新互联网项目平台网站
  • 网络搭建赛项承办市赛申报书seo简单速排名软件
  • 做任务赚q币的网站产品市场推广方案
  • android app佛山seo教程
  • 建设银行官方网站官网怎么创作自己的网站
  • 永州 网站建设厦门排名推广
  • 网站开发综合设计报告竞价外包推广专业公司