Home Database Mysql Tutorial linux下安装oracle 11g

linux下安装oracle 11g

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

我的linux版本是centos5.5,内核版本是2.6.18-194.el5 ,linux下安装oracle系统最好是1G内存,2G的swap空间,硬盘至少需要4.5G空间。 一.下载oracle 到oracle官方网站下载对应版本的oracle,我下的是oracle for linux X86 http://www.oracle.com/technetwork

我的linux版本是centos5.5,内核版本是2.6.18-194.el5 ,linux下安装oracle系统最好是1G内存,2G的swap空间,硬盘至少需要4.5G空间。
一.下载oracle
到oracle官方网站下载对应版本的oracle,我下的是oracle  for linux X86
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
二.在linux下创建oracle用户,以及管理组
以root用户登录linux,执行以下命令
#/usr/sbin/groupadd dba
#/usr/sbin/groupadd oper
#/usr/sbin/groupadd oinstall
#useradd oracle
#/usr/sbin/usermod -g oinstall -G dba oracle         (dba为管理组) 
#/usr/sbin/useradd -g oinstall -G dba oracle
#passwd oracle
预先创建安装目录
#mkdir -p /opt/oracle/product
#mkdir -p /opt/oracle/product/OraHome
#mkdir -p /opt/oraInventory
#mkdir -p /opt/oracle/oradata
#mkdir -p /var/opt/oracle
设置目录的所有者所属组和权限
#chown -R oracle.oinstall /opt/oracle
#chown -R oracle.oinstall /opt/oracle/oradata
#chown -R oracle.oinstall /opt/oracle/product/OraHome
#chown -R oracle.dba /opt/oraInventory
#chown oracle.dba /var/opt/oracle
#chmod -R 775 /opt/oracle
#chmod -R 755 /var/opt/oracle
设置用户oracle的环境变量
#su - oracle
$vim /home/oracle/.bash_profile
在文件中添加如下:
 
export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/OraHome
export ORACLE_SID=orcl
export ORACLE_OWNER=oracle
export ORACLE_TERM=vt100
export PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
PATH=$PATH:/usr/sbin; export PATH
PATH=$PATH:/usr/bin; export PATH
注意:
11g:ORA_NLS33=$ORACLE_HOME/nls/admin/data
10g:ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data
9i:   ORA_NLS33=/oracle/app/ora92/ocommon/nls/admin/data
保存退出
--执行以下命令让配置马上生效或以oracle用户登录使设置生效
$ source $HOME/.bash_profile

三.解压oracle包
我下载的是.zip的包,执行以下命令
#unzip linux_11gR2_database_1of2.zip
#unzip linux_11gR2_database_2of2.zip
注意解压好的目录用户oracle必须具有读写和执行的权限,可以将目录的用户和组改为oracle:
#chown -R oracle database
#chgrp -R oinstall database
四.安装oracle
reboot并以oracle登录,进入图形界面
#cd database
#./runInstaller
然后进入图形化安装过程,比较简单,一步一步来,注意我们先安装oracle软件,安装完软件之后再配置监听程序和数据库。下面是安装过程的步骤和选项:
 linux下安装oracle 11g

先安装数据库软件!
 linux下安装oracle 11g
 
选择单实例安装,如果你需要RAC则选择RAC安装!
 linux下安装oracle 11g

选择中文和英文!
 linux下安装oracle 11g

 
   这里是oracle的安装目录,应该是你刚刚建立好的目录/opt目录下,oracle是针对用户的!
 
 
这里是oracle的管理组,是上面已经定义好的dba,直接下一步!
 linux下安装oracle 11g

这里检查系统的安装条件,默认会列出失败项,会对系统的内存,swap,磁盘空间,依赖包,内核参数等等进行检查,有一些检查项目是可以修补的,有些是不可修补的,可以修补的点击上面的修补并再次检查,会弹出对话框:
 linux下安装oracle 11g

按上面提示:
打开一个终端,以root登录
#cd  /tmp/CVU_11.2.0.1.0_oracle
#./runfixup.sh
然后返回窗口确定
还有一些依赖包的解决,可以使用
#yum install 【包名称】
来进行安装,如果提示找不到此包的yum源,试着使用通配符,例如找不到sysstat.1.5.103的包可以使用
#yum install sysstat*
如果还有一些条件不满足而不能安装,可以选择【全部忽略】,然后下一步安装。
 安装完毕, 提示执行 2个脚本:
以root用户登录,和上面一样,进入所提示目录,并执行这2个脚本。
(安装目录)/orainstRoot.sh
(安装目录)/root.sh
直接按回车, 缺省值就可以
完成,数据库成功安装,呵呵!
上面只是安装了软件, 数据库没有创建, 还有配置 监听器 Listener
五.安装监听器
执行命令
#netca
进入图形化配置,直接默认下一步,到最后完成,其中你也可以修改监听去的名称,协议,端口。
安装完成后可以使用命令
#ps -ef
来查看Listener是否配置成功
六.安装数据库程序
执行命令:
#dbca
进入图形化配置界面,一直下一步
 linux下安装oracle 11g

linux下安装oracle 11g
提示输入全局数据库名称,我输入的是orcl.com

 linux下安装oracle 11g
 linux下安装oracle 11g
 
