Oracle 8.1.7在redhat 7.3的安装方法
Oracle 8i release 3 (8.1.7) 在redhat 7.3的安装方法 首先要找到下面几个软件包:
Oracle 8i release 3 (8.1.7) 在redhat 7.3的安装方法
首先要找到下面几个软件包:
* java开发工具 jdk-1.1.8_V3 (可以在上得到,文件名是jdk118_v3.tar.bz2)
* redhat 6.2兼容包 (redhat 7.3盘上或redhat网站上找一下)
compat-glibc-6.2-2.1.3.2.i386.rpm
compat-libs-6.2-3.i386.rpm
compat-libstdc++-6.2-2.9.0.16.i386.rpm
compat-egcs-6.2-1.1.2.16.i386.rpm
* glibc-2.1.3-stubs (oracle官方站点上放出的补丁,文件名是glibc-2.1.3-stubs.tar.gz)
最好把这些文件统统扔到一个文件夹里.
我的系统尚未装过oracle,自带的kde3,shell是bash。
以上文件放在/orafile目录,oracle8i安装文件放在/mnt/wind/oracle8i目录。
下面要用root身份的来做:
安装兼容包:
cd /orafile
rpm -Uvh compat* --nodeps
rpm -qa | grep compat* 看看安装上了没有啊
安装jdk:
tar jxvf jdk118_v3.tar.bz2 -C /usr/local
cd /usr/local
mv jdk118_v3 java
添加oracle用户及oinstall,dba组,其实只要dba组也可以,不过oracle文档里建议用两个组,好歹给他留点面子吧 :)
groupadd oinstall
groupadd dba
useradd -g oinstall -G dba oracle
passwd oracle
根据需要建立oracle的安装目录,我将要把oracle安装到/home/oracle/product/8.1.7目录:
cd /home/oracle
mkdir -p product/8.1.7
chown -R oracle.oinstall /home/oracle/*
正而八经用oracle跑业务的兄弟注意了,最好去看看oracle文档,装的不合理影响性能。
修改/etc/rc.local文件增大共享内存段的最大尺寸,默认32M的设置会影响oracle的性能(这步也可以在安装以后做):
echo 134217728 > /proc/sys/kernel/shmmax
这样系统每次启动就自动把shmmax的值改为128M,当然你重新编译kernel也是可以的.
现在注消一下,用oracle帐号登录,我们来设置环境变量:
用你喜欢的编辑器在/home/oracle/.bash_profile文件中增加如下几行:
export LD_ASSUME_KERNEL=2.2.5
source /usr/i386-glibc21-linux/bin/i386-glibc21-linux-env.sh
export ORACLE_BASE=/home/oracle
export ORACLE_HOME=$ORACLE_BASE/product/8.1.7
export NLS_LANG="SIMPLIFIED CHINESE_CHINA.ZHS16CGB231280"
export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
export PATH=$PATH:$ORACLE_HOME/bin
保存以后退出,执行
source /home/oracle/.bash_profile
或者干脆注消一次.
用env命令察看一下变量是否已经设置正确
env
感觉没问题以后再来销毁LANG,LANGUAGE,NLS_LANG几个变量
unset LANG
unset LANGUAGE
unset NLS_LANG
这样运行/mnt/wind/oracle8i时就不会出现挤在一起的中文了.
如果不行我还有一招,运行
locale_config
输入root密码,选择en_US,记着保存
注消后就ok了
至此,我们的准备工作已经完成了!
下面开始安装oracle8i!
cd /mnt/wind/oracle8i
./runInstaller
如果是光盘安装先要mount光驱,
mount /dev/cdrom
cd /mnt/cdrom
./runInstaller
按照提示安装,过一会oracle会提示你要用root身份运行orainstRoot.sh文件
按alt+ctrl+f2,用root登录
cd $ORACLE_HOME
./orainstRoot.sh
在该选择安装类型的时候最好选Custom,Typical会导致创建数据库失败.因为Custom安装会提示你是否要用该向导来创建一个数据库,我们可以选否来避免建库失败。等安装完打过补丁再用dbassist建库。
文件copy快结束的时候会提示ins_ctx.mk文件出错,这个不用怕,点ignore就行了,稍后我们用补丁对它进行修正。
copy完以后会让提示运行root.sh,这时再切换到另一个控制台,
cd $ORACLE_HOME
先不要急着运行root.sh,因为文件的第102行和156行有错误,
把 RMF=/bin/rm -f 改为 RMF="/bin/rm -f"
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):
cd /orafile
tar zxvf glibc-2.1.3-stubs.tar.gz -C $ORACLE_HOME
cd $ORACLE_HOME
./setup_stubs.sh
现在要把语言改回来了,
locale_config
选择zh_CN.GB18030
重新获取变量,这样运行dbassist可以使用中文,并且建库其间也不会提示NLS_LANG错误,
source /home/oracle/.bash_profile
下面我们来建数据库,
dbassist
一个中文图形化的界面,呵呵,根据提示进行选择就可以了,注意设置ORACLE_SID,在本例中ORACLE_SID是smzhang,如果没有必要的话建议不要安装Jserver,否则请准备好枕头席子,好好睡一觉吧,。
数据库建立完毕,再编辑一下.bash_profile把ORACLE_SID加进去,我的ORACLE_SID是smzhang,就在/home/oracle/.bash_profile里加入
export ORACLE_SID=smzhang
为以后方便需要修改/etc/oratab文件,把后面的N改成Y,改完后像这样就可以了:
*:/home/oracle/product/8.1.7:Y
smzhang:/home/oracle/product/8.1.7:Y
下面来测试一把,运行:
dbstart
oemapp dbastudio
输入默认用户名和密码,ok了!
用它在smzhang里建个表比如mytest,随便写些东西进去,用sqlplus查看,
sqlplus system/manager@smzhang
select * from mytest
哈哈,搞定了!
但是!下次启动呢?数据库起不来了吧,再做些设置吧,
记得/etc/rc.local文件吗,懒人专用,加入两行:
su - oracle -c 'lsnrctl start'
su - oracle -c 'dbstart'
保存,reboot一下,快找个菜鸟MM过来看看吧,嘿嘿.
因为oracle8的特殊性,安装中很容易出现问题,请认真阅读本文后安装。
安装Oracle有好几种方法,例如本文在没有用到
i386-glibc21-linux.tar.gz,binutils-2.10.0.18-1.i386.rpm,env_ctx.mk和不修改gcc,cc,ld的情况下就能成功装好Oracle8i,我已经成功装过数次,切忌不要和其他方法混合使用,否则出现问题很难解决。
(参考英文文档 )
--- 张 豪(smzhang)
时间:2002-09-15 19:17来源: 作者:smzhang责任编辑:admin

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

VS Code system requirements: Operating system: Windows 10 and above, macOS 10.12 and above, Linux distribution processor: minimum 1.6 GHz, recommended 2.0 GHz and above memory: minimum 512 MB, recommended 4 GB and above storage space: minimum 250 MB, recommended 1 GB and above other requirements: stable network connection, Xorg/Wayland (Linux)

The reasons for the installation of VS Code extensions may be: network instability, insufficient permissions, system compatibility issues, VS Code version is too old, antivirus software or firewall interference. By checking network connections, permissions, log files, updating VS Code, disabling security software, and restarting VS Code or computers, you can gradually troubleshoot and resolve issues.

Although Notepad cannot run Java code directly, it can be achieved by using other tools: using the command line compiler (javac) to generate a bytecode file (filename.class). Use the Java interpreter (java) to interpret bytecode, execute the code, and output the result.

The five basic components of the Linux system are: 1. Kernel, 2. System library, 3. System utilities, 4. Graphical user interface, 5. Applications. The kernel manages hardware resources, the system library provides precompiled functions, system utilities are used for system management, the GUI provides visual interaction, and applications use these components to implement functions.

VS Code is available on Mac. It has powerful extensions, Git integration, terminal and debugger, and also offers a wealth of setup options. However, for particularly large projects or highly professional development, VS Code may have performance or functional limitations.

Visual Studio Code (VSCode) is a cross-platform, open source and free code editor developed by Microsoft. It is known for its lightweight, scalability and support for a wide range of programming languages. To install VSCode, please visit the official website to download and run the installer. When using VSCode, you can create new projects, edit code, debug code, navigate projects, expand VSCode, and manage settings. VSCode is available for Windows, macOS, and Linux, supports multiple programming languages and provides various extensions through Marketplace. Its advantages include lightweight, scalability, extensive language support, rich features and version

To view the Git repository address, perform the following steps: 1. Open the command line and navigate to the repository directory; 2. Run the "git remote -v" command; 3. View the repository name in the output and its corresponding address.

VS Code is the full name Visual Studio Code, which is a free and open source cross-platform code editor and development environment developed by Microsoft. It supports a wide range of programming languages and provides syntax highlighting, code automatic completion, code snippets and smart prompts to improve development efficiency. Through a rich extension ecosystem, users can add extensions to specific needs and languages, such as debuggers, code formatting tools, and Git integrations. VS Code also includes an intuitive debugger that helps quickly find and resolve bugs in your code.
