1.下载oracle.11g,并解压.
2.安装各种依赖软件.如果是64位系统的话,32位和64位的软件,最好都安装以下。
官方文档上要求安转的:
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
elfutils-libelf-devel-static-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-common-2.5
glibc-devel-2.5
glibc-headers-2.5
kernel-headers-2.6.18
ksh-20060214
libaio-0.3.106
libaio-devel-0.3.106
libgcc-4.1.2
libgomp-4.1.2
libstdc++-4.1.2
libstdc++-devel-4.1.2
make-3.81
numactl-devel-0.9.8.i386
sysstat-7.0.2
可以直接执行以下命令,全部安装:
yum install binutils* compat-libstdc++* elfutils-libelf* elfutils-libelf-devel* glibc* glibc-common* glibc-devel* glibc-headers*
gcc* gcc-c++* libaio* libaio-devel* libgcc* libstdc++* libstdc++-devel* make* numactl-devel* sysstat*
3.检查软件是否安装完全。
rpm-q gcc make binutils setarch compat-db compat-gcc compat-gcc-c++compat-libstdc++
compat-libstdc++-devel unixODBC unixODBC-devellibaio-devel sysstat
4.修改系统参数:
vi/etc/sysctl.conf
在最后添加上:
#install oracle config--注释
fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 4194304
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
使其立即生效:
/sbin/sysctl -p
5.修改系统限制
vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
6.修改/etc/pam.d/login文件
vi /etc/pam.d/login
【如果是X64的系统,那么这里就要用 /lib64/security/pam_limits.so,否则用 /lib/security/pam_limits.so
不然系统可能会在服务器上无法登录!】
7.修改hosts文件:
vi /etc/hosts
将127.0.0.1 后面的localhost 修改 为 主机名
8.xhost + 主机名
9.关闭selinux
vi /etc/selinux/config
然后在下面 添加:
SELINUX=disabled
10.添加用户 和 组
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle
11.创建oracle要安装的目录
mkdir -p /db/app/oracle/product/11R2/dbhome_1
chown -R oracle:oinstall /db
chmod -R 775 /db
##================以下用oracle用户操作,不能su - oracle========================##
12.修改 ~/.bash_profile
在最后添加如下内容:
# Oracle Settings
export ORACLE_BASE=/db/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11R2/dbhome_1
export ORACLE_SID=orcl
export PATH=$PATH:$ORACLE_HOME/bin
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
Error in invoking target ‘agent nmhs’ of makefile‘/u01/app/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk’Some information that I gleaned from “http://cn.forums.oracle.com/forums/thread.jspa?threadID=1091616′′ regarding this error: Apparently the enterprise manager agent will not runproperly until this linking issue is resolved. The fix is below...vi $ORACLE_HOME/sysman/lib/ins_emagent.mkSearch for the line$(MK_EMAGENT_NMECTL)Change it to:$(MK_EMAGENT_NMECTL) -lnnz11