RedHat5.3
上安装
oracle10g
数据库环境调试
安装
RedHat5.3
,不在这里叙述了,只是说明一下安装的时候注意的地方:
安装语言选择英文;(安装数据库和学习
Linux
比较有好处)
自选安装包,开发部分全部选择上;
二
RedHat5.3
环境设置
1 .
验证
Linux
包数据:
[root@test ~]# rpm -q gcc make binutils openmotif setarch compat-db compat-gcc compat-gcc-c++ compat-libstdc++ compat-libstdc++-devel
gcc-3.4.6-3
make-3.80-6.EL4
binutils-2.15.92.0.2-21
openmotif-2.2.3-10.RHEL4.5
setarch-1.6-1
compat-db-4.1.25-9
package compat-gcc is not installed
package compat-gcc-c++ is not installed
package compat-libstdc++ is not installed
package compat-libstdc++-devel is not installed
以上没有安装的包,没有可以正常安装
oracle10g
。
2
.为
oracle10g
配置
Linux
(
1
)检查计算机配置:
[root@test ~]# grep MemTotal /proc/meminfo
MemTotal: 2070224 kB
[root@test ~]# grep SwapTotal /proc/meminfo
SwapTotal: 2064376 kB
以上为我的计算机配置
[root@test ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
66G 6.8G 56G 11% /
/dev/sda1 99M 13M 82M 14% /boot
none 1011M 0 1011M 0% /dev/shm
(
2
)创建
oracle
用户和用户组
[root@test ~]# groupadd oinstall
[root@test ~]# groupadd dba
[root@test ~]# useradd -m -g oinstall -G dba oracle
查看
oracle
用户信息并创建密码
[root@test ~]# id oracle
uid=501(oracle) gid=501(oinstall) groups=501(oinstall),502(dba)
[root@test ~]# passwd oracle
Changing password for user oracle.
New UNIX password:
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password:
passwd: all authentication tokens updated successfully.
(
3
)创建安装目录和数据存放目录
[root@test ~]# mkdir -p /oracle
[root@test ~]# mkdir -p /oradata
[root@test ~]# chown -R oracle:oinstall /oracle /oradata
[root@test ~]# chmod 775 /oracle /oradata
[root@test ~]#
(
4
)配置
Linux
内核
[root@test ~]# cat >> /etc/sysctl.conf <<EOF
> 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
> EOF
检验命令
[root@test ~]# /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
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
(
5
)设置
shell
限制
[root@test ~]# cat >> /etc/security/limits.conf <<EOF
> oracle soft nproc 2047
> oracle hard nproc 16384
> oracle soft nofile 1024
> oracle hard nofile 65536
> EOF
[root@test ~]# cat >> /etc/pam.d/login <<EOF
> session required /lib/security/pam_limits.so
> EOF
[root@test ~]# cat >> /etc/profile <<EOF
> if [ \$USER = "oracle" ]; then
> if [ \$SHELL = "/bin/ksh" ]; then
> ulimit -p 16384
> ulimit -n 65536
> else
> ulimit -u 16384 -n 65536
> fi
> umask 022
> fi
> EOF
[root@test ~]# vi /etc/csh.login
[root@test ~]# cat >> /etc/csh.login <<EOF
> if ( \$USER == "oracle") then
> limit maxproc 16384
> limit descriptors 65536
> umask 022
> endif
> EOF
3.
配置
oracle
用户环境变量
.bash_profile
文件
/home/oracle
下的
.bash_profile
这个文件为隐藏文件;
#vi /home/oracle/.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
TMP=/tmp;
export TMP
TMPDIR=$TMP;
export TMPDIR
ORACLE_BASE=/oracle;
export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1;
export ORACLE_HOME
ORACLE_SID=neocg;
export ORACLE_SID
ORACLE_TERM=xterm;
export ORACLE_TERM
PATH=/usr/sbin:$PATH;
export PATH
PATH=$ORACLE_HOME/bin:$PATH;
export PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib;
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib;
export CLASSPATH
unset USERNAME
配置完
oracle
环境变量之后,必须重启计算机,使用
oracle
用户登录安装
oracle10g
三
安装
oracle10g
数据库
数据库安装界面不再叙述,可参考
windows
下安装界面