Chinaunix首页 | 论坛 | 博客
  • 博客访问: 380022
  • 博文数量: 120
  • 博客积分: 5051
  • 博客等级: 大校
  • 技术积分: 1255
  • 用 户 组: 普通用户
  • 注册时间: 2007-07-03 01:25
文章分类

全部博文(120)

文章存档

2011年(2)

2010年(11)

2009年(28)

2008年(26)

2007年(53)

我的朋友

分类: Oracle

2009-05-14 17:08:51

 
Linux 平台安装Oracle笔记
 
硬件要求:
Memory:1G       #grep MemTotal /proc/meminfo   (at least 512M,alert will appear when the physical memory less then 922M)
swap:1G       #grep SwapTotal /proc/meminfo
Free Disk in /tmp: 400M     #df -k /tmp
Disk for software files: 2.5G 
Disk for database files: 1.2G

软件要求:
以下是针对 CentOS release 4.2 (Final) with Kernel 2.6.9-22.EL 的环境而言的,不同的OS可能有些不同。
gcc-3.4.4-2
make-3.80-5
binutils-2.15.92.0.2-15
openmotif-2.2.3-9.RHEL4.1
glibc-2.3.4-2.13
compat-libstdc++-33-3.2.3-47.3
libaio-0.3.103-3
 
网络环境:
IP 需要配置成静态IP, 用DHCP动态分配IP会导至安装错误。

系统环境:
1)Oracle 用户及其组的管理:
groupadd oinstall
groupadd dba
useradd  -g oinstall -G dba oracle    (# oinstall as the primary group ,dba as the secondary group )

2)目录的创建
mkdir -p /u01/app/oracle  (the Oracle base directory)
mkdir -p /u02/oradata      (an optional Oracle datafile directory)
chown -R oracle:oinstall /u01/app/oracle  /u02/oradata
chmod -R 775 /u01/app/oracle /u02/oradata
 
3)配置 Kernal 参数:
edit /etc/sysctl.conf and add the following section and save, then use "/sbin/sysctl -p" 使它立即生效。
#Begin section for Oracle10g:
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
fs.file-max = 65536
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144
#End of Oracle section
 
如果想让这些参数在每次开机的时候自动装载,
vi /etc/rc.local add the following line:
/sbin/sysctl -p
save and exit.
 
4)Shell 环境设置:
4.1)To increase shell limits:
Add the following lines to /etc/security/limits.conf file:
#Begin for Oracle 10g:
*               soft    nproc   2047
*               hard    nproc   16384
*               soft    nofile  1024
*               hard    nofile  65536
#End of Oracle setting

4.2)Add the following line to the /etc/pam.d/login file, if it does not already exist:
session    required     /lib/security/pam_limits.so
4.3)Add following lines to /etc/profile:
#Begin for Oracle 10g:
if [ $USER = "oracle" ]; then
        if [ $SHELL = "/bin/ksh" ]; then
              ulimit -p 16384
              ulimit -n 65536
        else
              ulimit -u 16384 -n 65536
        fi
fi
#End for Oracle 10#End for Oracle 10g

4.4)Set oracle user's environment:
 
Enter the following command to ensure that X Window applications can display on this system:
$ xhost +
 
Enter or edit the following line in the shell startup file, specifying a value of 022 for the default file creation mask:
$ umask 022
 
Set the ORACLE_BASE and ORACLE_SID environment variables in /home/oracle/.bash_profile as:
ORACLE_BASE=/u01/app/oracle
ORACLE_SID=sales
export ORACLE_BASE ORACLE_SID
 
If you are not installing the software on the local system, enter the following command to direct X applications to display on the local system:
$ DISPLAY=local_host:0.0 ; export DISPLAY

(如果你想从远程windows机安装oracle, 先安装x manager, 以便在windows上显示oracle 图形化安装界面)

5)安装Oracle:
Download the oracle software package 10201_database_linux32.zip from oracle web site and then uncompress it.
[oracle@test oracle]$ unzip 10201_database_linux32.zip
[oracle@test oracle]$ cd database
[oracle@test oracle]$ ./runInstaller
运行这个命令之后,就会出现oracle的图形化安装界面, 以下只要按照它的提示一步一步往下走即可。
 
Remark:
1)在安装开始时,oracle 会检查系统的硬件,软件,网络等是否符合它的安装条件,如有不符的,请按照它的提示先将所有的fail项修复,然后再重新安装。一般会经常出现某些软件包没装的错误,请从系统的安装盘中找到这些包,用rpm装上即可。
 
2)Run orainstRoot.sh  在一步,可能会有出现一些错误信息,请以root 用户运行一下这个脚本即可:
oracle_base/oraInventory/orainstRoot.sh
 
3)安装的过程中,如遇这样的错误:
 
make: *** [liborasdkbase] Error
Exception String: Error in invoking target 'all_no_orcl ihsodbc' of makefile '/u01/app/oracle/oracle/product/10.2.0/db_3/rdbms/lib/ins_rdbms.mk'. See '/u01/app/oracle/oraInventory/logs/installActions2009-05-14_04-25-02AM.log' for details.
 
This means that the "33" version of the compat-libstdc++ RPM is missing.
解决办法是:
1)download compat-libstdc++-33-3.2.3-47.3.i386.rpm from following address:
 
2)rpm -ivh compat-libstdc++-33-3.2.3-47.3.i386.rpm
[root@test xxxx]# rpm -ivh compat-libstdc++-33-3.2.3-47.3.i386.rpm
warning: compat-libstdc++-33-3.2.3-47.3.i386.rpm: V3 DSA signature: NOKEY, key ID 73307de6
Preparing...                ########################################### [100%]
   1:compat-libstdc++-33    ########################################### [100%]
 
 
阅读(1073) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~