search
HomeDatabaseMysql Tutorial在RedHat Linux Enterprise5上安装Oracle10g

1.装Linux 版本RedHat EnterPrise5 安装LINUX时需要注意磁盘空间的分配,本人在虚拟机上进行安装测试的.以下空间分配是必须的 /boot 100MB / 如果安装LINUX图形界面的话,最好给10GB /swap 至少1.5GB,建议2GB以上 /tmp至少400MB , 建议1GB 2. 装ORACLE所需安装

1.装Linux 版本RedHat EnterPrise5

安装LINUX时需要注意磁盘空间的分配,本人在虚拟机上进行安装测试的.以下空间分配是必须的

/boot 100MB

/         如果安装LINUX图形界面的话,最好给10GB

/swap 至少1.5GB,建议2GB以上

/tmp   至少400MB , 建议1GB

 

2. 装ORACLE所需安装包,类似打补丁 插入LINUX光盘
检查系统,查看系统所需要的软件包,如果没有则必须安装
加载光盘
#mount /dev/cdrom /mnt
#cd /mnt/Server

 

3.安装FTP服务(技巧,使用TAB键,自动完成文件名的输入)[可选]
#rpm -ivh vsftpd-2.0.5-16.e15.i386.rpm
编辑FTP配置文件,使匿名用户可以访问
#vim /etc/vsftpd/vsftpd.conf
修改配置文件(按i键插入编辑,按ESC键退出编辑状态,输入:wq!回车,表示写入保存并退出)
#anon_upload_enaber=YES
#anon_mkdir_write_enable=YES
去掉上述两行前面的注释标记#即可
修改FTP用户权限
#chown ftp /var/ftp/pub
启动FTP服务
#service vsftpd start
设置FTP服务自动开启
#chkconfig --level 35 vsftpd on
测试FTP服务,将ORACLE10g安装包上传至FTP

 

4. 安装配置YUM[可选]
由于安装软件包时,存在太多依赖关系,建议使用YUM来安装
安装YUM 服务器端配置
将LINUX光盘中的内容COPY至FTP
#cp -r /mnt/Server /var/ftp/pub
#cd /var/ftp/pub/Server
安装软件
#rpm -ivh createrepo?.rpm
生成包之间的关联关系
#createrepo ./

配置YUM客户端
#cd /etc/yum.repos.d/
COPY一个REPO文件的副本,并修改其内容
#cp rhel-debuginfo.repo yum.repo
#vim yum.repo

[rhel1]
name=Red Hat Enterprise Linux
baseurl=ftp://192.168.2.100/pub/Server
enabled=1

使用下面的命令查询未安装的包
# rpm -q gcc make binutils openmotif setarch compat-db compat-gcc compat-gcc-c++ compat-libstdc++ compatlibstdc++-
devel

使用YUM安装未安装的包
#yum install openmotif
依次装完所需安装的包

 

5. 修改内核参数
#vi /etc/sysctl.conf
#use for oracle
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
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

再运行sysctl -p应用以上参数

继续改 vi /etc/security/limits.conf

#use for oracle
* soft nproc 2047
* hard nproc 16384
* soft nofile 1024
* hard nofile 65536

还要改。。。vi /etc/pam.d/login 行末添加
session required pam_limits.so

再改。。。vi /etc/selinux/config 让里面的SELINUX=disabled
修改完内核参数后,需要重启
#reboot

 

 6. 解压ORACLE安装包
新建目录用于存放ORACLE安装文件
#mkdir -p /u01/app/oracle/product/10.2/
通过FTP将安装包上传至LINUX服务器
#cp /var/ftp/pub/10201_database_linux32.zip /u01/
#cd /u01/
#unzip 10201_database_linux32.zip

 

7. 安装ORACLE之前,设置好环境变量,添加用户及组等
创建ORACLE用户及所属组
#groupadd oinstall
#groupadd dba
#useradd -m -g oinstall -g dba oracle
#passwd oracle [回车后开始设置密码]

