1,安装必须包
apt-get install gcc g++ make binutils libc6 libc6-dev libstdc++6
libstdc++5 rpm gawk alien ksh lesstif2 libaio1 linux-headers elfutils
libaio-dev sysstat unixodbc-bin unixodbc-dev pdksh
其中还缺少java包,去官方下来安装就OK了。
2,添加用户和组
groupadd oinstall
groupadd dba
useradd oracle -m -d /home/oracle -g oinstall -G dba -s /bin/bash
passwd oracle
3,检查安装环境,此处直接写成了一个小脚本
echo "sem: ";echo "min 250 32000 100 128"; echo "is " `cat
/proc/sys/kernel/sem`; echo; /
echo "shmall: ";echo "min 2097152"; echo "is " `cat /proc/sys/kernel/shmall`;
echo; /
echo "shmmax - should be able to hold the SGA - max 4G-1byte: ";echo "is "
`cat /proc/sys/kernel/shmmax`; echo; /
echo "shmmni: ";echo "min 4096"; echo "is " `cat /proc/sys/kernel/shmmni`;
echo; /
echo "file-max: ";echo "min 6815744"; echo "is " `cat /proc/sys/fs/file-max`;
echo; /
echo "ip_local_port_range: ";echo "min/max 9000 65500"; echo "is
" `cat /proc/sys/net/ipv4/ip_local_port_range`; echo; /
echo "rmem_default: ";echo "min 262144"; echo "is " `cat
/proc/sys/net/core/rmem_default`; echo; /
echo "rmem_max: ";echo "min 4194304"; echo "is " `cat
/proc/sys/net/core/rmem_max`; echo; /
echo "wmem_default: ";echo "min 262144"; echo "is " `cat
/proc/sys/net/core/wmem_default`; echo; /
echo "wmem_max: ";echo "min 1048576"; echo "is " `cat
/proc/sys/net/core/wmem_max`; echo; /
echo "aio-max-nr: ";echo "max 1048576"; echo "is " `cat
/proc/sys/fs/aio-max-nr`; echo;
4,检查必须的参数
echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf
echo "kernel.shmall = 2097152" >> /etc/sysctl.conf
# !!!! needs to fit YOUR SGA (=main memory for database, be sure to have
enough ram for PGA etc.)!!!!
echo "kernel.shmmax = 1200000000" >> /etc/sysctl.conf
#echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
echo "fs.file-max = 6815744" >> /etc/sysctl.conf
#echo "net.ipv4.ip_local_port_range = 1024 65000" >>
/etc/sysctl.conf
echo "net.core.rmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.rmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.rmem_max = 4194304" >> /etc/sysctl.conf
echo "net.core.wmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.wmem_max = 1048576" >> /etc/sysctl.conf
echo "fs.aio-max-nr = 1048576" >> /etc/sysctl.conf
5,设置limit
echo "oracle soft nproc 2047" >> /etc/security/limits.conf
echo "oracle hard nproc 16384" >> /etc/security/limits.conf
echo "oracle soft nofile 1024" >> /etc/security/limits.conf
echo "oracle hard nofile 65536" >> /etc/security/limits.conf
echo "oracle soft stack 10240" >> /etc/security/limits.conf
6,建立安装目录,我的/datadisk空间最大,就放到这里面了
mkdir -p /datadisk/u01/app/oracle
mkdir -p /datadisk/u01/oradata
mkdir -p /datadisk/u01/flash_recovery_area
chown -R oracle:oinstall /datadisk/u01
chmod -R 775 /datadisk/u01/
防止出错,添加如下链接目录
ln -s /usr/bin/awk /bin/awk
ln -s /usr/bin/basename /bin/basename
7,设置DISPLAY变量来显示GUI安装
切换到你当前桌面登录的用户执行:xhost + ,此命令的意思是允许其它用户使用当前的桌面环境
切换回oracle用户,export DISPLAY=:0 (debian7下是这样设置的),然后执行
xclock 看看效果
8,进行安装
./datadisk/oracle11g/database/runInstaller
9,安装过程中遇到一些问题
基本上都是一些链接的问题,用ln -s /usr/lib/xxxx.so
/lib64下基本上就OK了。看错误日志解决!
debian7安装oracle11g