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.
安装完成 成功 !!!!!!!!!!!