starland

[oracle] 레드햇 리눅스 oracle설치시 ulimit: pipe: is read only 해결 본문

Oracle관련

[oracle] 레드햇 리눅스 oracle설치시 ulimit: pipe: is read only 해결

starland 2010. 2. 15. 16:28
반응형
리눅스에 오라클 설치시.

ORACLE계정 .profile에
===================
if [ $USER = "oracle" ]; then
   if [ $SHELL = "/bin/ksh" ];then
       ulimit -p 16384
       ulimit -n 65536
   else
       ulimit -u 16384 -n 65536
   fi
fi
===================
설정을 해주게 되있는데

[root@cal-host ~]# su - oracle
/etc/profile[57]: ulimit: pipe: is read only

이런 에러가 난다.

원인은 리눅스 5버전부터 ulimit문법이 바꼈다는것.
if [ \$USER = "oracle" ]; then
        if [ \$SHELL = "/bin/ksh" ]; then
              ## see SR:
              ##ulimit -p 16384
              ulimit -u 16384
              ulimit -n 65536
        else
              ulimit -u 16384 -n 65536
        fi
fi
색깔 표시한 부분을 바꿔주면 된다.



Issue
You are following the steps in the ML Note:421308.1 Requirements For Installing 
Oracle10gR2 On RHEL/OEL 5 (x86_64):

5. Set the session limits for Oracle user 

if [ $USER = "oracle" ]; then 
   if [ $SHELL = "/bin/ksh" ];then
       ulimit -p 16384
       ulimit -n 65536
   else
       ulimit -u 16384 -n 65536
   fi
fi

You then try to su - oracle and receive the following error:

[root@cal-host ~]# su - oracle
/etc/profile[57]: ulimit: pipe: is read only
Research
Apparently KSH on 64-bit OEL-5 (Update 1) has changed and the syntax that was 
previously used to set the "Max user processes limitation" is now changed from 
"ulimit -p" to "ulimit -u".  You can find the right syntax by issuing the 
following command:

cal-host.10GR2-> ulimit -a
address space limit (kbytes)   (-M)  unlimited
core file size (blocks)        (-c)  0
cpu time (seconds)             (-t)  unlimited
data size (kbytes)             (-d)  unlimited
file size (blocks)             (-f)  unlimited
locks                          (-L)  unlimited
locked address space (kbytes)  (-l)  32
nofile                         (-n)  65536
nproc                          (-u)  2047
pipe buffer size (bytes)       (-p)  4096
resident set size (kbytes)     (-m)  unlimited
socket buffer size (bytes)     (-b)  4096
stack size (kbytes)            (-s)  10240
threads                        (-T)  not supported
process size (kbytes)          (-v)  unlimited

The one we need to be changing is "nproc" via "-u" switch NOT "pipe buffer 
size" ...
Solution
Remove incorrect code from "/etc/profile" and replace it with:

cat >> /etc/profile <<EOF
if [ \$USER = "oracle" ]; then
        if [ \$SHELL = "/bin/ksh" ]; then
              ## see SR:
              ##ulimit -p 16384
              ulimit -u 16384
              ulimit -n 65536
        else
              ulimit -u 16384 -n 65536
        fi
fi
EOF
반응형