7.爲Oracle用戶設置內核限制
上線爲:
Shell Limit |
Item in limits.conf |
Hard Limit |
Maximum number of open file descriptors |
nofile |
65536 |
Maximum number of processes available to a single user |
nproc |
16384 |
vim /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
vim /etc/pam.d/login
o if [ $USER = "oracle" ]; then
o if [ $SHELL = "/bin/ksh" ]; then
o ulimit -p 16384
o ulimit -n 65536
o else
o ulimit -u 16384 -n 65536
o fi
o fi
o if ( $USER == "oracle" ) then
o limit maxproc 16384
o limit descriptors 65536
o endif
類似結構:/mount_point/app/oracle_sw_owner(軟件所屬主)
Requirement |
Free Disk Space |
The Oracle base directory will contain only software files. |
Up to 3 GB |
The Oracle base directory will contain both software and database files (not recommended for production databases). |
Up to 4 GB |
mkdir /u01(在這裏,我們僅儲存軟件包文件,至於數據庫文件我們將它放到oracle用戶的家目錄中)
fdisk –l
fdisk /dev/sda
partprobe
mkfs.ext3 /dev/sda6
vim /etc/fstab
【 /dev/sda6 /u01 ext3 defaults 0 0 】
mount –a
ls /u01 【若發現有lost+found,就說明掛載成功】
mkdir –pv /u01/app/oracle【遞歸創建oracle的基本目錄,並顯示過程】
chown –R oracle:oinstall /u01/app/oracle【修改oracle根目錄的屬主和屬組】
chmod –R 755 /u01/app/oracle 【修改oracle根目錄的權限】9.定義根目錄和SID
su – oracle
vim .bash_profile
【PATH=$PATH:$HOME/bin:/u01/app/oracle/product/10.2.0/db_1/bin
umask 022
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
ORACLE_SID=orcl
export ORACLE_BASE ORACLE_SID ORACLE_HOME】
. .bash_profile
echo $ORACLE_BASE
9.定義根目錄和SID
su – oracle
vim .bash_profile
【PATH=$PATH:$HOME/bin:/u01/app/oracle/product/10.2.0/db_1/bin
umask 022
ORACLE_BASE=/u01/app/oracle
ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1
ORACLE_SID=orcl
export ORACLE_BASE ORACLE_SID ORACLE_HOME】
. .bash_profile
echo $ORACLE_BASE
注意:oracle用戶必須重新登錄才能生效