我的环境:
机器 c1200m、128m
软件 redhat linux release 9, kernel 2.4.20-8。
我是参考别人的笔记安装的(但我省了几步)
我的linux完全安装的地方不详细说明其他情况
1,安装准备 ///这些我都放在//home/root/oracle目录下(我修改了目录的权限wrx
glibc-2.1.3-stubs.tar.gz //oracle的linux补丁
j2sdk-1_4_2_06-linux-i586-rpm.bin //sun 的jdk
linux81701.tar //oracle的安装盘
2,安装jdk与创建符号连接(即与创建符号连接)windows,用户root)
我就不说安装图形界面了。^_^
#./j2sdk-1_4_2_06-linux-i586-rpm.bin 执行后会得到 j2sdk-1_4_2_06-linux-i586-rpm安装包
#rpm -uvh j2sdk-1_4_2_06-linux-i586-rpm //安jdk
#ln -s /usr/local/j2sdk-1_4_2_06 /usr/local/java
3 创建用户oracle,组oinstall各oracle的安装路径 (用户root,提示符是#用户是root )
#groupadd oinstall
#groupadd dba
#useradd -g oinstall -g dba oracle
#passwd oracle
new password:[oracle]//[]是我输入的密码
bad password: it is based on a dictionary word
retype new password:[oralce]
passwd: all authentication tokens updated successfully.
#mkdir -p /u01/oracle/product/8.1.7 //创建oracle安装路径
#chown -r /oracle.oinstall /u01/oracle //由于现在使用的是root
///创建的目录不会改变他的权限
//等下用oracle本目录的操作将无权安装
4,修改oracle用户的profile文件(当前工作目录为:/home/oracle/下 ,用户oracle 它的shell提示符变成$)
$vi .bash_profile //建议使用emacs 使用图形界面gedit
//emacs .bash_profile或gedit .bash_profile
添加以下内容:
# stuff for 8.1.7 install
export ld_assume_kernel=2.2.5
export oracle_base=/u01/oracle
export oracle_home=$oracle_base/product/8.1.7
export path=$path:$oracle_home/bin
unset lang
# java development kit for 8.1.7
java_home=/usr/local/java; export java_home
classpath=${java_home}/lib/classes.zip; export classpath
#need to point to init*.ora
oracle_sid=orcl; export oracle_sid
# need shared libraries ie for lsnrctl
if [ “${ld_library_path:-}” == “” ]; then
ld_library_path=${oracle_home}/lib:/usr/lib:/usr/local/lib
else
ld_library_path=${oracle_home}/lib:${ld_library_path}
fi
export ld_library_path
完成后退现vi(先保存)^_^
使刚刚修改的shell有效执行配置文件source命令
$source .bash_profile
5,解压从oracle下载的安装盘(操作用户,oracle,我的工作目录是/home/root/oracle/ 你下载的
oracle把安装盘放在哪里去那里解压吧^_^
$tar -xvf linux81701.tar
6,用oracle用户登录图形界面 进入上一步解压disk1目录双击runinstaller跳出窗口,单击操作
然后就开始了oracle图形安装界面 点install然后按钮往下走 碰到unix group name 填入oinstall
7,oracle准备好安装后,安装程序会弹出一个小窗口,告诉你使用它root用户执行一个名称orainsroot.sh的脚本
8.此时,您打开终端窗口(如果您已经打开,则不需要)
此时终端的提示符是$这是普通用户的shell提示符现在需要切换root(超级用户)
$ su
password:[输入你的root用户密码]
//这时你shell提示符会变成# 你已经级用户的权限
#cd /u01/oracle/product/8.1.7
#./orainstroot.sh //也可以使用 sh orainstroot.sh
creating oracle inventory pointer file (/etc/orainst.loc)
changing groupname of /u01/oracle/orainventory to oinstall.
//这是执行那个sh提示脚本系统^_^
回到oracle点击安装程序ok
然后往下走
select product to install: 选择 oracle enterprise
installation types: 选择 typical (837mb)
verify jdk home directory: 填入 /usr/local/java
database identification: 填入 orcl
sid: 填入 orcl 即根你的 .bash_profile 里面要一致
10.如果你继续往下走,会次 make 错了,别管他,选择 ignore
11、到达 100% 的时候会跳出一个小窗口,提示要 root 用户执行脚本 root.sh ,
等一下,在 执行 root.sh 先打补丁。
回到终端窗口,转到从oracle下载下来的linux将补丁复制到补丁包的目录$oracle_home /*oracle的安装目录*/(我的补丁包/home/root/orale/目示下
#cd /home/root/oracle/
#cp glibc-2.1.3-stubs.tar.gz $oracle_home
//这两个命令也可以使用命令 # cp /home/root/oracle/glibc-2.1.3.stubs.tar.gz /u01/oracle/product/8.1.7
#tar xzvf glibc-2.1.3-stubs.tar.gz
#sh setup_stubs.sh
//这个时候慢慢等一下
最后,您将看到以下内容示:
relinking executables:
running ins_rdbms.mk…done.
running ins_net_client.mk…done.
running ins_cman.mk…done.
running ins_names.mk…done.
running ins_oemagent.mk…done.
running ins_net_server.mk…done.
running ins_nau.mk…done.
running ins_plsql.mk…done.
running ins_precomp.mk…done.
running ins_ldap.mk…done.
running ins_sqlplus.mk…done.
running ins_otrace.mk…done.
running ins_ctx.mk…done.
done. the links have been fixed!
执行完后修改一下root.sh
#vi root.sh
rmf=/bin/rm -f
少了2 个双引号,要改为
rmf=”/bin/rm -f”
还有第 156 行, 靠近末尾少了一个单引号,小心别改错了
ruid=
`/usr/bin/id|$awk -f\( {print $2}|$awk -f\) {print $1}`
要改为
ruid=
`/usr/bin/id|$awk -f\( {print $2}|$awk -f\) {print $1}`
存盘退出,现在可以执行 root.sh
[root@localhost.localdomain 8.1.7]# sh root.sh //运行这个root.sh shell脚本
有一个地方要输入,直接敲回车。
最后结果如下:
enter the full pathname of the local bin directory: [/usr/local/bin]:
\ncreating /etc/oratab file…
entry will be added to the /etc/oratab file 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.
12、接着往下走,应该就没什么问题了。