Ubuntu12.04 (32-bit) the whole process of installing Oracle11g (32-bit)

Source: Internet
Author: User
Tags automake
Ubuntu12.04 (32-bit) Oracle11g (32-bit) Installation Process 1. Update the system to the latest: sudoapt-getupdatesudoapt-getdist-upgrade2. Install the dependent package required for Oracle: sudoapt-getinstallautomakesudoapt-getinstallautotools-devsudoapt-getinstallb

Ubuntu12.04 (32-bit) the whole process of installing Oracle11g (32-bit) 1. update the system to the latest version: sudo apt-get update sudo apt-get dist-upgrade 2. install the dependency package required by Oracle: sudo apt-get install automake sudo apt-get install autotools-dev sudo apt-get install B

Ubuntu12.04 (32-bit) the whole process of installing Oracle11g (32-bit)


1. Update the system to the latest version:

Sudo apt-get update
Sudo apt-get dist-upgrade


2. Install the dependency packages required by Oracle:

Sudo apt-get install automake

Sudo apt-get install autotools-dev
Sudo apt-get install binutils
Sudo apt-get install bzip2
Sudo apt-get install elfutils
Sudo apt-get install expat
Sudo apt-get install gawk
Sudo apt-get install gcc
Sudo apt-get install gcc-multilib
Sudo apt-get install g ++-multilib
Sudo apt-get install ia32-libs
Sudo apt-get install ksh
Sudo apt-get install less
Sudo apt-get install lesstif2
Sudo apt-get install lesstif2-dev
Sudo apt-get install lib32z1
Sudo apt-get install libaio1
Sudo apt-get install libaio-dev
Sudo apt-get install libc6-dev
Sudo apt-get install libc6-dev-i386
Sudo apt-get install libc6-i386
Sudo apt-get install libelf-dev
Sudo apt-get install libltdl-dev
Sudo apt-get install libmotif4
Sudo apt-get install libodbcinstq4-1libodbcinstq4-1: i386
Sudo apt-get install libpth-dev
Sudo apt-get install libpthread-stubs0
Sudo apt-get installlibpthread-stubs0-dev
Sudo apt-get install libstdc ++ 5
Sudo apt-get install lsb-cxx
Sudo apt-get install make
Sudo apt-get install openssh-server
Sudo apt-get install pdksh
Sudo apt-get install rlwrap
Sudo apt-get install rpm
Sudo apt-get installsysstat
Sudo apt-get install unixodbc
Sudo apt-get installunixodbc-dev
Sudo apt-get install unzip
Sudo apt-get installx11-utils
Sudo apt-get install zlibc

Many of them are already provided by Ubuntu. Please execute them again with caution.


3. Check System Variables

/Sbin/sysctl-a | grep sem

/Sbin/sysctl-a | grep shm

/Sbin/sysctl-a | grep file-max

/Sbin/sysctl-a | grep aio-max

/Sbin/sysctl-a | grep ip_local_port_range

/Sbin/sysctl-a | grep rmem_default

/Sbin/sysctl-a | grep rmem_max

/Sbin/sysctl-a | grep wmem_default

/Sbin/sysctl-a | grep wmem_max


Then add the corresponding data in/etc/sysctl. conf according to the parameter value obtained in the preceding command, for example:
Fs. aio-max-nr = 1048576
Fs. file-max = 6815744
Kernel. shmall = 20 97152kernel. shmmax = 536870912
Kernel. shmmni = 4096kernel. sem = 250 32000 100 128

Net. ipv4.ip _ local_port_range = 9000 65500

Net. core. rmem_default = 262144

Net. core. rmem_max = 4194304

Net. core. wmem_default = 262144
Net. core. wmem_max = 1048586


Run the following command to update the kernel parameters:
Sysctl-p


4. Add the following data in the/etc/security/limits. conf file for the current user (if the user name is zhs ).
Zhs soft nproc 2047

Zhs hard nproc 16384

