|
1.硬件要求
1.1 内存至少512M
grep MemTotal /proc/meminfo
1.2 交换分区 至少1G
grep SwapTotal /proc/meminfo
1.3 /tmp 目录空闲区 至少400M
df -k /tmp 400M
1.4 硬盘空闲区 至少4G
df -k
[root@localhost ~]# df -k
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/sda1 19288596 5383388 12909584 30% /
tmpfs 481976 0 481976 0% /dev/shm
[root@localhost ~]# grep SwapTotal /proc/meminfo
SwapTotal: 1052248 kB
[root@localhost ~]# grep MemTotal /proc/meminfo
MemTotal: 962500 kB
[root@localhost ~]# df'
>
[root@localhost ~]# df
文件系统 1K-块 已用 可用 已用% 挂载点
/dev/sda1 19288596 5383388 12909584 30% /
tmpfs 481976 0 481976 0% /dev/shm
2. 软件要求
需要安装了以下软件包
Gnu gcc package 至少是
gcc-3.2.3-2
make-3.79·
binutils-2.11·
openmotif-2.2.2-16·
setarch-1.3-1 ·
compat-db-4.0.14.5·
compat-gcc-7.3-2.96.122·
compat-gcc-c++-7.3-2.96.122·
compat-libstdc++-7.3-2.96.122·
compat-libstdc++-devel-7.3-2.96.122
可以使用以下命令检查:
rpm -q package_name
注意这里的package_name不带任何版本号,例如检查make-3.79
rpm -q make
如果以上软件没有安装,请从光盘镜像中找到安装.
[root@localhost ~]# rpm -q gcc
gcc-4.1.1-52.el5
[root@localhost ~]# rpm -q make
make-3.81-1.1
[root@localhost ~]# rpm -q binutils
binutils-2.17.50.0.6-2.el5
[root@localhost setupfile]# rpm -ivh libXp-1.0.0-8.i386.rpm
warning: libXp-1.0.0-8.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:libXp ########################################### [100%]
[root@localhost setupfile]# rpm -ivh openmotif-2.3.0-0.3.el5.i386.rpm
warning: openmotif-2.3.0-0.3.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:openmotif ########################################### [100%]
[root@localhost setupfile]# rpm -q openmotif
openmotif-2.3.0-0.3.el5
[root@localhost ~]# rpm -q setarch
setarch-2.0-1.1
[root@localhost setupfile]# rpm -q compat-db
compat-db-4.2.52-5.1
[root@localhost /]# mkdir setupfile
[root@localhost ~]# cd filepack
[root@localhost filepack]# ls
compat-db-4.2.52-5.1.i386.rpm compat-libstdc++-296-2.96-138.i386.rpm
compat-gcc-34-3.4.6-4.i386.rpm compat-libstdc++-33-3.2.3-61.i386.rpm
compat-gcc-34-c++-3.4.6-4.i386.rpm openmotif-2.3.0-0.3.el5.i386.rpm
compat-gcc-34-g77-3.4.6-4.i386.rpm
[root@localhost filepack]# cp compat-db-4.2.52-5.1.i386.rpm /setupfile
......
[root@localhost setupfile]# rpm -ivh compat-db-4.2.52-5.1.i386.rpm
warning: compat-db-4.2.52-5.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:compat-db ########################################### [100%]
[root@localhost setupfile]# rpm -ivh compat-libstdc++-296-2.96-138.i386.rpm
warning: compat-libstdc++-296-2.96-138.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
package compat-libstdc++-296-2.96-138 is already installed
[root@localhost setupfile]# rpm -ivh compat-libstdc++-296-2.96-138.i386.rpm
[root@localhost setupfile]# rpm -ivh compat-gcc-34-3.4.6-4.i386.rpm
warning: compat-gcc-34-3.4.6-4.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
package compat-gcc-34-3.4.6-4 is already installed
[root@localhost setupfile]# rpm -ivh compat-libstdc++-33-3.2.3-61.i386.rpm
warning: compat-libstdc++-33-3.2.3-61.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
package compat-libstdc++-33-3.2.3-61 is already installed
[root@localhost setupfile]# rpm -ivh compat-gcc-34-c++-3.4.6-4.i386.rpm
warning: compat-gcc-34-c++-3.4.6-4.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
package compat-gcc-34-c++-3.4.6-4 is already installed
[root@localhost setupfile]# rpm -ivh compat-gcc-34-g77-3.4.6-4.i386.rpm
warning: compat-gcc-34-g77-3.4.6-4.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
package compat-gcc-34-g77-3.4.6-4 is already installed
3. 创建安装oracle 所需的组和用户
需要的用户是oracle,组是dba,oinstall
相关命令:
groupadd oinstall
groupadd dba
useradd –g oinstall –G dba oracle
passwd oracle
[root@localhost /]# passwd oracle
Changing password for user oracle.
New UNIX password:
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
4. 创建安装安装所需的目录
Oracle Base 目录/u/app/oracle/product/10.2/db_1
mkdir –p /u/app/oracle/product/10.2/db_1 创建目录
chown –R oracle:oinstall /u/ 利用 chown 可以将档案的拥有者加以改变。一般来说,这个指令只有是由系统管理者(root)所使用
chmod –R 755 /u 所有用户可读该目录,但只有属主才能改变目录中的内容
[root@localhost /]# mkdir -p /u/app/oracle/product/10.2/db_1
[root@localhost /]# chown -R oracle:oracleinstall /u/
[root@localhost /]# chmod -R 755 /u
5. 配置内核参数
5.1 编辑/etc/sysctl.conf文件,添加或修改如下的行
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
5.2 改变当前内核参数的值
/sbin/sysctl -p
[root@localhost sbin]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmmax = 4294967295
kernel.shmall = 268435456
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
6. 检查您的/etc/host.conf 是否含有下面的条目
127.0.0.1 localhost 如果没有的话, oracle 的监听器无法启动
7.为了提高在linux系统上运行软件的性能,必须对oracle用户设置下列shell 限定。
7.1 打开文件数和进程数的限制
加入下面的行到文件/etc/security/limits.conf
..............
#<domain> <type> <item> <value>
#
#* soft core 0
#* hard rss 10000
#@student hard nproc 20
#@faculty soft nproc 20
#@faculty hard nproc 50
#ftp hard nproc 0
#@student - maxlogins 4
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
# End of file
7.2 加入下面的行到文件/etc/pam.d/login
session required /lib/security/pam_limits.so
8. 为oracle用户设置环境变量,注意以下命令为,必需以oracle用户身分登录
●Bash shell,更改.bash_profile,添加以下行
export ORACLE_BASE=/u/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2/db_1
export ORACLE_SID=**********
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
export ORACLE_BASE=/u/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/10.2/db_1
export ORACLE_SID=testorcl
export PATH=$ORACLE_HOME/bin:$PATH
export ORACLE_BASE ORACLE_HOME ORACLE_SID PATH
输入完成后 按shift和+按键,进入低行模式后输入:wq回车保存
设置好后可以用命令 ehco $ORACLE_HOME and ehco $ORACLE_BASE 检查设置路径
[oracle@localhost ~]$ echo $ORACLE_HOME
/u/app/oracle/product/10.2/db_1
[oracle@localhost ~]$ echo $ORACLE_BASE
/u/app/oracle
11. 以oracle身分登陆xwindow,运行安装目录下的runInstaller
./runInstaller |
|