安装oracle时候在创建oracle用户后,切换oracle用户时,报如下错

[root@localhost ~]# su - oracle
-bash: ulimit: max user processes: cannot modify limit: Operation not permitted

经查看结果是 忘记修改/etc/security/limits.conf

关于/etc/security/limits.conf解释及应用,看我转载如下文章

limits.conf的格式如下:
username|@groupname type resource limit

username|@groupname:设置需要被限制的用户名,组名前面加@和用户名区别。也可以用通配符*来做所有用户的限制。

type:有 soft,hard 和 -,soft 指的是当前系统生效的设置值。hard 表明系统中所能设定的最大值。soft 的限制不能比har 限制高。用 - 就表明同时设置了 soft 和 hard 的值。

resource:
core - 限制内核文件的大小
date - 最大数据大小
fsize - 最大文件大小
memlock - 最大锁定内存地址空间
nofile - 打开文件的最大数目
rss - 最大持久设置大小
stack - 最大栈大小
cpu - 以分钟为单位的最多 CPU 时间
noproc - 进程的最大数目
as - 地址空间限制
maxlogins - 此用户允许登录的最大数目

要使 limits.conf 文件配置生效,必须要确保 pam_limits.so 文件被加入到启动文件中。查看 /etc/pam.d/login 文件中有:
session required /lib/security/pam_limits.so

暂时地,适用于通过 ulimit 命令登录 shell 会话期间。
永久地,通过将一个相应的 ulimit 语句添加到由登录 shell 读取的文件之一(例如 ~/.profile),即特定于 shell 的用户资源文件;或者通过编辑 /etc/security/limits.conf。
何谓core文件,当一个程序崩溃时,在进程当前工作目录的core文件中复制了该进程的存储图像。core文件仅仅是一个内存映象(同时加上调试信息),主要是用来调试的。 core文件是个

二进制文件,需要用相应的工具来分析程序崩溃时的内存映像。

系统默认core文件的大小为0,所以没有创建。可以用ulimit命令查看和修改core文件的大小。

$ulimit -c

0

$ ulimit -c 1000

$ ulimit -c

1000

-c 指定修改core文件的大小,1000指定了core文件大小。也可以对core文件的大小不做限制,如:

# ulimit -c unlimited

#ulimit -c

unlimited

如果想让修改永久生效,则需要修改配置文件,如 .bash_profile、/etc/profile或/etc/security/limits.conf。

2.nofile - 打开文件的最大数目

对于需要做许多套接字连接并使它们处于打开状态的应用程序而言,最好通过使用 ulimit –n,或者通过设置nofile 参数,为用户把文件描述符的数量设置得比默认值高一些

vi /etc/security/limits.conf
* soft nofile 10240 #软限制

* hard nofile 10240 #硬限制
用ulimit -n 2048 修改只对当前的shell有效,退出后失效:
如A程序已经运行,此时ulimit -n为1024;之后ulimit -n 2048,这时在运行B程序;退出当前shell用户,再次进行shell,之后运行C程序;这时只有B程序用的是2048,其它用的都是1024

[root@localhost ~]# vim /etc/security/limits.conf

增加如下内容

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536

问题得到解决

http://blog.csdn.net/evils798/article/details/7991431

http://docs.oracle.com/cd/E11882_01/install.112/e24326/toc.htm#CEGIHDBF

