Oracle Database 9i installation in Linux

Source: Internet
Author: User
Tags tmp file tmp folder
Oracle9i was released on Oracle Open World in October 2000, introducing many new features for Oracle databases, application servers, and development tools. Oracle9i is the industry's first complete and simple software infrastructure for a new generation of intelligent and collaborative applications on the Internet. Oracle9i actually refers to the complete integration of Oracle9i Database, Oracle9i Application Server and Oracle9i Developer Suite. As software gradually becomes a managed service (hosted services ), the high-scalability, intelligent, and reliable Oracle9i on the internet will become the key software for high-quality e-commerce service implementation.


This article describes how to install Oracle Database 9i in Linux. If you have experience installing Oracle, you can use the quick installation manual; if you have never installed Oracle databases in Linux before, we will be familiar with the installation process of oracle from this article.

System Requirements:

The following system requirements apply to typical Oracle Installation and creation of simple databases.

Memory:

The installation of Oralce 9i requires at least MB of memory. Run the following command to check the memory size of the Host:

grep MemTotal /proc/meminfoMemTotal: 900252 kB

900252kB is the memory size of your system.

Exchange zone:

The size of the swap area is generally twice the size of the memory, at least MB or more. Of course, the larger the size is, the better. Run the following command to view the size of the swap area:

/sbin/swapon -sFilename Type Size Used Priority/dev/sda6 partition 105221 686976 -1

105221 indicates the size of the system swap zone.

Optical Drive:

If you use a CD to install Oracle9i, you need a CDROM of more than 8 speeds on your computer. If you download the oracle9i package file, you do not need to use the CDROM.

Hard Disk Space:

The installation of the Oracle9i database requires at least GB of space.

Temporary hard disk space:

The Oracle installer requires more than MB of temporary hard disk space during the installation process. We recommend that you use the/tmp folder as the zero-time folder. If the/tmp file does not have enough hard disk space, you can create a new folder as the temporary directory for installation, and then set the environment variables TEMP and TMPDIR to the corresponding location, for example:

Use bash

mkdir /home/tempTEMP=/home/temp ; export TEMPTMPDIR=/home/temp ; export TMPDIR

Use csh

mkdir /home/tempsetenv TEMP /home/tempsetenv TMPDIR /home/temp

Operating System:

According to materials officially published by Oracle, Oracle 9i only passed the test on the system where SuSuSe 7.1 is installed, kernel 2.4.4 and glibc2.2. After my own test, Oracle in Linux manrake release 8.0, kernel 2.4.3-20 and glibc-2.2.2 versions can also be smoothly installed, this article will take the Linux Mandrake8.0 as an example to introduce the installation process of Oracle9i.

Virtual x-windows software:

This software is not necessary! The so-called Virtual x-windows software refers to the remote terminal allows the server x-windows virtual software, now popular x-windows software exceed, x-win32 and other software, if you have trouble installing the oracle System on the console, you can use the Virtual x-windows software to install oralce9i on a remote terminal on the GUI, this article will take x-win32 5.0 as an example to introduce the process of using virtual x-windows to install oracle9i.

JDK

If you want to install Oracle HTTP Server and also need to use blackdown JDK 1.3.1, please go to the following address to download the ftp://ftp.progsoc.uts.edu.au/pub/Linux/java/JDK-1.3.0/i386/rc1/j2sdk-1.3.0-RC1-linux-i386.tar.bz2

Configure Kernel Parameters

Oracle9i uses Linux shared memory, swap zone and other resources for work. If your kernel parameter settings cannot meet the requirements of oracle, problems may occur frequently during the installation or use of explorel9i, therefore, it is particularly important and critical to configure system kernel parameters.

The kernel parameters are generally configured in the/proc Folder:

1. the following commands are allowed as root users;

2. Go to the/proc/sys/kernel directory;

3. Run the cat or more command to view the current semaphore parameter value:

cat sem

After the command is run, the following results are displayed:

250 32000 32 128

250 is the SEMMSL value, 32000 is the SEMMNS value, 32 is the SEMOPM value, and 128 is the SEMMNI value.

4. Use the following command to modify the preceding parameters.

echo SEMMSL_value SEMMNS_value SEMOPM_value SEMMNI_value > sem

Here, SEMMSL_value, SEMMNS_value, SEMOPM_value, and SEMMNI_value are replaced with the corresponding values, and the order of these values cannot be changed.

5. set the shared memory size. Generally, the shared memory size is set to half the physical memory size. Here we assume that the physical memory is 4294967295 MB, and the shared memory value is, if your physical memory is 1 GB, the value here is 8589934590:

