Oracle 11g installation tutorial under RedHat Linux 5.5

Time:2021-9-2

The best way to install Oracle system under Linux is 1G memory, 2G swap space, and at least 4.5g hard disk space.

At least the environment is above Linux server release 5.3

For Linux server release 5.1, modify Oracle 10.2g

1、 View Linux version

[[email protected] ~]# cat /etc/issue
Red Hat Enterprise Linux Server release 5.5 (Tikanga)

[[email protected] ~]# cat /etc/RedHat-release 
Red Hat Enterprise Linux Server release 5.5 (Tikanga)

2、 Go to the official website of Oracle to download the corresponding version of Oracle. I download oracle   for linux X86
 http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
 

3、 Create Oracle users and management groups under Linux
  3.1 log in to Linux as root and execute the following commands

[[email protected] ~]#/usr/sbin/groupadd dba
[[email protected] ~]#/usr/sbin/groupadd oper
[[email protected] ~]#/usr/sbin/groupadd oinstall

Tips:
  To view Linux user group commands:

[[email protected] ~]# cat /etc/group

3.2 adding Oracle users

[[email protected] ~]#useradd oracle
[[email protected] ~]#/usr/sbin/usermod -g oinstall -G dba oracle
[[email protected] ~]#passwd oracle
Changing password for user oracle.
New UNIX password: oracle
BAD PASSWORD: it is based on a dictionary word
Retype new UNIX password: oracle
passwd: all authentication tokens updated successfully.

3.3 pre create installation directory
[[email protected] ~]#mkdir -p /opt/oracle/product
[[email protected] ~]#mkdir -p /opt/oracle/product/OraHome
[[email protected] ~]#mkdir -p /opt/oraInventory
[[email protected] ~]#mkdir -p /opt/oracle/oradata
[[email protected] ~]#mkdir -p /var/opt/oracle

3.4 set the group and permission of the owner of the directory

[[email protected] ~]#chown -R oracle.oinstall /opt/oracle
[[email protected] ~]#chown -R oracle.oinstall /opt/oracle/oradata
[[email protected] ~]#chown -R oracle.oinstall /opt/oracle/product/OraHome
[[email protected] ~]#chown -R oracle.dba /opt/oraInventory
[[email protected] ~]#chown oracle.dba /var/opt/oracle
[[email protected] ~]#chmod -R 775 /opt/oracle
[[email protected] ~]#chmod -R 755 /var/opt/oracle

3.5 setting environment variables for Oracle users

#su – oracle
[[email protected] ~]$ vi /home/oracle/.bash_profile

Add at the bottom of the file

export ORACLE_BASE=/opt/oracle
export ORACLE_HOME=$ORACLE_BASE/product/OraHome
export ORACLE_SID=orcl
export ORACLE_OWNER=oracle
export ORACLE_TERM=vt100
export PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin
export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/Apache/Apache/bin:$PATH
LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib
export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
CLASSPATH=$CLASSPATH:$ORACLE_HOME/network/jlib
export CLASSPATH
PATH=$PATH:/usr/sbin; export PATH
PATH=$PATH:/usr/bin; export PATH

–Execute the following command to make the configuration take effect immediately or log in as an Oracle user to make the settings take effect

[[email protected] ~]$ source $HOME/.bash_profile

4、 Preparing the installation environment

4.1 installation environment inspection
Oracle relies on complete software package (version equal to or greater than the following version number)
binutils-2.17.50.0.6
compat-libstdc++-33-3.2.3
compat-libstdc++-33-3.2.3 (32 bit)
elfutils-libelf-0.125
elfutils-libelf-devel-0.125
gcc-4.1.2
gcc-c++-4.1.2
glibc-2.5-24
glibc-2.5-24 (32 bit)
glibc-common-2.5
glibc-devel-2.5
glibc-devel-2.5 (32 bit)
glibc-headers-2.5
pdksh-5.2.14-36.el5
libaio-0.3.106
libaio-0.3.106 (32 bit)
libaio-devel-0.3.106
libaio-devel-0.3.106 (32 bit)
libgcc-4.1.2
libgcc-4.1.2 (32 bit)
libstdc++-4.1.2
libstdc++-4.1.2 (32 bit)
libstdc++-devel 4.1.2
make-3.81
sysstat-7.0.2
unixODBC-2.2.11
unixODBC-2.2.11 (32 bit)
unixODBC-devel-2.2.11
unixODBC-devel-2.2.11 (32 bit)

[[email protected] ~]# rpm  -qa | grep -E “binutils|compat-libstdc++|elfutils-libelf|gcc|glibc|libaio|libgcc|libstdc++|make|sysstat|unixODBC|pdksh”

4.2 upload installation package
Upload Linux_ 11gR2_ database_ 1of2.zip、linux_ 11gR2_ database_ 2of2.zip to / home / Oracle / directory

4.3 unzip the installation package

[[email protected] oracle]$ cd /home/oracle/
[[email protected] ~]$ ls
linux_11gR2_database_1of2.zip  linux_11gR2_database_2of2.zip
[[email protected] oracle]$ unzip linux_11gR2_database_1of2.zip
[[email protected] oracle]$ unzip linux_11gR2_database_2of2.zip

