search
HomeDatabaseMysql TutorialOracle 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

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Explain the InnoDB Buffer Pool and its importance for performance.Explain the InnoDB Buffer Pool and its importance for performance.Apr 19, 2025 am 12:24 AM

InnoDBBufferPool reduces disk I/O by caching data and indexing pages, improving database performance. Its working principle includes: 1. Data reading: Read data from BufferPool; 2. Data writing: After modifying the data, write to BufferPool and refresh it to disk regularly; 3. Cache management: Use the LRU algorithm to manage cache pages; 4. Reading mechanism: Load adjacent data pages in advance. By sizing the BufferPool and using multiple instances, database performance can be optimized.

MySQL vs. Other Programming Languages: A ComparisonMySQL vs. Other Programming Languages: A ComparisonApr 19, 2025 am 12:22 AM

Compared with other programming languages, MySQL is mainly used to store and manage data, while other languages ​​such as Python, Java, and C are used for logical processing and application development. MySQL is known for its high performance, scalability and cross-platform support, suitable for data management needs, while other languages ​​have advantages in their respective fields such as data analytics, enterprise applications, and system programming.

Learning MySQL: A Step-by-Step Guide for New UsersLearning MySQL: A Step-by-Step Guide for New UsersApr 19, 2025 am 12:19 AM

MySQL is worth learning because it is a powerful open source database management system suitable for data storage, management and analysis. 1) MySQL is a relational database that uses SQL to operate data and is suitable for structured data management. 2) The SQL language is the key to interacting with MySQL and supports CRUD operations. 3) The working principle of MySQL includes client/server architecture, storage engine and query optimizer. 4) Basic usage includes creating databases and tables, and advanced usage involves joining tables using JOIN. 5) Common errors include syntax errors and permission issues, and debugging skills include checking syntax and using EXPLAIN commands. 6) Performance optimization involves the use of indexes, optimization of SQL statements and regular maintenance of databases.

MySQL: Essential Skills for Beginners to MasterMySQL: Essential Skills for Beginners to MasterApr 18, 2025 am 12:24 AM

MySQL is suitable for beginners to learn database skills. 1. Install MySQL server and client tools. 2. Understand basic SQL queries, such as SELECT. 3. Master data operations: create tables, insert, update, and delete data. 4. Learn advanced skills: subquery and window functions. 5. Debugging and optimization: Check syntax, use indexes, avoid SELECT*, and use LIMIT.

MySQL: Structured Data and Relational DatabasesMySQL: Structured Data and Relational DatabasesApr 18, 2025 am 12:22 AM

MySQL efficiently manages structured data through table structure and SQL query, and implements inter-table relationships through foreign keys. 1. Define the data format and type when creating a table. 2. Use foreign keys to establish relationships between tables. 3. Improve performance through indexing and query optimization. 4. Regularly backup and monitor databases to ensure data security and performance optimization.

MySQL: Key Features and Capabilities ExplainedMySQL: Key Features and Capabilities ExplainedApr 18, 2025 am 12:17 AM

MySQL is an open source relational database management system that is widely used in Web development. Its key features include: 1. Supports multiple storage engines, such as InnoDB and MyISAM, suitable for different scenarios; 2. Provides master-slave replication functions to facilitate load balancing and data backup; 3. Improve query efficiency through query optimization and index use.

The Purpose of SQL: Interacting with MySQL DatabasesThe Purpose of SQL: Interacting with MySQL DatabasesApr 18, 2025 am 12:12 AM

SQL is used to interact with MySQL database to realize data addition, deletion, modification, inspection and database design. 1) SQL performs data operations through SELECT, INSERT, UPDATE, DELETE statements; 2) Use CREATE, ALTER, DROP statements for database design and management; 3) Complex queries and data analysis are implemented through SQL to improve business decision-making efficiency.

MySQL for Beginners: Getting Started with Database ManagementMySQL for Beginners: Getting Started with Database ManagementApr 18, 2025 am 12:10 AM

The basic operations of MySQL include creating databases, tables, and using SQL to perform CRUD operations on data. 1. Create a database: CREATEDATABASEmy_first_db; 2. Create a table: CREATETABLEbooks(idINTAUTO_INCREMENTPRIMARYKEY, titleVARCHAR(100)NOTNULL, authorVARCHAR(100)NOTNULL, published_yearINT); 3. Insert data: INSERTINTObooks(title, author, published_year)VA

See all articles

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

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

Hot Tools

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

Atom editor mac version download

Atom editor mac version download

The most popular open source editor

EditPlus Chinese cracked version

EditPlus Chinese cracked version

Small size, syntax highlighting, does not support code prompt function

DVWA

DVWA

Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software