分类: Oracle
2012-04-05 15:10:02
./runInstaller -record -destinationFile /文件存放的位置.rsp
./runInistaller -silent -responseFile /文件存放的位置.rsp
1.查看内核
[root@localhost oracle]# uname -a
Linux localhost.localdomain 2.6.9-42.EL #1 Wed Jul 12 23:16:43 EDT 2006 i686 i686 i386 GNU/Linux
2. Checking Memory and Swap Space
2.1
[root@localhost oracle]# grep MemTotal /proc/meminfo
MemTotal: 402160 kB
2.2
[root@localhost oracle]# grep SwapTotal /proc/meminfo
SwapTotal: 622584 kB
3.下载并解压文件
官网下载 如果只安装数据库 那么选择10201_database_linux32.zip
Uncompress the downloaded file(s):
$ unzip 10201_database_linux32.zip
生成database文件夹
4.Creating Oracle Directories and users
For Oracle10g you only need to create the directory for $ORACLE_BASE:
su - root
4.1 创建user/group;
#groupadd dba
#groupadd oinstall
#useradd oracle -g oinstall -G dba
#passwd oracle -----------这里会让你连续两次输入密码
4.2 创建目录
mkdir -p /u01/app/oracle/product/10.2.0/db_1
chown oracle.oinstall /u01/app/oracle
5. Checking Software Packages (RPMs)
For 10g R2 (32-bit) on RHEL 4 x86, the document lists the following required package versions or higher:
binutils-2.15.92.0.2-10.EL4
compat-db-4.1.25-9
control-center-2.8.0-12
gcc-3.4.3-9.EL4
gcc-c++-3.4.3-9.EL4
glibc-2.3.4-2
glibc-common-2.3.4-2
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-9.EL4
libstdc++-devel-3.4.3-9.EL4
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2
Also ensure to install the libaio-0.3.96 RPM or a newer version! Otherwise the OUI prerequisite check will fail.
To check the RPMs, run:
rpm –qa binutils compat-db control-center gcc gcc-c++ glibc glibc-common gnome-libs \
libstdc++ libstdc++-devel make pdksh sysstat xscreensaver libaio
例如:
rpm –qa |grep binutil
可以查看是否安装了binutils-2.15.92.0.2-10.EL4包,你机器安装的版本要一样或者更新最好
6. Installing the RPMs 10g R2 on RHEL AS 4 (x86) 如果那个包没有安装 使用此方法
On my RHEL AS 4 x86 system I installed the following RPMs and dependencies:
rpm -Uvh gcc-3.4.4-2.x86_64.rpm \
gcc-c++-3.4.4-2.x86_64.rpm \
libstdc++-devel-3.4.4-2.x86_64.rpm \
cpp-3.4.4-2.x86_64.rpm \
glibc-devel-2.3.4-2.13.x86_64.rpm \
glibc-headers-2.3.4-2.13.x86_64.rpm \
glibc-kernheaders-2.4-9.1.98.EL.x86_64.rpm
compat-libcwait-2.0-2.i386.rpm 和compat-oracle-rhel4-1.0-5.i386.rpm
可以从网站上下载 这些补丁还是好找的(留意版本呀!!)
地址:
7. Checking Kernel Parameters
To see all kernel parameters, execute: root用户执行
su - root
sysctl –a | grep kernel
I added the following lines to the /etc/sysctl.conf file which is used during the boot process:
vi edit file 修改 /etc/sysctl.conf 这个文件(使用vi编辑),加入以下的语句:
kernel.shmmax=536870912 ------貌似这里10g的内存要求是512 我的是400M ,还是写为------------------------------------512*1024*1024=536870912
kernel.shmmni = 4096
kernel.shmall = 2097152
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
执行sysctl以反映修改 使内核参数立刻生效,重启也可以
# sysctl – p
8. Setting Shell Limits for the Oracle User
Most shells like Bash provide control over various resources like the maximum allowable number of open file descriptors or the maximum number of processes available to a user. For more information on ulimit for the Bash shell, see man bash and search for ulimit.
If you just install a small test database, then you might be ok with the current settings (note that the limits very often vary). But for (larger) production databases, you should increase the following shell limits to the following values recommended by Oracle:
编辑文件:/etc/security/limits.conf 加入以下语句: (root用户执行)
oracle soft nofile 65536
oracle hard nofile 65536
oracle soft nproc 16384
oracle hard nproc 16384
9. Setting Oracle Environments 设置环境变量 (oracle用户执行 ,千万不要使用root用户)
vi /home/oracle/.bash_profile
#########以下是加入的内容###############
export LD_ASSUME_KERNEL=2.6.9 ###这里很重要 设置AS4的内核参数
export ORACLE_BASE=/u01/app/oracle ## 随个人设置
export ORACLE_HOME=/u01/app/oracle/product/10.2.0/db_1 ##随个人设置
export ORACLE_SID=ora10g # #随个人设置
export ORACLE_TERM=xterm
export ORACLE_OWNER=oracle
export THREAD_FLAG=native
export TNS_ADMIN=$ORACLE_HOME/network/admin
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
export LD_LIBRARY_PATH
export PATH=$PATH:$ORACLE_HOME/bin
10. Using Oracle Universal Installer (OUI)
10.1 允许屏幕输入
以 Root 用户登录并允许用户 oracle 向 X 显示器写入:
su – root
xhost +
(这里会有一个提示,不用管它)
10.2
新开一个窗口,登录为 oracle 用户:(安装的过程中,必须使用oracle用户)
#su - oracle
进入database目录
./runInstaller
一般这里会让你在使用root用户执行 /u01/app/oracle/product/10.2.0/db_1/utl/root.sh ,执行完之后,继续安装。
这里安装一般不选择安装数据库,只安装软件即可
11.创建数据库 oracle用户执行
使用oracle用户 输入dbca 开始创建数据库
这里需要新建一个文件
# touch /etc/oratab
然后建立过程和Windows一样