echo 4294967295 > shmmax

Add User

Specific users (non-root users) are required for Oracle Installation and Use. According to oracle standards, three special users and user groups need to be added, to facilitate the installation and use of oracle, you can install and use oracle to a specific user.

First, create an oracle user group. Set this user group to dba:

Log on to the system as a root user;

Run the groupadd dba command to add a dba user group;

Add oracle users:

Log on to the system as a root user;

Run useradd-g dba-P password-D/Oracle-S/bin/bash Oracle

After running, the system creates a user oracle belonging to the dba user group, the password is password, and the main directory is/oracle using bash

This user will be installed and used as the specified user, so it should be properly saved!

Create a mount point)

The typical installation of oracle9i requires at least two installation points: one installation of the basic operating program requires at least MB of hard disk space; the other is to store the database, requiring at least MB of hard disk space. To simplify installation, we can install the running program and database under the same installation point.

Find a partition with sufficient space on your file system and create a folder under the partition. Assume that the folder is/oracle.

Configure system environment variables

Many netizens failed to install oracle because the environment variables were not correctly configured. The configuration of the environment variables directly affects the later installation and configuration of oracle9i. Be careful when configuring the environment variables!

Configure X-Windows Variables

Check whether oracle9i is installed using the local x-windows installation or remote virtual x-windows installation. If remote x-windows Installation is required, configure the DISPLAY variable, this variable is used to tell the system where the image will be output. It is a local computer by default. If you use virtual x-windows for installation, it indicates the display of the remote terminal, for example, the IP address of your remote terminal is xxx. xxx. xxx. if xxx is used, the DISPLAY variable should be set to "xxx. xxx. xxx. xxx: 0 "followed by": 0 "indicates the first display of the terminal.

Are you sure you want to install the temporary directory?

We mentioned earlier that the installation of oracle9i requires a temporary writable space. Here we use/tmp as a temporary writable directory. If you do not use/tmp as a temporary writable directory, You need to configure the value TMPDIR =/path.

Configure Oracle environment variables

The following is an example for your reference.

export DISPLAY="192.9.200.24:0.0" export BASH_ENV=$HOME/.bashrcORACLE_HOME=/oracle/product/9.0.1; export ORACLE_HOME ORACLE_SID=oracle; export ORACLE_SIDORACLE_TERM=xterm; export ORACLE_TERMTNS_ADMIN=/home/oracle/config/9.0.1; export TNS_ADMINNLS_LANG=american_america.ZHS16GBK; export NLS_LANGORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data; export ORA_NLS33LD_LIBRARY_PATH=$ORACLE_HOME/lib;export LD_LIBRARY_PATHPATH=$PATH:/bin:/usr/bin:/usr/sbin:/etc:/opt/bin:/usr/ccs/bin:/usr/openwinPATH=$PATH:/opt/local/bin:/opt/NSCPnav/bin:$ORACLE_HOME/binPATH=$PATH:/usr/local/samba/bin:/usr/ucb:export PATHCLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlibCLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlibTMPDIR=/tmp;export TMPDIRumask 022

Where:

ORACLE_HOME is the installation directory of system software;

ORACLE_SID is the SID of the database. You can set it here;

NLS_LANG is the character set of the database. To ensure that the database can output the input database, we need to set the character set to american_america.ZHS16GBK here, where american_america English character set and ZHS16GBK is the Chinese character set.

Log on to the system as an oracle user,

vi $HOME/.bash_profile

Paste the above environment variable settings into the file, confirm the corresponding content and modify it, and save the disk and exit.

Log on to oracle again

Run the set | more command to check whether the oracle environment variables take effect.

CLASSPATH=/oracle/product/9.0.1/JRE:/oracle/product/9.0.1/jlib:/oracle/product/9.0.1/rdbms/jlib:/oracle/product/9.0.1/network/jlibDISPLAY=192.9.200.24:0.0LD_LIBRARY_PATH=/oracle/product/9.0.1/lib:/lib:/usr/lib:NLS_LANG=american_america.ZHS16GBK ORACLE_HOME=/oracle/product/9.0.1ORACLE_SID=oracleORACLE_TERM=xtermORA_NLS33=/oracle/product/9.0.1/ocommon/nls/admin/dataOSTYPE=linux-gnuPATH=/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/usr/games:/bin:/usr/bin:/usr/sbin:/etc:/opt/bin:/usr/ccs/bin:/usr/openwin:/opt/local/bin:/opt/NSCPnav/bin:/oracle/product/9.0.1/bin:/usr/local/samba/bin:/usr/ucb:TNS_ADMIN=/home/oracle/config/9.0.1