下一步选择第二个选项,并分别两次输入密码!此密码就是你的数据库管理员密码!
直接下一步,一直到第八步,勾选实例模板
下一步,横排第三个选项下,选择字符编码AL32UTF-8
然后一直下一步,直到进行安装数据库,并且完成。
到此你oracle就算初步安装完成了。
七.测试连接数据库
你可以使用下面sqlplus语句连接数据库
用 oracle 用户 远程登录, 然后
$ sqlplus /nolog
SQL> conn / as sysdba
Connected to an idle instance.
出现错误
SQL> startup
[oracle@localhost ~]$ sqlplus /nolog
SQL*Plus: Release 11.2.0.1.0 Production
Copyright (c) 1982, 2009, Oracle.  All rights reserved.
SQL> conn / as sysdba
Connected.
SQL> create table testUser( id integer,name char(10));
Table created.
SQL> insert into testUser values(0,'Jack');
1 row created.
SQL> commit;
Commit complete.
SQL> select * from testUser;
        ID NAME
---------- ----------
         0 Jack
关闭数据库
SQL>  shutdown immediate
SQL>  quit
到此你的oracle已成功安装!
 

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

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)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
4 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)

deepseek web version entrance deepseek official website entrance deepseek web version entrance deepseek official website entrance Feb 19, 2025 pm 04:54 PM

DeepSeek is a powerful intelligent search and analysis tool that provides two access methods: web version and official website. The web version is convenient and efficient, and can be used without installation; the official website provides comprehensive product information, download resources and support services. Whether individuals or corporate users, they can easily obtain and analyze massive data through DeepSeek to improve work efficiency, assist decision-making and promote innovation.

How to install deepseek How to install deepseek Feb 19, 2025 pm 05:48 PM

There are many ways to install DeepSeek, including: compile from source (for experienced developers) using precompiled packages (for Windows users) using Docker containers (for most convenient, no need to worry about compatibility) No matter which method you choose, Please read the official documents carefully and prepare them fully to avoid unnecessary trouble.

BITGet official website installation (2025 beginner's guide) BITGet official website installation (2025 beginner's guide) Feb 21, 2025 pm 08:42 PM

BITGet is a cryptocurrency exchange that provides a variety of trading services including spot trading, contract trading and derivatives. Founded in 2018, the exchange is headquartered in Singapore and is committed to providing users with a safe and reliable trading platform. BITGet offers a variety of trading pairs, including BTC/USDT, ETH/USDT and XRP/USDT. Additionally, the exchange has a reputation for security and liquidity and offers a variety of features such as premium order types, leveraged trading and 24/7 customer support.

Ouyi okx installation package is directly included Ouyi okx installation package is directly included Feb 21, 2025 pm 08:00 PM

Ouyi OKX, the world's leading digital asset exchange, has now launched an official installation package to provide a safe and convenient trading experience. The OKX installation package of Ouyi does not need to be accessed through a browser. It can directly install independent applications on the device, creating a stable and efficient trading platform for users. The installation process is simple and easy to understand. Users only need to download the latest version of the installation package and follow the prompts to complete the installation step by step.

Get the gate.io installation package for free Get the gate.io installation package for free Feb 21, 2025 pm 08:21 PM

Gate.io is a popular cryptocurrency exchange that users can use by downloading its installation package and installing it on their devices. The steps to obtain the installation package are as follows: Visit the official website of Gate.io, click "Download", select the corresponding operating system (Windows, Mac or Linux), and download the installation package to your computer. It is recommended to temporarily disable antivirus software or firewall during installation to ensure smooth installation. After completion, the user needs to create a Gate.io account to start using it.

Redstone/RED currency listing price forecast and detailed explanation of token economics Redstone/RED currency listing price forecast and detailed explanation of token economics Mar 03, 2025 pm 10:42 PM

This time, the Redstone token $RED will be launched on Binance Launchpool on Binance TGE! This is also the first time Binance has launched a pre-market trading limit mechanism! The first day limit is 200%, and the ban will be lifted after 3 days to avoid "the peak will be achieved when the market opens"! Launchpool mechanism introduces the BinanceLaunchpool participating in Redstone that needs to pledge designated tokens (BNB, USDC, FDUSD) activity period is 48 hours: 08:00 UTC on February 26, 2025 to 08:00 UTC on February 28, 2025 ending this pre-market daily limit rule: 18:00 on February 28, 2025

Ouyi Exchange Download Official Portal Ouyi Exchange Download Official Portal Feb 21, 2025 pm 07:51 PM

Ouyi, also known as OKX, is a world-leading cryptocurrency trading platform. The article provides a download portal for Ouyi's official installation package, which facilitates users to install Ouyi client on different devices. This installation package supports Windows, Mac, Android and iOS systems. Users can choose the corresponding version to download according to their device type. After the installation is completed, users can register or log in to the Ouyi account, start trading cryptocurrencies and enjoy other services provided by the platform.

gate.io official website registration installation package link gate.io official website registration installation package link Feb 21, 2025 pm 08:15 PM

Gate.io is a highly acclaimed cryptocurrency trading platform known for its extensive token selection, low transaction fees and a user-friendly interface. With its advanced security features and excellent customer service, Gate.io provides traders with a reliable and convenient cryptocurrency trading environment. If you want to join Gate.io, please click the link provided to download the official registration installation package to start your cryptocurrency trading journey.

See all articles