1.安裝前準備
binutils-2.17.50.0.6-5.el5
compat-db-4.2.52-5.1
control-center-2.16.0-14.el5
gcc-4.1.2-14.el5
gcc-c++-4.1.2-14.el5
glibc-2.5-18
libXp-1.0.0-8.1.el5
libstdc++-4.1.2-14.el5
libstdc++-devel-4.1.2-14.el5
make-3.81-1.1
openmotif-2.3.1-2.el5.i386.rpm
yum -y install binutils compat-db control-center gcc gcc-c++ glibc libXp libstdc++ libstdc++-devel make openmotif sysstat
2.安裝依賴包
yum -y install control-center
yum -y install sysstat
修改語言
[root@sq1 ~]# vi /etc/sysconfig/i18n
LANG="zh_CN.UTF-8"
LANG="en_US.UTF-8"
SYSFONT="latarcyrheb-sun16"
3.root用戶設置核心參數
vi /etc/sysctl.conf
kernel.shmall = 2097152 (共享內存,單位是頁面數 x86的32位爲4k)
kernel.shmmax = 2147483648 (單個共享內存段的最大尺寸)
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
vi /etc/redhat-release
Red Hat Enterprise Linux Server release 3 (Tikanga)
使內核生效
[root@sq1 ~]# /sbin/sysctl -p
4.
[root@sq1 ~]# vi /etc/security/limits.conf (文件實際是 Linux PAM,插入式認證模塊)
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
( core - 限制內核文件的大小
date - 最大數據大小
fsize - 最大文件大小
memlock - 最大鎖定內存地址空間
nofile - 打開文件的最大數目
rss - 最大持久設置大小
stack - 最大棧大小
cpu - 以分鐘爲單位的最多 CPU 時間
noproc - 進程的最大數目
as - 地址空間限制
maxlogins - 此用戶允許登錄的最大數目)
5.
[root@sq1 ~]# vi /etc/pam.d/login (limits.conf是pam_limits.so的配置文件)
session required /lib/security/pam_limits.so
6.用戶環境變量
[root@localhost ~]# groupadd oinstall
[root@localhost ~]# groupadd dba
[root@localhost ~]# useradd -g oinstall -G dba oracle
[root@localhost ~]# passwd oracle
[root@localhost ~]# su - oracle
[oracle@localhost ~]$ vi .bash_profile
ORACLE_BASE=/oracle/app
ORACLE_HOME=$ORACLE_BASE/oracle/product/10.2.0/db_1
ORACLE_SID=TEST
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib
LANG=en_US.UTF-8
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH LD_LIBRARY_PATH LANG
讓環境變量生效
[oracle@localhost ~]$ source .bash_profile
7.把oracle 安裝程序 拷貝到linux
用oracle用戶 解壓縮
[oracle@localhost ~]$ unzip oracle_database_linux32.zip
8.root用戶創建安裝目錄 並修改/etc/hosts
[root@localhost 10g]# hostname sq1
[root@localhost 10g]# vi /etc/hosts
192.168.8.12 sq1
[root@localhost /]# mkdir -p /oracle/app
[root@localhost /]# chmod 777 /oracle
[root@localhost /]# chown -R oracle.oinstall /oracle
切換到oracle 用戶下
[oracle@localhost ~]$ cd /home/oracle/database
[oracle@localhost database]$ ./runInstaller
[root@localhost ~]# cd /oracle/app/oraInventory/
[root@localhost oraInventory]# ./orainstRoot.sh
Changing permissions of /oracle/app/oraInventory to 770.
Changing groupname of /oracle/app/oraInventory to oinstall.
The execution of the script is complete
[root@localhost product]# cd /oracle/app/oracle/product/10.2.0/db_1/
[root@localhost db_1]# ./root.sh
Running Oracle10 root.sh script...
The following environment variables are set as:
ORACLE_OWNER= oracle
ORACLE_HOME= /oracle/app/oracle/product/10.2.0/db_1
Enter the full pathname of the local bin directory: [/usr/local/bin]:
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...
Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
安裝完成 成功 !!!!!!!!!!!