说明:参考:http://www.oracle.com/pls/db112/portal.portal_db?selected=11&frame=下载安装文档
因空间不足,增加硬盘
fdisk ----------分区
mkfs.ext3 /dev/sdb1 ----------格式化
mount /dev/sdb1 /sdb1 -----挂载
1.安装环境
操作系统:CentOS release 4.8 (Final) ------lsb_release -id
内核:2.6.9-89.ELsmp -------uname -a
2.查看安装必须包,没有的话,安装
binutils-2.15.92.0.2 compat-libstdc++-33-3.2.3 elfutils-libelf-0.97 elfutils-libelf-devel-0.97 gcc-3.4.6 gcc-c++-3.4.6 glibc-2.3.4-2.41 glibc-common-2.3.4 glibc-devel-2.3.4 glibc-headers-2.3.4
libaio-0.3.105 libaio-devel-0.3.105 libgcc-3.4.6 libstdc++-3.4.6 libstdc++-devel-3.4.6 make-3.80 numactl-0.6.4.i386 pdksh-5.2.14 sysstat-5.0.5
3.查看用户和组grep oinstall /etc/group
grep dba /etc/group
如果9没有用户和组,创建如下:
groupadd osintall
groupadd dba
4.配置内核参数
vi /ect/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
5.创建相应的文件夹
mkdir -p /u01/app/oracle/product/10.2.0/db_1
6.加入用户
useradd -g osintall -G dba -d /u01/app/oracle oracle
usermod -s /bin/ksh oracle --------创建默认shell
7、修改另一个参数文件vi /etc/security/limits.conf
加:
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
vi /etc/profile
加入
if [ $USER="oracle" ]; then if [ $SHELL="/bin/ksh" ]; then --------如果找不ksh时,可用bash,oracle用户的shell也必须进行更改,统一 ulimit -u 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi
fi
8、切换用户su oracle
9、修改环境变量
vi ~/.bash_profile
加入如下内容:
export EDITOR=vi
export ADR_BASE=/u01/app/oracle-------------解决用dbca创建实例时,xmanager不显示问题 export ORACLE_SID=ora11g export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1 export PATH=$ORACLE_HOME/bin:$PATH
10.安装
./runInstaller
11.问题
1.bash-3.2$ 标识符
原因是未找到.bash_profile
拷贝/etc/skel下的.bash_history,.bash_profile,.bash_logout,.bashrc到oracle默认目录下,
并修改相应的权限,把oracle用户的.bash_profile配置写入到本.bash_profile文件中,即可。
2.
/etc/profile[58]: ulimit: pipe: is read only $ ulimit
修正/etc/profile
if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ##ulimit -p 16384
ulimit -u 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
问题
[root@localhost CentOS]# rpm -ivh glibc-headers-2.5-24.i386.rpm warning: glibc-headers-2.5-24.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897 error: Failed dependencies: kernel-headers is needed by glibc-headers-2.5-24.i386 kernel-headers >= 2.2.1 is needed by glibc-headers-2.5-24.i386
这是因为签名失败,解决办法:
输入:rpm --import /etc/pki/rpm-gpg/RPM*