limits.conf - configuration file for the pam_limits module,
/etc/security/limits.conf
The syntax of the lines:
<domain> <type> <item> <value>
The fields listed above should be filled as follows:
<domain>
* A username
*
A groupname, with @group
syntax. This should not be confused with netgroups.
*
The wildcard *
, for default entry.
*
The wildcard %
, for maxlogins limit only, can also be used with %group
syntax.
<type>
hard
for enforcing hard
resource limits. These limits are
set by the superuser and enforced by the Kernel. The user cannot raise
his requirement of system
resources above such values.
soft
for enforcing soft
resource limits. These limits are ones that the user can move up or down within the permitted range by any pre-exisiting
hard
limits. The values specified with this token can be thought of as default
values, for normal system usage.
-
for enforcing both soft
and hard
resource limits together.
Note, if you specify a type of '-' but neglect to supply
the item and value fields then the module will never enforce any limits
on the specified
user/group etc. .
<item>
core
limits the core file size (KB)
data
maximum data size (KB)
fsize
maximum filesize (KB)
memlock
maximum locked-in-memory address space (KB)
nofile
maximum number of open files
rss
maximum resident set size (KB)
stack
maximum stack size (KB)
cpu
maximum CPU time (minutes)
nproc
maximum number of processes
as
address space limit
maxlogins
maximum number of logins for this user
maxsyslogins
maximum number of logins on system
priority
the priority to run user process with (negative values boost process priority)
locks
maximum locked files (Linux 2.4 and higher)
sigpending
maximum number of pending signals (Linux 2.6 and higher)
msqqueue
maximum memory used by POSIX message queues (bytes) (Linux 2.6 and higher)
nice
maximum nice priority allowed to raise to (Linux 2.6.12 and higher)
rtprio
maximum realtime priority allowed for non-privileged processes (Linux 2.6.12 and higher)
In general, individual limits have priority over group limits, so if you impose no limits for admin
group, but one of the members in this group have
a limits line, the user will have its limits set according to this line.
Also, please note that all limit settings are set per login
. They are not global, nor are they permanent; existing only for the duration of the
session.
In the limits
configuration file, the '#
' character introduces a comment - after which the rest of the line is ignored.
The pam_limits module does its best to report configuration problems found in its configuration file via syslog
(3).
Examples
Example lines which might be specified in /etc/security/limits.conf
.
* soft core 0
* hard rss 10000
@student hard nproc 20
@faculty soft nproc 20
@faculty hard nproc 50
ftp hard nproc 0
@student - maxlogins
# Feel the city breakin and everybody shakin,
and we're stayin alive, stayin alive # - The Bee Gees
Related
:
quota
- Display disk usage and limits
ulimit
-
Control the resources available to a process
Fork bomb
- Wikipedia
pam_limits(8), pam.d(5), pam(8)
<!-- #BeginLibraryItem "/Library/foot_bash.lbi" -->
分享到:
相关推荐
本文不一定适合比较老版本的Linux,如果只关心使用,请直接看“总结”,本文主要针对CentOS,其它Linux发行版本类似,但细节可能有出入,比如重启服务可能不是用systemctl,而是service等。
传统的Oracle数据库安装过程中,数据库管理员(DBA)需要手动编辑`/etc/sysctl.conf`和`/etc/security/limits.conf`这两个关键文件来调整操作系统级别的内核参数和资源限制。这种做法不仅耗时费力,而且容易出现人为...
*永久修改 ulimit 值需要修改 /etc/security/limits.conf 文件,并确保 pam_limits.so 文件被加入到启动文件中。 六、相关知识点 * ulimit 命令:用于设置最大进程数和最大文件打开数,是系统优化的必要手段。 * ...
如果你不进行修改并发量上来的时候会出现“Too Many Open Files”的错误,导致整个HBase不可运行,你可以用ulimit -n 命令进行修改,或者修改/etc/security/limits.conf 和/proc/sys/fs/file-max的参数,具体如何...
修改 `/etc/security/limits.conf` 文件,增加 Oracle 用户的限制: **命令示例**: ```bash echo '* soft nofile 65536' >> /etc/security/limits.conf echo '* hard nofile 65536' >> /etc/security/limits.conf ...
为了永久性地修改文件描述符的限制,可以在`/etc/security/limits.conf`中添加相应的行,如`* soft nofile 10240`和`* hard nofile 10240`,分别设定软限制和硬限制。这将在系统重启后生效。然后,通过`ulimit -n`...
oracle 11gR2 rac ...2 配置网卡 ...10 配置权限参数 /etc/security/limits.conf 11 配置全局shell /etc/profile 12 互信 13 时钟同步 14 配置共享磁盘 验证安装Grid环境
echo 'oracle hard nofile 65536' >> /etc/security/limits.conf ``` 同时,在 `/etc/pam.d/login` 文件中添加以下行: ```bash echo 'session required pam_limits.so' >> /etc/pam.d/login ``` ##### 2.6 关闭 ...
整个过程可以分为五个步骤:安装Linux和VMware Tools、解压缩和安装Oracle数据库软件、修改内核参数、创建Oracle用户和分配权限、添加 limits.conf 文件。 步骤1: 安装Linux和VMware Tools 首先,需要在虚拟机中...
知识点:/etc/security/limits.conf 文件是 Linux 系统中用于设置用户限制的文件,通过修改该文件,可以调整用户的资源使用量。 2. 修改 /etc/pam.d/login 文件 修改 /etc/pam.d/login 文件,添加 session ...
本文将介绍 Oracle 12C NON-CDB 数据库的安装过程,涵盖了安装前的准备工作、目录创建和授权、limits.conf 文件的修改、 oracle 用户配置文件的修改、/etc/hosts 文件的修改、安装包的上传和解压、VNC 软件的使用、...
通过编辑 `/etc/pam.d/login` 文件来应用上述 `limits.conf` 中的设置。 ```bash # vi /etc/pam.d/login ``` 在文件末尾添加以下内容: ```bash session required /lib/security/pam_limits.so session required ...
echo "* hard nofile 65536" >> /etc/security/limits.conf ``` #### 环境变量设置 为了使Oracle能够在启动时自动加载所需的环境变量,需要设置`$ORACLE_BASE`、`$ORACLE_HOME`、`$ORACLE_SID`等关键变量,并将其...
Oracle安装(网络yum redhat5.8和centos6.4...本文介绍了使用网络yum源安装oracle11g的详细步骤,包括配置内核参数、limits.conf文件、yum源和安装依赖包等步骤。通过这些步骤,可以成功安装oracle11g数据库管理系统。
通常我们通过终端连接到linux系统... 如果想变更需要修改/etc/security/limits.conf 文件,如下: vi /etc/security/limits.conf * hard nofile 102400 * soft nofile 102400 保存退出后重新登录,其大文
2. 修改 /etc/security/limits.conf 文件,输入命令:vi /etc/security/limits.conf,将以下内容加入该文件: ``` oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile ...
sipp中文版说明书 .../etc/security/limits.conf增加 * soft nofile 32768 * hard nofile 65535 /etc/pam.d/login增加 sosession required /lib/security/pam_limits.so ulimit -s unlimited ulimit -a
"Linux修改TCP连接数" Linux 操作系统中,TCP 连接数的限制是...通过修改 `/etc/security/limits.conf` 文件、`/etc/rc.d/rc.local` 文件和 `/etc/sysctl.conf` 文件,我们可以提高 Linux 操作系统中的 TCP 连接数。