-bash: ulimit: max user processes: cannot modify limit: Operation not permitted的更多相关文章

  1. -bash: ulimit: core file size: cannot modify limit: Operation not permitted

    一.问题描述 使用普通用户执行某个软件加载环境变量时报错 -bash: ulimit: core file size: cannot modify limit: Operation not permi ...

  2. -bash: ulimit: open files: cannot modify limit: Operation not permitted

    普通用户登录系统报错,提示: -bash: ulimit: open files: cannot modify limit: Operation not permitted. 处理方法: #vi /e ...

  3. 关于 CentOS 7 里面 普通用户 Ulimit max user processes 值的问题

    最近在对tomcat 的一个 项目进行 压测, 普通用户 启动 tomcat 的时候 压力上去以后就会报 java.lang.OutOfMemoryError 的错误, 这种错误 按道理来说都是 系统 ...

  4. Linux - 修改系统的max open files、max user processes (附ulimit的使用方法)

    目录 1 问题说明 2 修改max open files 3 修改max user processes 4 附录: ulimit命令说明 1 问题说明 Linux 系统默认的max open file ...

  5. Linux - 修改系统的max open files、max user processes(附ulimit的使用方法)【转载】

    Linux - 修改系统的max open files.max user processes(附ulimit的使用方法)目录 1 问题说明2 修改max open files3 修改max user ...

  6. max user processes 导致的服务器大量close_wait问题解决过程

    1.背景: 由于现网业务量增长过快,需要扩容应用程序服务器,分担来自前端的访问压力. 2.故障: 部署好业务启动程序后,发现程序运行一小会后不产生新的日志和数据. 3.查问题过程: 1.首先查看程序运 ...

  7. -bash: ulimit: pipe size: cannot modify limit: Invalid argument

    从root账号切换到oracle账号时,出现了"-bash: ulimit: pipe size: cannot modify limit: Invalid argument"提示 ...

  8. Centos6 修改max user processes limits

    ulimit:显示(或设置)用户可以使用的资源的限制(limit),这限制分为软限制(当前限制)和硬限制(上限),其中硬限制是软限制的上限值,应用程序在运行过程中使用的系统资源不超过相应的软限制,任何 ...

  9. 关于linux修改max user processes limits的问题

    我们都知道,ulimit -u 可以设置max user processes limits,但是往往在设置的过程中,这样直接修改,不仅只能临时生效,重启之后又无效了,而且老是会失败. 而一般来说,修改 ...

随机推荐

  1. SQL注入原理深度解析

    本文转自:http://www.iii-soft.com/forum.php?mod=viewthread&tid=1613&extra=page%3D1 对于Web应用来说,注射式攻 ...

  2. [Redux] Generating Containers with connect() from React Redux (AddTodo)

    Code to be refacted: const AddTodo = (props, { store }) => { let input; return ( <div> < ...

  3. onvif规范 中文介绍

    什么是ONVIF ? ONVIF规范描述了网络视频的模型.接口.数据类型以及数据交互的模式.并复用了一些现有的标准,如WS系列标准等. ONVIF规范的目标是实现一个网络视频框架协议,使不同厂商所生产 ...

  4. Docker 生成Node.js web app(含端口映射)

    1.新建目录src,并进入src目录 [xiejdm@localhost Documents]$ mkdir src [xiejdm@localhost Documents]$ cd src/ 2.创 ...

  5. Objective-C——NSMutableURLRequest发送POST请求,使用NSJSONSerialization解析JSON字符串

    NSString *reqData = @"Data="; NSData *postDatas = nil; NSString *urlPath = @"url" ...

  6. QJson 的使用

    下载 源码解压 https://github.com/flavio/qjson 复制 src 目录下所有 .h .cpp .hh 文件到项目目录 qjson,pro 文件添加 INCLUDEPATH ...

  7. Lua编程入门-学习笔记1

    第1章:起点 Chunks: 语句块 每个语句结尾的分号是可选的,如果同一行有多个语句最好使用分号分隔: dofile("lib1.lua")  -- 执行lua文件 全局变量:局 ...

  8. HDU-1049

    Description An inch worm is at the bottom of a well n inches deep. It has enough energy to climb u i ...

  9. html5的本地存储localStorage和sessionStorage

    html5的本地存储localStorage和sessionStorage html5中新增的比较重要的一个功能就是web storage来实现客户端本地存储数据,之前存储数据都是用cookie来实现 ...

  10. WCF宿主实践入门

    本篇属于WCF实践入门,由于博主本人水平有限,没有理论上的介绍,仅仅从其几种不同的宿主方式分别介绍WCF的使用. WCF有多种宿主方式:1.自托管宿主,2.windows service宿主,3.II ...