1、环境 2、 安装Oracle所需要的依赖包 sudo apt-get install automake sudo apt-get install autotools-dev sudo apt-get install binutils sudo apt-get install bzip2 sudo apt-get install elfutils sudo apt-get install expat sudo apt-get install gawk sudo apt-get install gcc sudo apt-get install gcc-multilib sudo apt-get install g++-multilib sudo apt-get install ia32-libs sudo apt-get install ksh sudo apt-get install less sudo apt-get install lesstif2 sudo apt-get install lesstif2-dev sudo apt-get install lib32z1 sudo apt-get install libaio1 sudo apt-get install libaio-dev sudo apt-get install libc6-dev sudo apt-get install libc6-dev-i386 sudo apt-get install libc6-i386 sudo apt-get install libelf-dev sudo apt-get install libltdl-dev sudo apt-get install libmotif4 sudo apt-get install libodbcinstq4-1 libodbcinstq4-1:i386 sudo apt-get install libpth-dev sudo apt-get install libpthread-stubs0 sudo apt-get install libpthread-stubs0-dev sudo apt-get install libstdc++5 sudo apt-get install lsb-cxx sudo apt-get install make sudo apt-get install openssh-server sudo apt-get install pdksh sudo apt-get install rlwrap sudo apt-get install rpm sudo apt-get install sysstat sudo apt-get install unixodbc sudo apt-get install unixodbc-dev sudo apt-get install unzip sudo apt-get install x11-utils sudo apt-get install zlibc
谨慎起见,最好都执行一遍。
3、 检查系统变量 /sbin/sysctl -a | grep sem /sbin/sysctl -a | grep shm /sbin/sysctl -a | grep file-max /sbin/sysctl -a | grep aio-max /sbin/sysctl -a | grep ip_local_port_range /sbin/sysctl -a | grep rmem_default /sbin/sysctl -a | grep rmem_max /sbin/sysctl -a | grep wmem_default /sbin/sysctl -a | grep wmem_max然后根据上面命令中得到的参数值在/etc/sysctl.conf中增加对应数据,比如:
fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmall = 2097152 kernel.shmmax = 536870912 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048586运行一下命令更新内核参数:
sysctl –p 4、添加对用户的内核限制添加对dong用户的内核限制在 /etc/security/limits.conf 文件中增加以下数据,注:其中dong是我ubuntu系统的普通用户
dong soft nproc 2047 dong hard nproc 16384 dong soft nofile 1024 dong hard nofile 65536 dong soft stack 10240 5、查看/etc/pam.d/login,增加以下行(有了就不用增加了):session required pam_limits.so
同样检查/etc/pam.d/su,没有以下行就自己加上:
session required pam_limits.so
6、创建需要的文件夹 makdir ~/tools/oracle11g 7、为Oracle配置环境变量 #oracle安装目录,第6步创建的文件夹 export ORACLE_BASE=/home/dong/tools/oracle11g #网上说可以随便写 export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1 #数据库的sid export ORACLE_SID=orcl export ORACLE_UNQNAME=orcl #默认字符集 export NLS_LANG=.AL32UTF8 #环境变量 export PATH=${PATH}:${ORACLE_HOME}/bin/:$ORACLE_HOME/lib64; 8、欺骗oracle的安装程序