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:
Also, you need to make sure The following software packages have been installed on your operating system:
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
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
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
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.
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
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.
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/
Note: Change the /home/user/Downloads/
path to the path where you decompressed it.
We need to set the LD_LIBRARY_PATH and PATH environment variables for Oracle users. Enter the following command in the terminal:
su - oracle
This command allows us to temporarily log in to the system as the oracle user. Next, enter the following command:
vi ~/.bash_profile
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
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
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
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!