Home Backend Development PHP Tutorial Linux下Oracle8i的安装(转)_PHP

Linux下Oracle8i的安装(转)_PHP

Jun 01, 2016 pm 12:35 PM
oracle sqlplus Can Install document user Table of contents

ORACLE8

oracle 8.05 的简明安装和操作说明
oralce 支持Linux 给了我们一个免费解除她的好机会,但有好多网友并非此中专业人士(就象我一样),我就把我的一些操作程序写出来,希望对大家会有所帮助。
一。安装前的准备工作
   1 ,建立一个oracle 的安装用户,因为oracle 不能用root来安装,若强行用root她会报错,然后罢工。
       #useradd oracle(当然可以是任何名字,但推荐用oracle 做用户名)
       #passwd oracle
     进入/etc/group  找到oracle组,把组名改为dba (并非必须,但推荐)
    #cd /etc
    #vi group
注意:一定要保证oracle用户只在一个组里,否则当oracle installer 建立数据库时无法建立正确的控制文件。
     2 ,建立oracle的安装目录和数据库的mount point 。For example ,我是在根目录下建立一个 /oracle 目录作为oracle 8.05 的安装点。
       #cd /
    #mkdir /oracle
    #chown oracle /oracle(改变目录的属主为oracle用户)
    #chgro dba /oracle(改变目录的属组为dba组)
    #cd /oracle
    #su oracle(切换为oracle用户)
    $mkdir home(oracle的home)
    $mkdir db1(oracle数据库的三个存放点《mount point》)
    $mkdir db2
    $mkdir db3
    3,在oracle 用户的登陆目录下,修改   .proflie 文件,加入必须的环境变量:
    $cd ~oracle
    $vi .profile  加入以下内容:
    ORACLE_OWNER=oracle
    export ORACLE_OWNER
    ORACLE_HOME=/oracle/home
    export ORACLE_HOME
    ORACLE_SID=mytable             
    export ORACLE_SID
    LD_LIBRARY_PATH=/oracle/home/lib/
    export LD_LIBRARY_PATH
    ORACLE_BASE=/oracle
    export ORACLE_BASE
    PATH="$PATH:/oracle/home/bin:usr/local/bin"
#the end
    使刚才的设定生效:
     $source .profile

  4,用root身份将oralce 8.05 的压缩文件解压:
    $su root      
    #tar xzvf filename(应该是一个 .tar.gz 文件)(为以下的说明方便,假设解压在/download/目录下)
    
       进入/download/orainst/运行oratab.sh
     #cd /download/orainst
    #./oratab.sh
设定成功后,就可开始安装。
二,安装
    安装很简单,只要运行oarinst 按提示操作即可,偶尔有报错说文件或目录不存在,可能是她的bug,只要切换一个控制台手动建立目录即可,或者重新运行安装程序,已安装的部分会提示略过。
        $cd /download/orainst
    $./orainst
    需要输入的参数:
    若.profile 文件已生效,安装期间要输入的OARCLE_HOME,ORACLE_BASE ,ORACLE_SID均会自动填写,唯一要手动填写的三个数据库的mount point.(/oracle/db1,/oracle/db2 ,/oracle/db3)
三,后期配置与基本操作
1。启动和关闭oracle server
若安装正常,应该就可以启动了,进入server manager 启动oracle server
      $svrmgrl
    sml>connect internal
    sml>startup
    sml>exit
这样oracle 就启动了。
若要关闭:
    $svrmgrl
    sml>connect internal
    sml>shutdown
    sml>exit
若无法启动,查看你的/oracle/home/dbs 目录下是否有 initmytable.ora文件,确认其中的table_name=mytable已设定,否则手动该过来。其他可以不动。
若没有这个文件,可以将这个目录下的init.ora拷贝,改名为initmytable.ora ,并把table_name改过来。(未改前是table_name=default)
这样应该就可以了。
2.用sqlplus来查询
启动server以后,就可以通过sqlplus联上server,爽一爽。(oracle默认已建立两个有dba 权限的用户:system/manager  和sys/change_on_install)
    $sqlplus system/manager
    sql>select * from user_tables
    哇,好大一串东西呀!!
    唉,sqlplus的操作我这里就不管罗。
3,sqlplus的远程连接
我测试的是用oarcle 8.0 for NT 的 sqlplus 8.0 来进行远程连接
若是默认完全安装,Net 8  应该已经配好了。
启动监听器:
    $lsnrctl
    lsn>start
    lsn>exit
这样监听器就起来了,可以用其他机器上的sqlplus 试一试,挺好玩的。
如果起不来,
A.看你的适配器是否装了
    $adapters
若没有安装则要运行 /download/orainst/下的 oarinst 把适配器装上来。
B.到oacle_home/network/admin下找一下lintener.ora与我文件对一下,没有的话就拷过去。

