安装环境CentOS 5.5,需要附加的软件自己找。
或者使用以下,一并升级
yum install binutils compat
-
db compat
-
libstdc
++-
296
control
-
center \
gcc gcc
-
c
++
glibc glibc
-
common gnome
-
libs libstdc
++
libstdc
++-
devel \
make pdksh sysstat xscreensaver setarch
有些可能会安装不到,不过没关系。
要安装一个libXp,不然安装Oracle的时候可能会乱码。
1.以root用户登录,增加用户和组。
/
usr
/
sbin
/
groupadd oinstall
/
usr
/
sbin
/
groupadd dba
/
usr
/
sbin
/
groupadd oper
增加用户
/
usr
/
sbin
/
useradd
-
g oinstall
-
G dba[,oper] oracle
设置密码
2.更新/etc/sysctl.conf
#
add by gaohu for oracle 10gR2
#
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
=
1048576
net.core.rmem_max
=
1048576
net.core.wmem_default
=
262144
net.core.wmem_max
=
262144
更新完成后,使用 /sbin/syctl -p 来检查。
3.更新shell,编辑 /etc/security/limits.conf
oracle soft nproc
2047
oracle hard nproc
16384
oracle soft nofile
1024
oracle hard nofile
65536
4.更新 /etc/pam.d/login
session required
/
lib
/
security
/
pam_limits.so
session required pam_limits.so
5.更新 /etc/profile
if
[
$USER
=
"
oracle
"
]; then
if
[
$SHELL
=
"
/bin/ksh
"
]; then
ulimit
-
p
16384
ulimit
-
n
65536
else
ulimit
-
u
16384
-
n
65536
fi
fi
6.创建安装路径
#
mkdir -p /u01/app/oracle
#
chown -R oracle:oinstall /u01/app/oracle
#
chmod -R 775 /u01/app/oracle
7.创建数据路径和闪回路径
#
mkdir /u01/oradata
#
chown oracle:oinstall /u01/oradata
#
chmod 775 /u01/oradata
闪回路径,可选:
#
mkdir /u01/flash_recovery_area
#
chown oracle:oinstall /u01/flash_recovery_area
#
chmod 775 /u01/flash_recovery_area
8.切换到oracle用户,设置用户环境变量 编辑 /home/oracle/.bash_profile, 增加
#
add by gaohu
TMP
=/
tmp
TMPDIR
=/
tmp
export TMP TMPDIR
ORACLE_BASE
=/
u01
/
app
/
oracle
ORACLE_SID
=
orcl
export ORACLE_BASE ORACLE_SID
#
unset ORACLE_HOME
#
unset TNS_ADMIN
ORACLE_OWNER
=
oracle
ORACLE_HOME
=
$ORACLE_BASE
/
product
/
10.2
.
0
/
db_1
export ORACLE_OWNER ORACLE_HOME
PATH
=/
usr
/
sbin:
$ORACLE_HOME
/
bin:
$PATH
;
export PATH
export LD_LIBRARY_PATH
=
$ORACLE_HOME
/
lib:
/
lib:
/
usr
/
lib;
export CLASSPATH
=
$ORACLE_HOME
/
JRE:
$ORACLE_HOME
/
jlib:
$ORACLE_HOME
/
rdbms
/
jlib;
NLS_LANG
=
AMERICAN_AMERICA.ZHS16GBK;
export NLS_LANG
#
umask 022
#
if [ $USER = "oracle" ]; then
#
if [ $SHELL = "/bin/ksh" ]; then
#
ulimit -p 16384
#
ulimit -n 65536
#
else
#
ulimit -u 16384 -n 65536
#
fi
#
fi
9.刷新环境变量(退出或者source)。执行安装,因为Oracle10g是不支持CentOS 5的,所以增加忽略前提要求这个参数。
.
/
runInstaller
-
IgnoreSysprereqs
或者是修改 /etc/redhat-release,改成支持的操作系统,比如 redhat-3, redhat-4
看上面就知道,其实我是Fedora 16,只要把前面一个识别串改掉就可以了。嘿嘿...
9.关于DHCP的问题
1. 在进行Preinstallation Requirements Checking时遇到了Windows下相同的网络配置问题:
Check complete. The overall result of this check is: Not executed <<<<
Recommendation: Oracle supports installations on systems with DHCP-assigned public IP addresses. However, the primary network interface on the system should be configured with a static IP address in order for the Oracle Software to function properly. See the Installation Guide for more details on installing the software on systems configured with DHCP.
问题的具体解决办法在文档Installation Guide 的 2.4 Checking the Network Setup中有详细介绍
[1] 具体做法是用文本编辑器打开etc文件夹下的hosts文件,如:
[oracle@admin ~]$ gedit etc/hosts
[2] 然后将自己电脑的IP,主机名[它可以由hostname命令查询获得]和域名(自己起一个好听一点的就行了)写在原文件内容的前面就可以了
For example:
192.168.100.16 myhost.us.mycompany.com myhost
127.0.0.1 localhost.localdomain localhost
或者是给自己真正设置一个静态的IP地址。