Install Oracle 11g in Ubuntu 12.04

Source: Internet
Author: User

Install Oracle 11G notes in Ubuntu 12.04.

1. First, update the system to the latest version.
 
Sudo apt-get update
Sudo apt-get dist-upgrade
 
2. Install the dependency package
Sudo apt-get install alien binutils build-essential cpp-4.4 debhelper g + +-4.4 gawk gcc-4.4 gcc-4.4-base gettext html2text ia32-libs intltool-debian ksh lesstif2 lib32bz2-dev lib32z1-dev libaio-dev ready libc6 libc6-dev libc6-dev-i386 libdb4.8 libelf -dev libelf1 libltdl-dev libltdl7 libmotif4 libodbcinstq4-1 libodbcinstq4-1: i386 libqt4-core libqt4-gui libsqlite3-0 libstdc + + 5 libstdc + 6 libstdc + + 6-4.4-dev lsb-core lsb-cxx lsb-desktop lsb-graphics lsb-qt4 make odbcinst pax po-debconf rpm-common sysstat unixodbc-dev unzip
 
3. Create a user (optional, I have successfully installed it with my account)
 
4. 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
 
Add the corresponding data in/etc/sysctl. conf according to the result.
 
Fs. aio-max-nr = 1048576
Fs. file-max = 6815744
Kernel. shmall = 2097152
Kernel. shmmax = 536870912
Kernel. shmmni = 4096
Kernel. 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 kernel parameters:
Sysctl-p
 
5. Add kernel restrictions for oracle users
Add the following data to the/etc/security/limits. conf file:
 
Oracle soft nproc 2047
Hard nproc 16384
Oracle soft nofile 1024
Oracle hard nofile 65536
Oracle soft stack 10240
 
Oracle is the user created in step 3. Skip step 3 and write the current user
 
View/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
 
Also check/etc/pam. d/su. Add the following lines if you do not have the following lines:
Session required pam_limits.so
 
6. create the required folder (for installing oracle)
 
Mkdir ~ /Oracle/oracle11g
Mkdir ~ /Oracle/oradata
 
Then, use the chmod-R command to set the Oracle owner and user group to their own users.
 
7. Configure Environment Variables
In ~ /. Add the following environment variables to bashrc (preferably ~ Replace it with the absolute path)
 
# Write the folder you just created
Export ORACLE_BASE = ~ /Oracle/oracle11g
# You can enter the following information as needed.
Export ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/dbhome_1
# Database sid
Export ORACLE_SID = "orcl"
# Default Character Set
Export NLS_LANG =. AL32UTF8
 
8. Cheat oracle Installation Program
 
Mkdir/usr/lib64
Ln-s/etc/rc. d
Ln-s/lib/x86_64-linux-gnu/libgcc_s.so.1/lib64/
Ln-s/usr/bin/awk
Ln-s/usr/bin/basename
Ln-s/usr/bin/rpm
Ln-s/usr/lib/x86_64-linux-gnu/libc_nonshared.a/usr/lib64/
Ln-s/usr/lib/x86_64-linux-gnu/libpthread_nonshared.a/usr/lib64/
Ln-s/usr/lib/x86_64-linux-gnu/libstdc ++. so.6/lib64/
Ln-s/usr/lib/x86_64-linux-gnu/libstdc ++. so.6/usr/lib64/
 
Echo 'Red Hat Linux release 5'>/etc/RedHat-release
 
9. restart the computer. (optional. The installation is successful even if I have not restarted it ~)
 
10. Run the installer
Cd/XXX
./RunInstaller
 
11. Then you can proceed directly to the next step. There are just a few points to note
A) Pay more attention to the path settings. Theoretically, we have configured environment variables before, so there will be no major problems, but please pay more attention to them in case of such problems.
B) utf8 is the best character set.
C) if you encounter an error when running 'link binaries ', open a new terminal without closing the installer and enter the following command
 
Sed-I's/^ \ (\ s * \ $ (MK_EMAGENT_NMECTL) \ s * $/\ 1-lnnz11/G' $ ORACLE_HOME/sysman/lib/ins_emagent.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
Sed-I's/^ \ (TNSLSNR_LINKLINE. * \ $ (TNSLSNR_OFILES) \ (\ $ (LINKTTLIBS) \)/\ 1-Wl, -no-as-needed \ 2/G' $ ORACLE_HOME/network/lib/env_network.mk
Sed-I's/^ \ (ORACLE_LINKLINE. * \ $ (ORACLE_LINKER) \ (\ $ (PL_FLAGS) \)/\ 1-Wl, -no-as-needed \ 2/G' $ ORACLE_HOME/rdbms/lib/env_rdbms.mk
 
Then select retry.
D) In the last step, we need to manually execute two files. The first one should be fine. The second one will prompt that the directory cannot be created. Just create the directory manually as prompted.
E) do not click unnecessary buttons during installation. Avoid unnecessary errors
F) good luck

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.