将/u01文件夹所有者给ORACLE
#chown -R oracle.oinstall /u01
#chmod -R 775 /u01

设置ORACLE环境变量(使用ORACLE账号登录)
#vi ~/.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/; export ORACLE_HOME
ORACLE_SID=orcl; 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

oracle_base,oracle_home,oracle_sid,要根据自己的情况配,和在Windows下写环境变量是一样的

 

8.开始安装ORACLE10g
#cd /u01/database
#./ runInstaller

如果安装界面出现显示不全或是乱码,切换语言到英文即可

#LANG='en_US'

 

另:

1. 在配置完所有内容,运行./runinstaller的时候,报错
错误信息:

  Exception in thread "main" java.lang.UnsatisfiedLinkError:
  /tmp/OraInstall2007-12-03_09-02-02AM/jre/1.4.2/lib/i386/libawt.so:
  libXp.so.6: cannot open shared object file:


  No such file or directory
  at java.lang.ClassLoader$NativeLibrary.load(Native Method)
  at java.lang.ClassLoader.loadLibrary0(Unknown Source)
  at java.lang.ClassLoader.loadLibrary(Unknown Source)
  at java.lang.Runtime.loadLibrary0(Unknown Source)
  at java.lang.System.loadLibrary(Unknown Source)
  at sun.security.action.LoadLibraryAction.run(Unknown Source)
  at java.security.AccessController.doPrivileged(Native Method)
  at sun.awt.NativeLibLoader.loadLibraries(Unknown Source)
  at sun.awt.DebugHelper.(Unknown Source)
  at java.awt.Component.(Unknown Source)

 

原因是由于缺少了libXp.so.6包,根据Oracle的解决方案需要安装xorg-x11-deprecated-libs-6.8.2-1.EL.13.20.i386.rpm包。

请检查YUM安装时,是否安装完整,将缺少的RPM包安装完即可

 

2. 安装完成后,出现错误提示:

OUI - 10058

Message

The OUI Inventory on this system does not exist or is not writable. The possible POTENTIAL/POSSIBLE CAUSES are:1. The script <path>/orainstRoot.sh was not executed with root privileges, or an error occurred during execution.2. You are not a member of the specified installer group.
</path>

Potential Causes

One of the following situations may apply:

  • The permissions for the orainstRoot.sh script are not set correctly for execution as "root" user.

  • You are not part of the particular group specified at the start of installation.

Possible Solutions

  • Make sure that the script is run as user "root."

  • Make sure that you are a part of the particular group specified at the start of installation. Check the group "dba" as shown in the following example:

    %cat /etc/group | grep dba
    dba:x:502:oracle
    

    In this example, the group is dba, the group ID is 502, and the user oracle is a part of the dba group.

解决办法: 使用root账号登录,执行该脚本即可

#cd /home/oracle/

#./orainstRoot.sh

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 role of InnoDB redo logs and undo logs.Explain the role of InnoDB redo logs and undo logs.Apr 15, 2025 am 12:16 AM

InnoDB uses redologs and undologs to ensure data consistency and reliability. 1.redologs record data page modification to ensure crash recovery and transaction persistence. 2.undologs records the original data value and supports transaction rollback and MVCC.

What are the key metrics to look for in an EXPLAIN output (type, key, rows, Extra)?What are the key metrics to look for in an EXPLAIN output (type, key, rows, Extra)?Apr 15, 2025 am 12:15 AM

Key metrics for EXPLAIN commands include type, key, rows, and Extra. 1) The type reflects the access type of the query. The higher the value, the higher the efficiency, such as const is better than ALL. 2) The key displays the index used, and NULL indicates no index. 3) rows estimates the number of scanned rows, affecting query performance. 4) Extra provides additional information, such as Usingfilesort prompts that it needs to be optimized.

What is the Using temporary status in EXPLAIN and how to avoid it?What is the Using temporary status in EXPLAIN and how to avoid it?Apr 15, 2025 am 12:14 AM

