How to install Oracle 11g r2 on Ubuntu Server 11.04

Source: Internet
Author: User

The installation and configuration steps are as follows: Note: The # sign in front of the command line indicates that the account is currently in the root account state. You can switch to the root account by running "$ sudo su-" on the terminal of the current account. 1) it is critical to install the dependent package. Only after successful installation can we ensure that no error is reported during subsequent Oracle installation. 1) automatic Installation # apt-get update # apt-get install make binutils-dev gcc libaio1 libc6 libaio-dev libglib2.0-dev libstdc ++ 6-4.5-dev libelf-dev sysstat unixodbc-dev pdksh expat elfutils lsb-cxx libstdc ++ 5 ia32-libs libc6-dev-i386 unrar x-window-system-core
2) manual installation part of the first download: # wget http://mirrors.kernel.org/Ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-15ubuntu6_amd64.deb# wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/gcc-3.3-base_3.3.6-15ubuntu6_amd64.deb# wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/gcc-3.3_3.3.6-15ubuntu6_amd64.deb# wget dpkg-I gcc-3.3-base_3.3.6-15ubuntu6_amd64.deb # dpkg-I libstdc + + 5_3.6-151_tu6_amd64.deb # dpkg-I cpp-3.3_3.3.6-15ubuntu6_amd64.deb # dpkg-I gcc-3.3_3.3.6-15ubuntu6_amd64.deb
2) set additional links required by Oracle: # ln-s/usr/bin/basename # ln-s/usr/bin/awk # ln-s/usr/bin/rpm/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/usr/lib64/# ln-s/usr/lib/x86_64-linux-gnu/libstdc ++. so.6.0.14/lib64/libstdc ++. so.6 # ln-s/usr/lib/x86_64-linux-gnu/libstdc ++. so.6.0.14/usr/lib64/libstdc ++. so.6 # ln-s/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5/libgcc_s.so/lib64/libgcc_s.so.1
3)Modify the system's default encoding to en_US to avoid garbled code $ sudo vi/var/lib/locales/supported in the installation program running Oracle later. d/local change content to: en_US.UTF-8 UTF-8 $ sudo vi/etc/default/locale change content to: LANG = "en_US.UTF-8" LANGUAGE = "en_US: en "$ sudo locale-gen
4) create related Oracle users and groups $ sudo groupadd oinstall $ sudo groupadd dba $ sudo useradd-m-g oinstall-G dba oracle $ sudo usermod-s/bin/bash oracle $ sudo passwd oracle $ sudo groupadd nobody $ sudo usermod-g nobody finally run "$ id oracle" to check the result, the following code is displayed: (the numbers inside are normal for different systems) uid = 1001 (oracle) gid = 1001 (oinstall) groups = 1001 (oinstall), 1002 (dba)
5)Create the directory to be used by oracle $ sudo mkdir-p/u01/app/oracle $ sudo mkdir-p/u01/app/oraInventory $ sudo chown oracle: oinstall/u01/app/oracle $ sudo chown oracle: oinstall/u01/app/oraInventory $ sudo chmod 750/u01/app/oracle $ sudo chmod 750/u01/app/oraInventory $ sudo chmod 750/u02/oradata
6)Use an Oracle account to log on to the Ubuntu Server system $ vi/home/Oracle /. modify the bashrc file content to: ORACLE_BASE =/u01/app/oracleORACLE_HOME = $ ORACLE_BASE/product/dbORACLE_SID = region = oracle_term = vt100export ORACLE_BASE ORACLE_HOME ORACLE_SID ORACLE_OWNER region = $ ORACLE_HOME/bin: $ PATH :. export PATHLD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/local/libCLASSPATH = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlibCLASSPATH = $ CLASSPATH: $ ORACLE_HOME/network/jlibexport LD_LIBRARY_PATH CLASSPATH
7) modify the systemConfiguration File sysctl. conf this step modifies some kernel parameters to meet Oracle requirements # cp/etc/sysctl. conf/etc/sysctl. original # vi/etc/sysctl. add the following lines to/etc/sysctl. in conf: kernel. shmall = 2097152kernel. shmmax = 2147483648kernel. shmmni = 4096kernel. sem = 250 32000 100 FS. file-max = 6815744fs. aio-max-nr = 1048576net. ipv4.ip _ local_port_range = 9000 65500net. core. rmem_default = 262144net. core. rmem_max = 4192134net. core. wmem_default = 262144net. Core. wmem_max = 1048586 Note: fs. file-max --> the maximum number of file handles, indicating the number of files that can be opened in linux. The default value is 98063kernel. shmall --> indicates the total amount of shared memory that can be used by the system at a time. The default value is 2097152. You do not need to modify the kernel. shmmax --> defines the maximum size (in bytes) of the shared memory segment. The default value is 32 MB. For oracle, the default value is too low. shmmni = 4096 --> (4 K) sets the maximum number of shared memory segments in the system range. The default value is 4096, which usually does not need to be changed. Kernel. sem --> the four data items correspond to the semmsl semmns semopm semmni, indicating the set semaphore. The default value is 250 32000 32 128 (cat/proc/sys/kernel/sem). net. core. rmem_default --> the default value is 126976net. core. rmem_max --> maximum TCP Data receiving buffer. The default value is 131071net. core. wmem_default --> the default value is 126976net. core. wmem_max --> maximum TCP data sending buffer. The default value is 131071net. ipv4.ip _ local_port_range --> ipv4 port value range, 32768 61000fs by default. aio-max-nr --> the default value is 65536.
8)Modify the system configuration file limits. conf # cp/etc/security/limits. conf/etc/security/limits. conf. original # vi/etc/security/limits. add the following lines to/etc/security/limits. con # Oracle 11gR2 shell limits: oracle soft nproc 2048 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536
9) modify the system running level to 5 (default is 2) # vi/etc/init/rc-sysinit.conf to change env DEFAULT_RUNLEVEL = 2 to env DEFAULT_RUNLEVEL = 5 Note: after the installation is complete, you can change it back to the original default value 2. You can run the command "# runlevel" to view the current running level, or use the command "# init 5" to temporarily change the running level to 5.
10) set a fixed IP address (required by Oracle) $ sudo vi/etc/network/interfaces: auto eth0 # iface eth0 inet dhcp -- this is the automatic ip address Settings iface eth0 inet static --> set to static ip address 192.168.253.142 --> ip address netmask 255.255.255.0 --> subnet mask gateway 192.168.253.1 --> Network Management
11) create a file that spoofs the Oracle installer system # vi/etc/RedHat-release file and set it to the following line to fool the installer so that the system is RedHat: red Hat Linux release 4.1
10II)Copy the Installation File of R2 to the 64-bit Installation File of Oracle11.2.0.1 for linux downloaded by ttuserver and copy or upload it to the/home/oracle directory of UbuntuServer, assume that the directory is finally uploaded to the/home/oracle/database directory, and set the permission for the Directory: # chown oracle: oinstall/home/oracle/database-R # chmod 775/home/oracle/database-R
103.) Restart javastuserver.# Reboot
14) start installing Oracle database softwareThe Oracle installer is developed based on the GUI Interactive Interface, while the javastuserver does not install the desktop by default, so it cannot run directly on the server; the x-window-system-core installed in the first step above is only the core part of x-server. It is sufficient for the server to install this function only, use any machine with Ubuntu Desktop (a virtual machine with a Desktop version) to remotely connect to UbuntuServer to install Oracle.Log on to the UbuntuDesktop desktop, open the terminal, and enter the following command on the terminal to connect to the UbuntuServer through x-server:$ Ssh-X oracle @ [ubuntuServer IP address]Note: The-X parameter is required. You must directly use the oracle account instead of other accounts before switching to the oracle account.After successfully logging on to UbuntuServer, run the "$ xclock" command on the terminal to test it. If a clock window interface similar to this is displayed, you can start the installation:

Close the xclock interface window and run the following command on the terminal to start installation: $ cd database $./runInstaller will see relevant information on the terminal: Wait a moment and the Oracle11R2 logo and installation page will pop up:
Some related interfaces are omitted here. Special descriptions are as follows:
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next Page

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.