# This file is locate in :~oracle_home/network/admin
#
# Installation Generated Net8 Configuration
# Version Date: Jun-17-97
# Filename: Listener.ora
#
LISTENER =                    
  (ADDRESS_LIST =
    (ADDRESS= (PROTOCOL= IPC)(KEY= mytable))
        (ADDRESS= (PROTOCOL= IPC)(KEY= PNPKEY))
        (ADDRESS= (PROTOCOL= TCP)(Host= yourhonst.yourdoman)(Port= 1521))
  )
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (GLOBAL_DBNAME= yourhost.yourdoman.)
      (ORACLE_HOME= /oracle/home)
      (SID_NAME = rsb)
    )
    (SID_DESC =
      (SID_NAME = extproc)
      (ORACLE_HOME = /oracle/home)
      (PROGRAM = extproc)
    )
  )
STARTUP_WAIT_TIME_LISTENER = 0
CONNECT_TIMEOUT_LISTENER = 10
TRACE_LEVEL_LISTENER = OFF
#The end.

C.到/etc下查看services文件,看是否有类似的一行
    listener             1521  #oracle tcp listener
如果没有就加上去。
reboot ,应该就可以拉
好拉,就到这里,就到这里吧。
Auther:charcoal
E-mail:charcoal@mail.hn.cninfo.net
1998/12/26 于长沙
------------------------------------------------------------------------ZZZXXXZZZ
E-group home: http://www.eGroups.com/list/njlug
Free Web-based e-mail groups by eGroups.com
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 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months 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)

How long will Oracle database logs be kept? How long will Oracle database logs be kept? May 10, 2024 am 03:27 AM

The retention period of Oracle database logs depends on the log type and configuration, including: Redo logs: determined by the maximum size configured with the "LOG_ARCHIVE_DEST" parameter. Archived redo logs: Determined by the maximum size configured by the "DB_RECOVERY_FILE_DEST_SIZE" parameter. Online redo logs: not archived, lost when the database is restarted, and the retention period is consistent with the instance running time. Audit log: Configured by the "AUDIT_TRAIL" parameter, retained for 30 days by default.

Function to calculate the number of days between two dates in oracle Function to calculate the number of days between two dates in oracle May 08, 2024 pm 07:45 PM

The function in Oracle to calculate the number of days between two dates is DATEDIFF(). The specific usage is as follows: Specify the time interval unit: interval (such as day, month, year) Specify two date values: date1 and date2DATEDIFF(interval, date1, date2) Return the difference in days

The order of the oracle database startup steps is The order of the oracle database startup steps is May 10, 2024 am 01:48 AM

The Oracle database startup sequence is: 1. Check the preconditions; 2. Start the listener; 3. Start the database instance; 4. Wait for the database to open; 5. Connect to the database; 6. Verify the database status; 7. Enable the service (if necessary ); 8. Test the connection.

How much memory does oracle require? How much memory does oracle require? May 10, 2024 am 04:12 AM

The amount of memory required by Oracle depends on database size, activity level, and required performance level: for storing data buffers, index buffers, executing SQL statements, and managing the data dictionary cache. The exact amount is affected by database size, activity level, and required performance level. Best practices include setting the appropriate SGA size, sizing SGA components, using AMM, and monitoring memory usage.

How to use interval in oracle How to use interval in oracle May 08, 2024 pm 07:54 PM

The INTERVAL data type in Oracle is used to represent time intervals. The syntax is INTERVAL <precision> <unit>. You can use addition, subtraction, multiplication and division operations to operate INTERVAL, which is suitable for scenarios such as storing time data and calculating date differences.

How to see the number of occurrences of a certain character in Oracle How to see the number of occurrences of a certain character in Oracle May 09, 2024 pm 09:33 PM

To find the number of occurrences of a character in Oracle, perform the following steps: Get the total length of a string; Get the length of the substring in which a character occurs; Count the number of occurrences of a character by subtracting the substring length from the total length.

Oracle database server hardware configuration requirements Oracle database server hardware configuration requirements May 10, 2024 am 04:00 AM

Oracle database server hardware configuration requirements: Processor: multi-core, with a main frequency of at least 2.5 GHz. For large databases, 32 cores or more are recommended. Memory: At least 8GB for small databases, 16-64GB for medium sizes, up to 512GB or more for large databases or heavy workloads. Storage: SSD or NVMe disks, RAID arrays for redundancy and performance. Network: High-speed network (10GbE or higher), dedicated network card, low-latency network. Others: Stable power supply, redundant components, compatible operating system and software, heat dissipation and cooling system.

How to read dbf file in oracle How to read dbf file in oracle May 10, 2024 am 01:27 AM

Oracle can read dbf files through the following steps: create an external table and reference the dbf file; query the external table to retrieve data; import the data into the Oracle table.

See all articles