Usingtemporary indicates that the need to create temporary tables in MySQL queries, which are commonly found in ORDERBY using DISTINCT, GROUPBY, or non-indexed columns. You can avoid the occurrence of indexes and rewrite queries and improve query performance. Specifically, when Usingtemporary appears in EXPLAIN output, it means that MySQL needs to create temporary tables to handle queries. This usually occurs when: 1) deduplication or grouping when using DISTINCT or GROUPBY; 2) sort when ORDERBY contains non-index columns; 3) use complex subquery or join operations. Optimization methods include: 1) ORDERBY and GROUPB

Describe the different SQL transaction isolation levels (Read Uncommitted, Read Committed, Repeatable Read, Serializable) and their implications in MySQL/InnoDB.Describe the different SQL transaction isolation levels (Read Uncommitted, Read Committed, Repeatable Read, Serializable) and their implications in MySQL/InnoDB.Apr 15, 2025 am 12:11 AM

MySQL/InnoDB supports four transaction isolation levels: ReadUncommitted, ReadCommitted, RepeatableRead and Serializable. 1.ReadUncommitted allows reading of uncommitted data, which may cause dirty reading. 2. ReadCommitted avoids dirty reading, but non-repeatable reading may occur. 3.RepeatableRead is the default level, avoiding dirty reading and non-repeatable reading, but phantom reading may occur. 4. Serializable avoids all concurrency problems but reduces concurrency. Choosing the appropriate isolation level requires balancing data consistency and performance requirements.

MySQL vs. Other Databases: Comparing the OptionsMySQL vs. Other Databases: Comparing the OptionsApr 15, 2025 am 12:08 AM

MySQL is suitable for web applications and content management systems and is popular for its open source, high performance and ease of use. 1) Compared with PostgreSQL, MySQL performs better in simple queries and high concurrent read operations. 2) Compared with Oracle, MySQL is more popular among small and medium-sized enterprises because of its open source and low cost. 3) Compared with Microsoft SQL Server, MySQL is more suitable for cross-platform applications. 4) Unlike MongoDB, MySQL is more suitable for structured data and transaction processing.

How does MySQL index cardinality affect query performance?How does MySQL index cardinality affect query performance?Apr 14, 2025 am 12:18 AM

MySQL index cardinality has a significant impact on query performance: 1. High cardinality index can more effectively narrow the data range and improve query efficiency; 2. Low cardinality index may lead to full table scanning and reduce query performance; 3. In joint index, high cardinality sequences should be placed in front to optimize query.

MySQL: Resources and Tutorials for New UsersMySQL: Resources and Tutorials for New UsersApr 14, 2025 am 12:16 AM

The MySQL learning path includes basic knowledge, core concepts, usage examples, and optimization techniques. 1) Understand basic concepts such as tables, rows, columns, and SQL queries. 2) Learn the definition, working principles and advantages of MySQL. 3) Master basic CRUD operations and advanced usage, such as indexes and stored procedures. 4) Familiar with common error debugging and performance optimization suggestions, such as rational use of indexes and optimization queries. Through these steps, you will have a full grasp of the use and optimization of MySQL.

Real-World MySQL: Examples and Use CasesReal-World MySQL: Examples and Use CasesApr 14, 2025 am 12:15 AM

MySQL's real-world applications include basic database design and complex query optimization. 1) Basic usage: used to store and manage user data, such as inserting, querying, updating and deleting user information. 2) Advanced usage: Handle complex business logic, such as order and inventory management of e-commerce platforms. 3) Performance optimization: Improve performance by rationally using indexes, partition tables and query caches.

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

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
1 months agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

PhpStorm Mac version

PhpStorm Mac version

The latest (2018.2.1) professional PHP integrated development tool

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

ZendStudio 13.5.1 Mac

ZendStudio 13.5.1 Mac

Powerful PHP integrated development environment