1.Download Software
10201_database_linux32.zip
2.解压文件
unzip 10201_database_linux32.zip
3.Host File
vi /etc/hosts 一般不用修改,也可配置真实ip,格式为
4.Set Kernel Parameters
Add the following lines to the /etc/sysctl.conf file:
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
# semaphores: semmsl, semmns, semopm, semmni
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
Run the following command to change the current kernel parameters:
/sbin/sysctl -p
Add the following lines to the /etc/security/limits.conf file:
[indent]* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536[/indent]Add the following line to the /etc/pam.d/login file, if it does not already exist:
[indent]session required /lib/security/pam_limits.so[/indent]Disable secure linux by editing the /etc/selinux/config file, making sure the SELINUX flag is set as follows:
[indent]SELINUX=disabled[/indent]5.安装依赖包
# From Fedora 8 DVD
cd /media/cdrom/Packages
rpm -Uvh binutils-2.*
rpm -Uvh elfutils-libelf-0.*
rpm -Uvh glibc-2.*
rpm -Uvh glibc-common-2.*
rpm -Uvh libgcc-4.*
rpm -Uvh libstdc++-4.*
rpm -Uvh make-3.*
rpm -Uvh elfutils-libelf-devel-0.*
rpm -Uvh glibc-devel-2.*
rpm -Uvh gcc-4.*
rpm -Uvh gcc-c++-4.*
rpm -Uvh libstdc++-devel-4.*
rpm -Uvh unixODBC-2.*
cd /
eject
# Not available on Fedora 8 DVD, but available from standard yum repository.
yum install libaio libaio-devel
yum install unixODBC-devel
yum install sysstat
yum install compat-libstdc++
# Required to mask Java conflict (thanks to Robert W. Benton for pointing this out)
yum --enablerepo=development install libxcb.i386
6.创建用户及组
groupadd oinstall
groupadd dba
groupadd oper
useradd -g oinstall -G dba oracle
passwd oracle
输入你的oralce 用户密码。
7.创建目录
mkdir -p /u01/app/oracle/product/10.2.0/db_1
chown -R oracle.oinstall /u01
8.以root 用户登录执行以下命令:
xhost +
如我的是在本机安装的 xhost +localhost
9. 修改/etc/redhat-release文件
内容为:
redhat-4
10.
Login as the oracle user and add the following lines at the end of the .bash_profile file:
以oracle 用户登录:编辑.bash_profile 文件。
内容为:
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=TSH1; 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
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
11.正式安装。
将系统注销,以orace 用户登录,第1步解压的文件database 剪切到 oracle 用户的home下。
执行下列命令:
DISPLAY=
我的是:
DISPLAY=localhost:0.0; export DISPLAY
进入 database 目录
执行
./runInstaller
具体安装步骤如下:
[list=1][*]Select Installation Method[*]Specify Inventory Directory and Credentials[*]Select Installation Type[*]Specify Home Details[*]Product-Specific Prerequisite Checks[*]Select Configuration Option[*]Select Database Configuration[*]Specify Database Configuration Options[*]Select Database Management Option[*]Specify Database Storage Option[*]Specify Backup and Recovery Options[*]Specify Database Schema Passwords[*]Summary[*]Install[*]Configuration Assistants[*]Database Configuration Assistant[*]Database Configuration Assistant Password Management[*]Execute Configuration Scripts[*]End Of Installation[/list]
最后:编辑/ect/oratab 文件使
TSH1:/u01/app/oracle/product/10.2.0/db_1:Y至此oracle 安装完毕,理论上oracle 应该能工作了,
#su oracle
#dbstart
执行dbstart 应该能启动数据库,便提示找不到,查看是环境变量的问题,于是我在/ect/profile.d/下建立了文件oracle.sh
内容如下:
# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=TSH1; 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
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
保存 执行
#sh /etc/profile.d/oracle.sh
#dbstart
成功
#sqlplus /nolog
SQL>connect /as sysdba
成功!
注:后来发现只有oracle用户能登录,?决方法,将你的用户加入oinstall 组
#usermod -G oinstall username(你的用户名)。
catman001 于 2008-01-07 10:58:20发表:
顶上去 ,再看。。。:0wpoi2