zoukankan      html  css  js  c++  java
  • centos7系统优化

    1. yum install net-tools #默认centos7不支持ifconfig 需要看装net-tools包;
    2. 加大文件描述符数量
    ulimit -SHn 1024000 
    echo "ulimit -SHn 1024000" >> /etc/rc.d/rc.local 
    source /etc/rc.d/rc.local
    总结:
    a.所有进程打开的文件描述符数不能超过/proc/sys/fs/file-max
    b.单个进程打开的文件描述符数不能超过user limit中nofile的soft limit(/etc/security/limits.conf)
    c.nofile的soft limit不能超过其hard limit
    d.nofile的hard limit不能超过/proc/sys/fs/nr_open
    3. 设置域名解析
    options single-request-reopen
    nameserver 10.100.11.102
    nameserver 114.114.114.114
    4. 关闭防火墙
    启动: systemctl start firewalld
    关闭: systemctl stop firewalld
    查看状态: systemctl status firewalld 
    开机禁用  : systemctl disable firewalld
    开机启用  : systemctl enable firewalld
    5. SELinux
    查看SELinux状态:
    /usr/sbin/sestatus -v
    关闭SELinux:
    1、临时关闭(不用重启机器):
    setenforce 0 ##设置SELinux 成为permissive模式
    ##setenforce 1 设置SELinux 成为enforcing模式
    2.修改配置文件需要重启机器:
    修改/etc/selinux/config 文件
    将SELINUX=enforcing改为SELINUX=disabled
    重启机器即可

    备注:
    不关闭的话可能引起的问题:
    CentOS 为 vsftpd 启动 vsftpd:500 OOPS: cannot read config file: /etc/vsftpd/vsftpd.conf

    **************************************************************************************
    当你的才华还撑不起你的野心的时候,你就应该静下心来学习;当你的能力还驾驭不了你的目标时,就应该沉下心来,历练;梦想,不是浮躁,而是沉淀和积累,只有拼出来的美丽,没有等出来的辉煌,机会永远是留给最渴望的那个人,学会与内心深处的你对话,问问自己,想 要怎样的人生,静心学习,耐心沉淀,送给自己,共勉。
    **************************************************************************************
  • 相关阅读:
    poj2928:素数回文数的个数
    R语言学习中的小bug:R中矩阵相乘错误于A %*% B: 需要数值/复数矩阵/矢量参数
    poj3247:回文素数
    Python爬虫之BeautifulSoap的用法
    python jieba库的使用说明
    彻底弄懂python编码
    第八周助教总结
    python中数组用法
    python列表操作大全
    python—各种常用函数及库
  • 原文地址:https://www.cnblogs.com/macoffee/p/13374921.html
Copyright © 2011-2022 走看看