Check the preceding items carefully to make sure they are set correctly.

Install oralce9i

Install jdk1.3.1

Upload the downloaded j2sdk-1.3.0-rc1-linux-i386.tar.bz2 file to the/usr/local/directory of the server, log on to the root user, use the bzip-d j2sdk-1.3.0-RC1-linux-i386.tar.bz2 command to decompress the file into tar format, and then decompress it with tar xvf j2sdk-1.3.0-RC1-linux-i386.tar.bz2, for ease of operation, you can change the folder name to jdk ..

Configure X-Windows

The installation of oracle9i supports almost all x-windows and remote virtual x-windows, if you want to log on to the local machine and install it on the console as an oracle user we created previously (note that you must set the environment variable first and set the DISPLAY value to null export DISPLAY = "") run the startx command to go to x-windows.

If you need to install x-win32 software on a remote terminal using virtual x-windows, you need to install x-win32 software on the client first, we will not introduce the installation process of, after the installation is complete, run the x-win32 command in your taskbar and an x Peugeot will appear. Run the startkde command to start x-windows, after running, the system displays a lot of error information. Ignore it. After a few seconds, the Linux kde interface will appear on your remote terminal.

Download Oracle Installation Software

Oracle Web site (http://otn.oracle.com) now provides Oracle9i for Linux software download, Please carefully read his Licence before the download, so that there will be no copyright issues in future use. You need an otn account before the download. The application is free of charge. You only need to answer a few simple questions. The oracle9i installer has three packages:

Linux9i_Disk1.cpio.gz (412,092kb)Linux9i_Disk2.cpio.gz (638,547kb)Linux9i_Disk3.cpio.gz (82,956kb)

After downloading these three files, upload them to the server/oracle directory and ensure that the owner of these three files is an oracle user. If you have an Oracle9i installation CD, you can save a lot of download time.

Install the Oracle 9i Database

Log on to the system as an oracle user, start local x-windows or virtual x-windows, open a console window, enter the directory where the oracle files are stored, and use

gunzip Linux9i_Disk1.cpio.gzcpio -idmv 
      

Command to decompress the three packages into three installation folders: Disk1, Disk2, and Disk3.

Go to the Disk1 directory

cd Disk1

In the console window

./runInstaller &

After running, an oui gui is displayed, as shown in:


The green window in the middle is the graphical interface for oracle installation.

Next we will perform the most basic installation of oracle9i. after entering the installation interface, click Next to go to the Next step:


Source refers to a file that contains Oracle product information. Generally, it automatically identifies the file. If it cannot be found, you can use the Browse button to manually specify the path.

Destination refers to the 9i installation path. Here we set $ ORACLE_HOME in the environment variable, if this column is blank, you need to re-check whether the values in the environment variables are set incorrectly. Confirm the correctness and click Next to proceed to the Next step:


Three installation options are available in this step:

Oracle9i Database 9.0.1.0.0: Install the Database server version, Administrative Tools, network services, and basic client software of oracle9i;

Oracle9i Client 9.0.1.0.0, enterprise Client software, network services, and development tools.

Oracle9i Mangement and Integration 9.0.1.0.0, install the Management Server, manage the network directory, integrated services, network services, and basic client software of Oracle.

Select the first option to install Oracle9i Database Service, and click "Install Next;


This step is to select the Oracle Installation type. There are three types to choose from: Enterprise Edition, Enterprise Edition, Standstard Edition, Peugeot Edition, and Custom installation. We select the Enterprise Edition installation, if you are familiar with Oracle products, you can choose Custom installation, select components for installation as needed, and then click Next to go to the Next step;


Here you can select a database template that is suitable for you. Generally, we select the first common database template. If you need to use a data warehouse, you can use a data warehouse template for installation. After confirmation, press Next to proceed to the Next step;


This step is to confirm the SID of Oracle9i and the Name of the Global Database. The SID value has been set in the environment variable, so it is automatically displayed here) we can also specify the same value as SID. After confirmation, press Next to go to the Next step;


As we mentioned above, the character type of the database is critical in database supersteps. This step is to set the character set of the database. Previously we set NLS_LANG = american_america.ZHS16GBK, so we choose Simplifiled Chinese ZHS16GBK and press Next to go to the Next step;


Because we have selected the Enterprise version for installation, the system will install Oracle Web Server. JDK is required to install Oracle Web Server, we use the Browse button to specify the JDK installation directory so that the system can find the desired application during the installation process, and then press Next to go to the Next step;


