search
HomeBackend DevelopmentPHP TutorialLinux下Oracle8i的安装(转)_PHP

Linux下Oracle8i的安装(转)_PHP

Jun 01, 2016 pm 12:35 PM
oraclesqlplusCanInstalldocumentuserTable 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
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
Beyond the Hype: Assessing PHP's Role TodayBeyond the Hype: Assessing PHP's Role TodayApr 12, 2025 am 12:17 AM

PHP remains a powerful and widely used tool in modern programming, especially in the field of web development. 1) PHP is easy to use and seamlessly integrated with databases, and is the first choice for many developers. 2) It supports dynamic content generation and object-oriented programming, suitable for quickly creating and maintaining websites. 3) PHP's performance can be improved by caching and optimizing database queries, and its extensive community and rich ecosystem make it still important in today's technology stack.

What are Weak References in PHP and when are they useful?What are Weak References in PHP and when are they useful?Apr 12, 2025 am 12:13 AM

In PHP, weak references are implemented through the WeakReference class and will not prevent the garbage collector from reclaiming objects. Weak references are suitable for scenarios such as caching systems and event listeners. It should be noted that it cannot guarantee the survival of objects and that garbage collection may be delayed.

Explain the __invoke magic method in PHP.Explain the __invoke magic method in PHP.Apr 12, 2025 am 12:07 AM

The \_\_invoke method allows objects to be called like functions. 1. Define the \_\_invoke method so that the object can be called. 2. When using the $obj(...) syntax, PHP will execute the \_\_invoke method. 3. Suitable for scenarios such as logging and calculator, improving code flexibility and readability.

Explain Fibers in PHP 8.1 for concurrency.Explain Fibers in PHP 8.1 for concurrency.Apr 12, 2025 am 12:05 AM

Fibers was introduced in PHP8.1, improving concurrent processing capabilities. 1) Fibers is a lightweight concurrency model similar to coroutines. 2) They allow developers to manually control the execution flow of tasks and are suitable for handling I/O-intensive tasks. 3) Using Fibers can write more efficient and responsive code.

The PHP Community: Resources, Support, and DevelopmentThe PHP Community: Resources, Support, and DevelopmentApr 12, 2025 am 12:04 AM

The PHP community provides rich resources and support to help developers grow. 1) Resources include official documentation, tutorials, blogs and open source projects such as Laravel and Symfony. 2) Support can be obtained through StackOverflow, Reddit and Slack channels. 3) Development trends can be learned by following RFC. 4) Integration into the community can be achieved through active participation, contribution to code and learning sharing.

PHP vs. Python: Understanding the DifferencesPHP vs. Python: Understanding the DifferencesApr 11, 2025 am 12:15 AM

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

PHP: Is It Dying or Simply Adapting?PHP: Is It Dying or Simply Adapting?Apr 11, 2025 am 12:13 AM

PHP is not dying, but constantly adapting and evolving. 1) PHP has undergone multiple version iterations since 1994 to adapt to new technology trends. 2) It is currently widely used in e-commerce, content management systems and other fields. 3) PHP8 introduces JIT compiler and other functions to improve performance and modernization. 4) Use OPcache and follow PSR-12 standards to optimize performance and code quality.

The Future of PHP: Adaptations and InnovationsThe Future of PHP: Adaptations and InnovationsApr 11, 2025 am 12:01 AM

The future of PHP will be achieved by adapting to new technology trends and introducing innovative features: 1) Adapting to cloud computing, containerization and microservice architectures, supporting Docker and Kubernetes; 2) introducing JIT compilers and enumeration types to improve performance and data processing efficiency; 3) Continuously optimize performance and promote best practices.

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)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

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

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

EditPlus Chinese cracked version

EditPlus Chinese cracked version

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