1:root用户执行:df -k /tmp
( e* |3 X' j5 w, \ 可用空间大于就400M可以: }" p+ {" Y5 l
2:cat /etc/issue 命令查看linux版本
$ {* }$ @6 L- p( } 3:uname -r 命令查看内核
, q: h6 K( | j 4:检查相关的包: ~' V2 _: g4 g
命令是:rpm -q 相关包! t0 m4 l0 q/ c- L( z& L
5:建两个组
; g) u' ^1 I8 d2 {! _ /usr/sbin/groupadd oinstall; s* s5 f' H) a/ q# y$ v
/usr/sbin/groupadd dba
% X$ C4 s( c/ x 6:建用户
+ R7 V$ b Q3 [0 e2 J /usr/sbin/useradd -g oinstall -G dba oracle5 ?4 c2 ]2 z5 W. c" q
7:passwd oracle 给它设密码
$ w/ `6 N& q( }9 D5 ^) O& @ 8: vi /etc/sysctl.conf(修改这个文件)如下:: v3 `2 C$ I, |6 d; C
kernel.shm=2097152
# S9 D: s h2 |! ?6 G' Y8 ^ kernel.shmmax=2147483648
% K% ]& @+ t2 p) e kernel.shmmni=4096
) ~. D. S( q5 ^" b7 ~' a kernel.sem=250 32000 100 1289 B3 C. _ o# i# p" P
fs.file-max=65536/ o' v4 w5 U7 N6 h
net.ipv4.ip_local_port_range=1024 65000
, L+ H. \, j$ k9 t. w9 v( o7 L net.core.rmem_default=262144( Q8 a3 `: v8 V, s% R
net.core.rmem_max=262144& g! _# F" P7 v1 _0 s( j6 R
net.core.wmem_default=262144! I& D/ d: V- \$ B
net.core.wmem_max=262144+ ?; j: S/ C1 x
保存退出。
" `7 ?. _+ R9 G) q 9: /sbin/sysctl -p
4 f" j! S9 C2 r8 ~ 使改的内容生效, F. _6 }, l. K
10: 执行vi /etc/security/limits.conf
, U: r! r" p) P' M& e+ Q t6 z 加入以下内容:
, F7 V3 c" ^# t5 q oracle soft nproc 2047
9 k3 Z* h. W3 j oracle hard nproc 16384
, {1 p5 A$ b& b0 V$ @- b) _ oracle soft nofile 1024
( i5 U- {; I r! f oracle hard nofile 65536
' b' Y6 |9 T/ H2 Q 11: 执行vi /etc/pam.d/login
" @9 k4 w. n: f! J; w; ^ 加入以下内容:$ K" q7 V' ]4 i7 H2 f+ ^. ]6 U! Y
session required /lib/security/pam_limits.so
; o8 r% Z5 p& }7 w 12: 执行 vi /etc/profile0 W3 f- p8 j( h/ e, @
加入+ v, U4 m% O+ V; u6 q# w
if [ $USER = "oracle" ];then
# V% j. u- L) n+ ^0 ^5 x$ m if [ $SHELL="/bin/ksh"];then! K; S- b [; e' O+ j
ulimit -p 16384+ Z9 {4 E, C% Y6 B' z% f" Y: |
ulimit -n 65536
7 i0 M8 J. w2 y1 V1 E& h6 P else
" |# h% x5 ]5 {4 q- ~' R ulimit -u 16384 -n 65536: A9 e0 R/ f+ \: O) q
fi
. x7 L( |6 L( x) m fi |