If the uploaded directory is not / home / Oracle /, ensure that the Oracle user has sufficient permissions. If the uploaded directory is uploaded to / opt / soft directory
To switch back to root for decompression:

[[email protected] oracle]$ su – root
[[email protected] ~]# cd /opt/soft/

Unzip the package:

[[email protected] soft]# unzip linux_11gR2_database_1of2.zip
[[email protected] soft]# unzip linux_11gR2_database_2of2.zip

Assign permissions to the extracted directory to Oracle users

#chown -R oracle database
#chgrp -R oinstall database

5、 Formal installation
5.1 restart the server to make the configuration information effective
5.2 enter the server interface, log in as an Oracle user and execute the following commands

[[email protected] ~]#cd /home/oracle/database
[[email protected] ~]#./runInstaller

Then enter the graphical installation process.
Note that we first install the Oracle Software, and then configure the listener and database after installing the software.
Here are the steps and options for the installation process:

1. After executing. / runinstaller, enter Figure 1

2. Remove the check box and click next. A dialog box will pop up, as shown in Figure 2

3. Click Yes to enter Figure 3

4. Select item 2, install database soft onliy, and click next to enter Figure 4

5. Select item 1, single instance database installation, and click next to enter Figure 5

6. Select the language simplified Chinese and click next to enter Figure 6

7. Figure 6 shows how to select the database type. We select Enterprise Edition (3.95g) and click next

8. Figure 7 is to configure the Oracle installation directory. The configuration value should be as shown in the figure. Click Next directly to enter figure 8

9. Figure 8 is to configure the management group of Oracle. The configuration value should be as shown in the figure. Click Next directly to enter Figure 9

10. Figure 9 is to configure Oracle user permissions. The configuration values should be as shown in the figure. Click Next directly to enter Figure 10

11. Entering Figure 10 will automatically install and enter Figure 11 automatically

linux

13. Install the failed RPM packages. Please refer to failed in Figure 11 for details

upload
compat-libstdc++-33-3.2.3-61.i386.rpm
To / qsyang / Oracle
Perform the installation:
[[email protected] home]# cd /qsyang/oracle/
[[email protected] oracle]# rpm -ivh compat-libstdc++-33-3.2.3-61.i386.rpm

upload
elfutils-libelf-devel-0.137-3.el5.i386.rpm
elfutils-libelf-devel-static-0.137-3.el5.i386.rpm
To / qsyang / Oracle
Perform the installation (because the two packages depend on each other, they are installed together):
[[email protected] soft]# rpm -ivf elfutils-libelf-devel-0.137-3.el5.i386.rpm elfutils-libelf-devel-static-0.137-3.el5.i386.rpm
warning: elfutils-libelf-devel-0.137-3.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing packages for installation…
elfutils-libelf-devel-static-0.137-3.el5
elfutils-libelf-devel-0.137-3.el5

upload
libaio-devel-0.3.106-5.i386.rpm
To / qsyang / Oracle
Perform the installation:
[[email protected] soft]# rpm -ivh libaio-devel-0.3.106-5.i386.rpm
warning: libaio-devel-0.3.106-5.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing… ########################################### [100%]
1:libaio-devel ########################################### [100%]

upload
sysstat-7.0.2-3.el5.i386.rpm
unixODBC-devel-2.2.11-7.1.i386.rpm
To / qsyang / Oracle
Perform the installation:
[[email protected] oracle]# rpm -ivh sysstat-7.0.2-3.el5.i386.rpm
warning: sysstat-7.0.2-3.el5.i386.rpm: Header V3 DSA signature: NOKEY, key ID e8562897
Preparing… ########################################### [100%]
1:sysstat ########################################### [100%]

upload
unixODBC-2.2.11-7.1.i386.rpm
To / qsyang / Oracle
Perform the installation:
[[email protected] oracle]# rpm -ivh unixODBC-2.2.11-7.1.i386.rpm
Preparing… ########################################### [100%]
1:unixODBC ########################################### [100%]
[[email protected] oracle]# rpm -ivh unixODBC-devel-2.2.11-7.1.i386.rpm
Preparing… ########################################### [100%]
1:unixODBC-devel ########################################### [100%]
[[email protected] oracle]#

14. After installation, check again “check again” at the point level, and enter Figure 12

15. Click ignore, click finash to start the installation, and enter Figure 13

16. Pop up Figure 14 after installation

17. Click Finish to close it directly

linux

6、 Install the listener
Execute command
#netca

Enter the graphical configuration, as shown in Figure 16,

The next step is directly defaulted to the final step. You can also modify the name, protocol and port of the listener.

After the installation is complete, you can use the command
#ps -ef
To check whether the listener is successfully configured

7、 Install database program
Execute command:
#dbca

Enter the graphical configuration interface and continue to the next step, as shown in Figure 18

After entering figure 19,

Prompt for the global database name. I entered yakson

Next, go to figure 21 and enter the global password: I entered orcl 12344
Click next to pop up Figure 22, and click Yes
Next, under the third option, select the character code al32utf-8
Then go to the next step until you install the database and finish.
At this point, your Oracle preliminary installation is complete.