Home > Database > Oracle > body text

Detailed explanation of linux oracle11g installation tutorial

PHPz
Release: 2023-04-04 10:31:27
Original
5959 people have browsed it

If you want to install Oracle 11g on a Linux operating system, this article will provide you with a detailed tutorial. This tutorial is divided into three parts: preparing the environment, downloading the Oracle installation files, and installing Oracle 11g.

Preparing the environment

Before installing Oracle 11g, you need to ensure that your Linux operating system meets the requirements of Oracle 11g. Oracle 11g supports the following Linux distributions:

  • Oracle Linux 4 Update 7 or later (32-bit or 64-bit)
  • Red Hat Enterprise Linux 4 Update 7 or later Higher version (32-bit or 64-bit)
  • SUSE Linux Enterprise Server 10 SP2 or higher version (32-bit or 64-bit)

Also, you need to make sure The following software packages have been installed on your operating system:

  • binutils
  • compat-libstdc -33
  • compat-libstdc -33.i686
  • elfutils-libelf
  • elfutils-libelf-devel
  • gcc
  • gcc-c
  • glibc
  • glibc-common
  • glibc-devel
  • glibc-headers
  • ksh
  • libaio
  • libaio.i686
  • libaio-devel
  • libgcc
  • libstdc
  • libstdc .i686
  • libstdc -devel
  • make
  • numactl-devel
  • sysstat

First, open a terminal window and enter the following command to check whether your system has all the required packages installed:

yum list binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio.i686 libaio-devel libgcc libstdc++ libstdc++.i686 libstdc++-devel make numactl-devel sysstat
Copy after login

If it is already installed on your system For all packages, you will see the following output:

Installed Packages
binutils.x86_64                     2.17.50.0.6-14.el5        installed
compat-libstdc++-33.x86_64          3.2.3-69.el5              installed
compat-libstdc++-33.i686            3.2.3-69.el5              installed
elfutils-libelf.x86_64              0.137-3.el5               installed
elfutils-libelf-devel.x86_64        0.137-3.el5               installed
gcc.x86_64                          4.1.2-55.el5              installed
gcc-c++.x86_64                      4.1.2-55.el5              installed
glibc.x86_64                        2.5-118.el5_10.3          installed
glibc-common.x86_64                 2.5-118.el5_10.3          installed
glibc-devel.x86_64                  2.5-118.el5_10.3          installed
glibc-headers.x86_64                2.5-118.el5_10.3          installed
ksh.x86_64                          20120801-56.el5           installed
libaio.x86_64                       0.3.106-5.el5             installed
libaio.i686                         0.3.106-5.el5             installed
libaio-devel.x86_64                 0.3.106-5.el5             installed
libgcc.x86_64                       4.1.2-55.el5              installed
libstdc++.x86_64                    4.1.2-55.el5              installed
libstdc++.i686                      4.1.2-55.el5              installed
libstdc++-devel.x86_64              4.1.2-55.el5              installed
make.x86_64                         1:3.81-23.el5_10.1        installed
numactl-devel.x86_64                2.0.9-2.el5               installed
sysstat.x86_64                      7.0.2-5.el5               installed
Copy after login

If you find that there are uninstalled packages on your system, you can install them using the following command:

yum install binutils compat-libstdc++-33 compat-libstdc++-33.i686 elfutils-libelf elfutils-libelf-devel gcc gcc-c++ glibc glibc-common glibc-devel glibc-headers ksh libaio libaio.i686 libaio-devel libgcc libstdc++ libstdc++.i686 libstdc++-devel make numactl-devel sysstat
Copy after login

Download Oracle Installation file

Next, you need to download the installation file of Oracle 11g from the Oracle official website. First, go to the Oracle website to download the installation file of the Linux x86_64 version. The downloaded files are named linux.x64_11gR2_database_1of2.zip and linux.x64_11gR2_database_2of2.zip. Once downloaded, unzip both zip files into the same directory.

Installing Oracle 11g

Before installing Oracle 11g, please make sure you have logged in to the system as the root user.

  1. Create the installation directory

First, create a directory to store Oracle 11g. Enter the following command in the terminal:

mkdir /u01/app/oracle/product/11.2.0/dbhome_1
mkdir /u01/app/oracle/admin/orcl
mkdir /u01/app/oracle/oradata/orcl
Copy after login

The above command creates three directories, namely the installation directory of Oracle 11g, the admin directory of the Oracle database instance, and the data directory of the database instance. Of course, you can set these directories according to your needs.

  1. Copy the installation files to the temporary directory

Before starting the installation, we need to copy the Oracle installation files from the unzipped directory to the /tmp directory. Enter the following command in the terminal:

cp /home/user/Downloads/linux.x64_11gR2_database_1of2.zip /tmp/
cp /home/user/Downloads/linux.x64_11gR2_database_2of2.zip /tmp/
Copy after login

Note: Change the /home/user/Downloads/ path to the path where you decompressed it.

  1. Set environment variables for Oracle users

We need to set the LD_LIBRARY_PATH and PATH environment variables for Oracle users. Enter the following command in the terminal:

su - oracle
Copy after login

This command allows us to temporarily log in to the system as the oracle user. Next, enter the following command:

vi ~/.bash_profile
Copy after login

Add the following two lines at the bottom of the file and save the file.

export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
export PATH=$ORACLE_HOME/bin:$PATH
Copy after login
  1. Execute the installation program

Return to the root user and enter the following command to start the installation.

cd /tmp
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip
cd database
./runInstaller
Copy after login

This command will start the Oracle 11g installation interface. In the interface, select the "Install database software only" option, and then follow the prompts to complete the installation.

After completing the installation, you need to perform some configuration work. Execute the following command as the root user in the terminal:

/u01/app/oracle/product/11.2.0/dbhome_1/root.sh
Copy after login

This command will execute the Oracle 11g configuration wizard. Just execute it according to the prompts.

At this point, you have successfully installed the Oracle 11g database. If you want to create a new database instance, you can do it using Oracle's DBCA tool.

The above is the detailed content of Detailed explanation of linux oracle11g installation tutorial. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!