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



How to use Docker Desktop? Docker Desktop is a tool for running Docker containers on local machines. The steps to use include: 1. Install Docker Desktop; 2. Start Docker Desktop; 3. Create Docker image (using Dockerfile); 4. Build Docker image (using docker build); 5. Run Docker container (using docker run).

The key differences between CentOS and Ubuntu are: origin (CentOS originates from Red Hat, for enterprises; Ubuntu originates from Debian, for individuals), package management (CentOS uses yum, focusing on stability; Ubuntu uses apt, for high update frequency), support cycle (CentOS provides 10 years of support, Ubuntu provides 5 years of LTS support), community support (CentOS focuses on stability, Ubuntu provides a wide range of tutorials and documents), uses (CentOS is biased towards servers, Ubuntu is suitable for servers and desktops), other differences include installation simplicity (CentOS is thin)

Troubleshooting steps for failed Docker image build: Check Dockerfile syntax and dependency version. Check if the build context contains the required source code and dependencies. View the build log for error details. Use the --target option to build a hierarchical phase to identify failure points. Make sure to use the latest version of Docker engine. Build the image with --t [image-name]:debug mode to debug the problem. Check disk space and make sure it is sufficient. Disable SELinux to prevent interference with the build process. Ask community platforms for help, provide Dockerfiles and build log descriptions for more specific suggestions.

Docker process viewing method: 1. Docker CLI command: docker ps; 2. Systemd CLI command: systemctl status docker; 3. Docker Compose CLI command: docker-compose ps; 4. Process Explorer (Windows); 5. /proc directory (Linux).

Docker uses Linux kernel features to provide an efficient and isolated application running environment. Its working principle is as follows: 1. The mirror is used as a read-only template, which contains everything you need to run the application; 2. The Union File System (UnionFS) stacks multiple file systems, only storing the differences, saving space and speeding up; 3. The daemon manages the mirrors and containers, and the client uses them for interaction; 4. Namespaces and cgroups implement container isolation and resource limitations; 5. Multiple network modes support container interconnection. Only by understanding these core concepts can you better utilize Docker.

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)

VS Code To switch Chinese mode: Open the settings interface (Windows/Linux: Ctrl, macOS: Cmd,) Search for "Editor: Language" settings Select "Chinese" in the drop-down menu Save settings and restart VS Code

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.