Zhs soft nofile 1024

Zhs hard nofile 65536

Zhs soft stacks 10240


5. Check/etc/pam. d/login and add the following lines (you don't need to add them if you have them ):

Session required pam_limits.so
Check/etc/pam. d/su as well. Add the following lines as needed:

Session required pam_limits.so


6. Create a required folder (for installing oracle) and set its ownership:
Sudo mkdir-p/opt/oracle
Sudo mkdir-p/opt/oraInventory

Sudo chown-R zhs: zhs/opt/oracle

Sudo chown-R zhs: zhs/opt/oraInventory

In the next two steps, the first zhs represents the current user, and the second zhs represents the group of the current user. linux users usually belong to several groups, with one group name and the same user name. These two steps may not be executed, because the two directories are created by zhs.


7. Install the JRE Environment

If JRE is not installed on Ubuntu, you need to install JRE (I have installed JDK directly here, taking JDK as an example ):

Download JDK 6 from the Oracle website (for compatibility reasons, install JDK 6 ):

Download the jdk-6u45-linux-i586.bin file. Put it in the home directory and enter the terminal:

$ Sudo chmod 777 jdk-6u37-linux-x64.bin // grant run permissions to files

$ Sudo-s./jdk-6u37-linux-x64.bin/usr/lib/jdk // install JDK under the/usr/lib/jdk directory.

Note: After the installation is complete, it may be installed in the main folder. You can use the command to copy all the files to the/usr/lib/jdk directory. (If you do not have the permission, use sudochmod 777 to obtain the permission and then copy it)

Configure the JDK environment variables, use the editor to open the. bashrc configuration file (hidden) in the main folder, and add the following content to it:

# JDK
JAVA_HOME =/usr/lib/jdk/jdk1.6.0 _ 45
JRE_HOME =$ {JAVA_HOME}/jre
Export ANDROID_JAVA_HOME = $ JAVA_HOME
Export CLASSPATH =. :$ {JAVA_HOME}/lib: $ JRE_HOME/lib: $ CLASSPATH
Export JAVA_PATH =$ {JAVA_HOME}/bin: $ {JRE_HOME}/bin
Export JAVA_HOME;
Export JRE_HOME;
Export CLASSPATH;
HOME_BIN = ~ /Bin/
Export PATH =$ {PATH }:$ {JAVA_PATH }:$ {HOME_BIN };

Check whether the directory structure is correct.

Then, make the new environment variable take effect, and execute the command: source. bashrc on the terminal.

Finally, verify that JDK is correctly installed:

Java-version

The JDK version is correct.


8. Configure environment variables for Oracle. Add the following content to the. bashrc configuration file in the main Folder:

# Oracle
# Write the folder you just created
Export ORACLE_BASE =/opt/oracle
# You can enter the following information at will
Export ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/dbhome_1
# Database sid
Export ORACLE_SID = orcl

Export ORACLE_UNQNAME = orcl
# Default Character Set
Export NLS_LANG =. AL32UTF8
# Environment Variables
Export PATH =$ {PATH }:$ {ORACLE_HOME}/bin /;


Then, make the new environment variable take effect, and execute the command: source. bashrc on the terminal.


9. oracle itself does not support ubuntu installation. Therefore, you must cheat the oracle Installation Program (sudo execution ):

Ln-s/etc/rc. d

Ln-s/lib/i386-linux-gnu/libgcc_s.so.1/lib/

Ln-s/usr/bin/awk

Ln-s/usr/bin/basename

Ln-s/usr/bin/rpm

Ln-s/usr/lib/i386-linux-gnu/libpthread_nonshared.a/usr/lib/libpthread_nonshared.a

Ln-s/usr/lib/i386-linux-gnu/libc_nonshared.a/usr/lib/libc_nonshared.a
Ln-s/usr/lib/i386-linux-gnu/libstdc ++. so.6/lib/

Ln-s/usr/lib/i386-linux-gnu/libstdc ++. so.6/usr/lib/

Ln-s/usr/lib/i386-linux-gnu/libstdc ++. so.5/lib/

Ln-s/usr/lib/i386-linux-gnu/libstdc ++. so.5/usr/lib/


Sudo touch/etc/redhat-release
Sudo echo 'Red Hat Linux release 5'>/etc/redhat-release


Ubuntu stores some library files based on 32-bit and 64-bit systems, but Oracle only recognizes the/usr/lib and/lib directories, so the above soft links are required.


10. Download the 32-bit (x86) Oraclefor Linux installer and decompress the package to obtain the database folder.


11. Set the language environment on the terminal

Export LANG = en_US or exportLANG = zh_CN.gbk

If this step is not set, the startup interface of the Oracle installer may be garbled.


12. Grant the executable permission to the runInstaller file in the database Folder:

Sudo chmod 777 runInstaller

Go to the database directory and run the following command on the terminal:

./RunInstaller


13. The email address is displayed. Do not enter the email address and check the check box. Click "Next. Click "YES" when the cross sign is displayed.


14. The rest of the process is basically smooth. You just need to set the password. Other settings are completed before you start the installation program. Do not change them!


15. When you perform dependency check on the GUI, many dependency checks fail and you cannot proceed to the next step. In this case, select "ignore all" in the upper right corner to proceed to the next step.


16. Two errors will occur during the installation process (close to 70%)

First error:

Errorin invoking target 'agent nmhs 'of makefile' opt/oracle/product/11.2.0/dbhome_1/sysman/lib/ins_emagent.mk'. See '/opt/oraInventory/logs/installActions2014-08-09_03-15-56AM.log' fordetails.


Solution:

Open a new terminal and enter the following command:

Sed-I's/^ \ (\ s * \ $ (MK_EMAGENT_NMECTL) \ s * $/\ 1-lnnz11/G' $ ORACLE_HOME/sysman/lib/ins_emagent.mk

Click 'retry' in the graphic interface to continue the installation.


Second error:

Errorin invoking target 'all _ no_orcl 'of makefile'/opt/oracle/product/11.2.0/dbhome_1/rdbms/lib/ins_rdbms.mk '. see '/opt/oraInventory/logs/installActions2014-08-09_03-16-32AM.log' fordetails.


Solution:

Enter the following four commands in the new terminal:

Sed-I's/^ \ (TNSLSNR_LINKLINE. * \ $ (TNSLSNR_OFILES) \ (\ $ (LINKTTLIBS) \)/\ 1-Wl, -- no-as-needed \ 2/G' $ ORACLE_HOME/network/lib/ennetworkv_.mk

Sed-I's/^ \ (ORACLE_LINKLINE. * \ $ (ORACLE_LINKER) \ (\ $ (PL_FLAGS) \)/\ 1-Wl, -- no-as-needed \ 2/G' $ ORACLE_HOME/rdbms/lib/env_rdbms.mk

Sed-I's/^ \ (\ $ LD \ $ LD_RUNTIME \) \ (\ $ LD_OPT \)/\ 1-Wl, -- no-as-needed \ 2/G' $ ORACLE_HOME/bin/genorasdksh

Sed-I's/^ \ (\ s * \) \ (\ $ (OCRLIBS_DEFAULT) \)/\ 1-Wl, -- no-as-needed \ 2/G' $ ORACLE_HOME/srvm/lib/ins_srvm.mk

Click 'retry' in the graphic interface to continue the installation.

There is no problem with the following installation process.


17. The last step should be completed successfully. Execute the following two scripts as prompted by the installation program:

Sudo/opt/oraInventory/orainstRoot. sh
Sudo/opt/oracle/product/11.2.0/dbhome_1/root. sh

The installation is complete.




Note: I have successfully installed oracle using ubuntu12.04 and 12.10.

References: http://blog.csdn.net/idber/article/details/9039857

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.