zoukankan      html  css  js  c++  java
  • linux基础优化

    [root@moban oldboy]# for oldboy in `chkconfig --list |grep "3:on" |awk '{print $1}' |grep -vE "crond|network|sshd|rsyslog"`;do chkconfig $oldboy off;done

    [root@moban oldboy]# chkconfig --list |grep "3:on"

    crond           0:off   1:off   2:on    3:on    4:on    5:on    6:off

    network         0:off   1:off   2:on    3:on    4:on    5:on    6:off

    rsyslog         0:off   1:off   2:on    3:on    4:on    5:on    6:off

    sshd            0:off   1:off   2:on    3:on    4:on    5:on    6:off

    这个思想是把打开的服务都找出来,把需要的排除外,然后其他的都关闭掉

    在oldboy目录下创建一个oldboy命令,然后加入到系统环境中才可以执行

    [root@BaseServer /]# chmod +x /oldboy/oldboy

    [root@BaseServer /]# echo 'PATH="/oldboy/:$PATH"' >>/etc/profile

    [root@BaseServer /]# source /etc/profile

    root用户全局生效/etc/profile

    普通用户生效~/.bash_profile或者~/.bashrc

    Linux中文设置

    [root@BaseServer ~]# cat /etc/sysconfig/i18n

    LANG="zh_CN.GB18030"

    Linux系统时间同步

    [root@BaseServer oldboy]# /usr/sbin/ntpdate time.nist.gov

    文件描述符加大进程运行的空间,不然空间小了有的进程起不来

    查看大小[root@BaseServer oldboy]# ulimit -n

    root@BaseServer oldboy]# vi /etc/security/limits.conf

    在后面加上*                -       nofile          65535

    [root@BaseServer oldboy]# source /etc/security/limits.conf

    然后退出重新登录就可以了

  • 相关阅读:
    读《人工智能的未来》
    人工智能的未来--分级时序记忆模型初探
    Cracking the coding interview--Q1.8
    Cracking the coding interview--Q1.7
    Cracking the coding interview--Q1.6
    Cracking the coding interview--Q1.4
    Cracking the coding interview--Q1.3
    Cracking the coding interview--Q1.2
    java系统库性能优化注意点
    java File.mkdirs和mkdir区别
  • 原文地址:https://www.cnblogs.com/chenshoubiao/p/4850520.html
Copyright © 2011-2022 走看看