Home Database Mysql Tutorial RedHat Linux AS 4.0上安装Oracle 10g Release 2

RedHat Linux AS 4.0上安装Oracle 10g Release 2

Jun 07, 2016 pm 03:27 PM
linux oracle redhat Install

3、 设置系统参数 修改#vi /etc/sysctl.conf添加下面代码: kernel.shmall = 2097152 kernel.shmmax = 2147483648 (一般情况下可以设置最大共享内存为物理内存的一半,如果物理内存是 2G,则可以设置最大共享内存为 1073741824(1G=1024*1024*1024)) kern

3、 设置系统参数
修改#vi /etc/sysctl.conf添加下面代码:

kernel.shmall = 2097152
kernel.shmmax = 2147483648
(一般情况下可以设置最大共享内存为物理内存的一半,如果物理内存是 2G,则可以设置最大共享内存为 1073741824(1G=1024*1024*1024))

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命令使得内核改变立即生效

4、设置oracle用户对Shell的限制要求:
a) 编辑文件:#vi /etc/security/limits.conf 加入以下语句:
oracle            soft     nproc    2047
oracle            hard     nproc    16384
oracle            soft     nofile 1024
oracle            hard     nofile 65536
b) 编辑文件:#vi /etc/pam.d/login   加入以下语句:
session     required      /lib/security/pam_limits.so
c) 编辑文件:#vi /etc/profile    加入以下语句:
if [ $USER = "oracle" ]; then
         if [ $SHELL = "/bin/ksh" ]; then
               ulimit -p 16384
               ulimit -n 65536
         else
               ulimit -u 16384 -n 65536
         fi
fi

5、配置oracle用户环境
使用Oracle用户登陆:
#su – oracle
$vi .bash_profile


以下是配置文件的内容


# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
         . ~/.bashrc
fi
# User specific environment and startup programs

umask 022
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
export ORACLE_BASE=/opt/ora10
export ORACLE_HOME=/opt/ora10/product/10.2.0.1
export PATH=$ORACLE_HOME/Apache/perl/bin:$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
export ORACLE_OWNER=oracle
export ORACLE_SID=oradb
export ORACLE_TERM=xterm
unset USERNAME

三、 安装过程
1、重新启动服务器以oracle用户登录,启动X-window进行本地直接安装。
#su – oracle
$ startx
(我是从Xwindow下启动的,所以掠过此步,但在root下#xhost +)
将Oracle10g光盘文件拷贝到前面建立的安装文件夹(/tmp/oracle)下。(如果是下载,将10201_database_linux_x86_64.cpio.gz拷贝到/tmp/oracle下,
1. Unzip the file: gunzip
2. Extract the file: cpio -idmv
到当前目录)
2、正式安装
1)         点击“任务栏” → “应用程序” → “系统工具” → “终端”:
$ /tmp/oracle/runInstaller     (CD到/tmp/oracle/   $./runInstaller)

非常值得称道的是,10g的安装相比以前9i多了一个 Checking operating system certification 的步骤。特别实用。安装文件会自动检测所需的条件。如果有不符合的地方,安装程序会报告给你.并会给出具体原因。
2)         经过一小段的时间,会出现“选择安装方法”的信息窗口;点选“高级安装(A)”,继续安装请单击“下一步(N)”按键;进入“指定产品清单目录和身份证 明”窗口:确认产品清单目录的完整路径(D):/oracle/oraInventory;指定操作系统组名(S):oinstall;继续安装请单击 “下一步(N)”按键;进入“选择安装类型”窗口,点选“企业版(E)”,继续安装请单击“下一步(N)”按键;进入“指定主目录详细信息”窗口;名称 (M):OraDb10g_home1 路径(A): /opt/oracle/product/10.2.0.1/;继续安装请单击“下一步(N)”按键;
3)         进入“产品特定的先决条件检查”窗口,经过一小段时间检查,会出现以下的检查信息窗口;在“正在检查网络配置需要”项目内,选中状态栏目的内容,继续安装 请单击“下一步(N)”按键;进入“选择配置选项”窗口,点选“创建数据库(C)” ,继续安装请单击“下一步(N)”按键;进入“选择数据库配置”窗口,点选“一般用途(G)” ,继续安装请单击“下一步(N)”按键;进入“指定数据库配置选项”窗口;数据库命名中的设置;全局数据库名: oradb SID: oradb;数据库字符集:简体中文ZHS16GBK ;继续安装请单击“下一步(N)”按键;
4)         进入“选择数据库管理选项”窗口,点选“使用Database Control管理数据库”,继续安装请单击“下一步(N)”按键;进入“指定数据库存储选项”窗口,点选“文件系统”;指定数据库文件位置: /oracle/product/10.2.0/oradata/;继续安装请单击“下一步(N)”按键;进入“指定备份和恢复选项”窗口,点选“不启用 自动备份”,继续安装请单击“下一步(N)”按键;进入“指定数据库方案的口令”窗口;点选“所有的帐户都使用同一个口令”,输入口令。继续安装请单击 “下一步(N)”按键;进入“概要信息”窗口,继续安装请单击“下一步(N)”按键;进入“安装”窗口,详细安装如下:A、安装部分片;B、复制文件部 分;C、连接数据系统部分;D、设置数据系统部分;
5)         进入“配置助手”窗口:配置:Oracle Database Configuration Assistant时,会出现“Database Configuration Assistant”新窗口,详细配置过程:A、正在复制数据库文件;B、正在创建并启动Oracle实例;C、正在进行数据库创建;完成以上三个部分, 会出现一个数据库创建完成信息提示窗口,点击“确定”按键。
6)         配置:iSQL*Plus配置辅助程序。配置过程中,会出现一个执行配置脚本信息提示窗口,在终端下运行,执行orainstRoot.sh脚本的过程:点击“任务栏” → “应用程序” → “系统工具” → “终端”,
$ su root (转换成root超级用户环境) Password: ****** (输入root用户的密码)
# /opt/oracle/oraInventory/orainstRoot.sh (输入执行脚本的详细路径)
详细操作:
# /opt/oracle/oracle/product/10.2.0.1/root.sh (输入执行脚本的详细路径)
执行完成orainstRoot.sh、root.sh脚本后,关闭“超级用户的终端”,回到“执行配置脚本”提示窗口,继续安装请单击“确定”按键;进入“安装结束”窗口,退出安装程序请单击“退出(X)”按键;