After all the options are selected, the system will provide an installation overview, which lists the components you have selected for installation. After confirming that everything you want to Install is in the list, Install the Install button, if you do not need to install other programs, press Exit to Exit the installation interface.


The installation speed of Oracle depends on the server performance. Generally, it takes 30 minutes to install it. A dialog box may pop up during the installation process. In the dialog box, some commands that need to be run by root must be executed, in this case, another console window is opened, su becomes root, and the commands in the prompt box are run. After the operation is complete, follow the instructions to continue the installation;


After the database is installed, the system runs the configuration tool to configure the network and database of the system. After the configuration is complete, the system automatically starts the database and enables the Oracle Web Server. After all the configurations are complete, click Next to complete the installation.


If everything is normal, OUI will see The Installation Of Oracle9i Database Was successful. this indicates that your Oracle9i Database is properly installed. If you want to Install other content, press the Next Install button to Install other content. Otherwise, press Exit to Exit the installation.

Use Oracle 9i Database

After the installation is complete, the Oracle database will be automatically started. Next we will use the actual supersteps to describe how to start and close the Oracle 9i Database.

Log on to the database as an oracle user and open a console window;

Shut down the Oracle 9i Database

[oracle @ wing / oracle] $ sqlplus "/ as sysdba"
// Log in to the database as sysdba user
SQL * Plus: Release 9.0.1.0.0-Production on Wed Jul 11 15:35:31 2001
(c) Copyright 2001 Oracle Corporation. All rights reserved.
Connected to:
Oracle9i Enterprise Edition Release 9.0.1.0.0-Production
With the Partitioning option
JServer Release 9.0.1.0.0-Production
Run the shutdown command to shut down the database
SQL> shutdown
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>

Start Oracle 9i Database

[oracle@wing bin]$ sqlplus " / as sysdba"
SQL*Plus: Release 9.0.1.0.0 - Production on Wed Jul 11 16:00:59 2001
(c) Copyright 2001 Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area 336356520 bytes
Fixed Size 279720 bytes
Variable Size     268435456 bytes
Database Buffers 67108864 bytes
Redo Buffers 532480 bytes
Database mounted.
Database opened.
SQL>

Start the Oracle 9i listener

Oracle listeners provide interfaces for client connection.

[oracle@wing bin]$ lsnrctl
LSNRCTL for Linux: Version 9.0.1.0.0 - Production on 11-JUL-2001 16:12:17
Copyright (c) 1991, 2001, Oracle Corporation. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> start
Starting /oracle/product/9.0.1/bin/tnslsnr: please wait...
TNSLSNR for Linux: Version 9.0.1.0.0 - Production
System parameter file is /oracle/product/9.0.1/network/admin/listener.ora
Log messages written to /oracle/product/9.0.1/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=wing)(PORT=1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 9.0.1.0.0 - Production
Start Date 11-JUL-2001 16:12:58
Uptime 0 days 0 hr. 0 min. 0 sec
Trace Level off
Security OFF
SNMP OFF
Listener Parameter File /oracle/product/9.0.1/network/admin/listener.ora
Listener Log File /oracle/product/9.0.1/network/log/listener.log
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=wing)(PORT=1521)))
Services Summary...
Service "PLSExtProc" has 1 instance(s).
  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "oracle" has 1 instance(s).
  Instance "oracle", status UNKNOWN, has 1 handler(s) for this service...
The command completed successfully
LSNRCTL>

Disable the Oracle 9i listener

[oracle@wing bin]$ lsnrctl
LSNRCTL for Linux: Version 9.0.1.0.0 - Production on 11-JUL-2001 16:12:17
Copyright (c) 1991, 2001, Oracle Corporation. All rights reserved.
Welcome to LSNRCTL, type "help" for information.
LSNRCTL> stop
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC)))
The command completed successfully
LSNRCTL>

Disable Oracle Web Server

cd $ORACLE_HOME/Apache/Apache/bin
./stopJServ.sh
/oracle/product/9.0.1/Apache/Apache/bin/apachectl stop: httpd stopped

Start Oracle Web Server

cd $ORACLE_HOME/Apache/Apache/bin
[oracle@wing bin]$ ./startJServ.sh
/oracle/product/9.0.1/Apache/Apache/bin/apachectl start: httpd started

After Oracle Web Server is started, the default port number is 7777.

Enter http://xxx.xx.xxx.xxx: 7777/in the client browser address bar/

If the following page appears in the browser, the Oracle Web Server runs normally.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.