zoukankan      html  css  js  c++  java
  • centos7修改最大文件打开数量

    1、

    https://blog.argcv.com/articles/3212.c

    若该用户是普通用户

    1
    2
    $ ulimit -n 65535
    -bash: ulimit: open files: cannot modify limit: Operation not permitted

    若你用 root 当然可以, 但你真的想用 root 跑 db 么?

    正确的打开方式其实应该是修改 limit.

    打开 /etc/security/limits.conf, 添加内容如下:

    /etc/security/limits.conf
    1
    2
    your_user_name           soft    nofile          65535
    your_user_name           hard    nofile          65535

    或者若想要一加一个组

    /etc/security/limits.conf
    1
    2
    @your_group_name           soft    nofile          65535
    @your_group_name           hard    nofile          65535

    然后保存。

  • 相关阅读:
    Java 类和对象12
    Java类和对象11
    java 类和对象10
    Java类和对象9
    Java类和对象8
    Java 类和对象7
    包装与方法
    JAVA链表
    泛型
    多态 接口
  • 原文地址:https://www.cnblogs.com/yaok430/p/14886568.html
Copyright © 2011-2022 走看看