四、 自启动设置
Oracle 10g需要启动以下服务(在oracle用户下)
    $ lsnrctl start
    $ dbstart
    $ emctl start dbconsole
    $ isqlplusctl start
所以需要做以下配置:
默认dbstart是不起作用的。需要以下配置
1.修改/etc/oratab
    $ vi /etc/oratab
oradb:/opt/ora10/product/10.2.0.1:Y(原来是N改为Y)
2.拷贝一个系统配置好的 PFILE 到 dbs 目录下
# cp /opt/ora10/admin/oradb/pfile/init.ora.2292007201045 $ORACLE_HOME/dbs/init.ora   ($ORACLE_HOME路径要看安装路径而定)
现在你可以测试一下
$ dbstart
注:如果安装版本是10201,可能会出现这个错误:
Failed to auto-start Oracle Net Listene using /ade/vikrkuma_new/oracle/bin/tnslsnr
修改dbstart的第78行 ($ORACLE_HOME/bin/dbstart)
ORACLE_HOME_LISTNER=/ade/vikrkuma_new/oracle
为ORACLE_HOME_LISTNER=$ORACLE_HOME

$ dbshut

最后在/etc/rc.d/rc.local中加入如下代码:
su - oracle -c "lsnrctl start"
su - oracle -c "dbstart"
su - oracle -c "emctl start dbconsole"
su - oracle -c "isqlplusctl start"

这样重启动服务器后Oracle就会自动启动了。

五、 Oracle 10g设置
iSQL*Plus URL:连接地址:http://server:5560/isqlplus
iSQL*Plus DBA URL:连接地址:http://server:5560/isqlplus/dba
Enterprise Manager 10g Database Control URL:连接地址:http://server:1158/em
用户名:sys
口令:******
连接身份:SYSDBA
继续登陆请单击 “我同意”按键;
#su – oracle
$ startx

$netca启动配置网络配置助手
$sqlplus /nolog启动sqlplus
$dbca 启动数据库配置助手(DCA),建oracle数据库


其他参考网址:
在 Linux x86 上安装 Oracle 数据库 10g
http://www.oracle.com/technology/global/cn/pub/articles/smiley_10gdb_install.html

Oracle® Database Quick Installation Guide
10g Release 2 (10.2) for Linux x86-64
http://download-west.oracle.com/docs/cd/B19306_01/install.102/b15668/toc.htm

Installing Oracle Database 10g Release 1 and 2 (32-bit/64-bit) on Red Hat Enterprise Linux AS 4, 3, 2.1, Red Hat Fedora Core 4, 3, 1, RH 9 on x86 and x86-64 (AMD64/EM64T) Architecture

http://www.puschitz.com/InstallingOracle10g.shtml
Statement of this Website
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

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 Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1668
14
PHP Tutorial
1273
29
C# Tutorial
1256
24
Linux Architecture: Unveiling the 5 Basic Components Linux Architecture: Unveiling the 5 Basic Components Apr 20, 2025 am 12:04 AM

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.

How to check the warehouse address of git How to check the warehouse address of git Apr 17, 2025 pm 01:54 PM

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.

Oracle's Role in the Business World Oracle's Role in the Business World Apr 23, 2025 am 12:01 AM

Oracle is not only a database company, but also a leader in cloud computing and ERP systems. 1. Oracle provides comprehensive solutions from database to cloud services and ERP systems. 2. OracleCloud challenges AWS and Azure, providing IaaS, PaaS and SaaS services. 3. Oracle's ERP systems such as E-BusinessSuite and FusionApplications help enterprises optimize operations.

How to run java code in notepad How to run java code in notepad Apr 16, 2025 pm 07:39 PM

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.

How to run sublime after writing the code How to run sublime after writing the code Apr 16, 2025 am 08:51 AM

There are six ways to run code in Sublime: through hotkeys, menus, build systems, command lines, set default build systems, and custom build commands, and run individual files/projects by right-clicking on projects/files. The build system availability depends on the installation of Sublime Text.

laravel installation code laravel installation code Apr 18, 2025 pm 12:30 PM

To install Laravel, follow these steps in sequence: Install Composer (for macOS/Linux and Windows) Install Laravel Installer Create a new project Start Service Access Application (URL: http://127.0.0.1:8000) Set up the database connection (if required)

git software installation git software installation Apr 17, 2025 am 11:57 AM

Installing Git software includes the following steps: Download the installation package and run the installation package to verify the installation configuration Git installation Git Bash (Windows only)

How to use sublime shortcut keys How to use sublime shortcut keys Apr 16, 2025 am 08:57 AM

Sublime Text provides shortcuts to improve development efficiency, including commonly used (save, copy, cut, etc.), editing (indentation, formatting, etc.), navigation (project panel, file browsing, etc.), and finding and replacing shortcuts. Proficiency in using these shortcut keys can significantly improve Sublime's efficiency.

See all articles