Install oracle on Ubuntu Server

Source: Internet
Author: User

The following installation procedures are verified.

I. platform environment and software

Ubuntu 10.04 sever

Jdk6.0

Oracle11g (linux_11gr1_database_1013.zip)

Xmanager 3 boardcast Mode

Swap space needs 4 GB

2. Installing the dependent package is critical. Only after successful installation can we ensure that no error is reported during subsequent Oracle installation. Apt-Get updateapt-Get install GCC make binutils lesstif2 libc6 libc6-dev RPM libmotif3 libaio1 libstdc ++ 6 alien
Note: When I use Ubuntu 10.10 to install Oracle, A makefile error is reported. This is because libstdc ++ 6 is installed by default in the new version to Ubuntu, while the Oracle installer uses libstdc ++ 5, if this error occurs, run sudo apt-Get install libstdc ++ 5 and click Retry in the error dialog box of the installer to continue.
If sudo apt-Get install libstdc ++ 5 doesn't work, download and install it manually.

Wget http://mirrors.kernel.org/ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-21ubuntu1_i386.deb

Sudo dpkg-I libstdc ++ 5_3.3.6-21?tu=i386.deb
3. Modify the default system code to en_us to avoid garbled characters in the installation program running Oracle later.
$ Sudo VI/var/lib/locales/supported. d/local
Modify the content:
En_US.UTF-8 UTF-8
$ Sudo VI/etc/default/locale
Modify the content:
Lang = "en_US.UTF-8"
Language = "en_us: en"
$ Sudo locale-gen 4. Create 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 the "$ id oracle" check result, and the following code is displayed: (the numbers in it are normal for different systems)
Uid = 1001 (Oracle) gid = 1001 (oinstall) groups = 1001 (oinstall), 1002 (DBA)

5. Create a directory for Oracle

Mkdir-P/opt/ora11g

Mkdir-P/home/Oracle/orainventory

Chown ORACLE: oinstall/opt/ora11g

Chown ORACLE: oinstall/home/Oracle/orainventory

Chmod 750/opt/ora11g/

Chmod 750/home/Oracle/orainventory

Mkdir-P/opt/oradata

Chmod 750/opt/oradata

6. Configure the user environment of the Oracle account

Log on to Ubuntu server with an oracle account
$ VI/home/Oracle/. Profile
Modify the file content as follows:

Oracle_base =/opt/ora11g

ORACLE_HOME = $ oracle_base/product/DB

Oracle_sid = orcl

Oracle_owner = Oracle

Oracle_term = VT100

Export oracle_base ORACLE_HOME oracle_sidoracle_owner oracle_term

Path = $ ORACLE_HOME/bin: $ path :.

Export path

LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/local/lib

Classpath = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib

Classpath = $ classpath: $ ORACLE_HOME/Network/jlib

Export LD_LIBRARY_PATH classpath

7. modify the system configuration file sysctl. conf

This step is to modify some kernel parameters to meet the requirements of oracle.
# Cp/etc/sysctl. CONF/etc/sysctl. Original
# Vi/etc/sysctl. conf
Add the following lines to/etc/sysctl. conf:
Kernel. Shmall = 2097152
Kernel. shmmax = 2147483648
Kernel. shmmni = 4096
Kernel. SEM = 250 32000 100 128
FS. File-max = 6815744
FS. AIO-max-Nr = 1048576
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
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 98063.
Kernel. Shmall --> indicates the total amount of shared memory that can be used by the system at one time. The default value is 2097152, which usually does not need to be modified.
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.
Kernel. shmmni = 4096 --> (4 K) sets the maximum number of shared memory segments in the system range. The default value is 4096, which does not need to be changed.
Kernel. SEM --> four data records correspond to 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 126976.
Net. Core. rmem_max --> maximum TCP Data receiving buffer, 131071 by default
Net. Core. wmem_default --> the default value is 126976.
Net. Core. wmem_max --> maximum TCP data sending buffer, 131071 by default
Net. ipv4.ip _ local_port_range --> IPv4 port value range, 32768 61000 by default
FS. 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. conf
Add the following lines to/etc/security/limits. Con.
# Oracle 11gr2 shell limits:
* Soft nproc 2048
* Hard nproc 16384
* Soft nofile 1024
* Hard nofile 65536

To forcibly use the added items, add the following to the end of the/etc/PAM. d/login file:

Session required/lib/security/pam_limits.so
Session required pam_limits.so

Then run the command: sysctl-p to make the added items take effect.

9. Change the system running level to 5 (2 by default)

# Vi/etc/init/rc-sysinit.conf
Set env DEFAULT_RUNLEVEL = 2
Change to env DEFAULT_RUNLEVEL = 5
Note: After the installation is complete, you can change it back to the default value of 2. You can run the "# runlevel" command to view the current running level, you can also use the command "# init 5" to temporarily change the running level to 5.

10. Create a file that spoofs the Oracle installer System

# Vi/etc/redhat-release
The file content is set to the following line, which is used to trick the installer into thinking that the system is RedHat:
Red Hat Linux release 4.1

Create tools required for Oracle installation. Because the Oracle installer is prepared for Red Hat, the location of some tools and

Ubuntu is different.
$ Ln-s/usr/bin/awk
$ Ln-s/usr/bin/rpm
$ Ln-s/usr/bin/basename
$ Mkdir/etc/rc. d
$ For I in 0 1 2 3 4 5 6 S; do sudo ln-s/etc/rc $ I. d/etc/rc. d/rc $ I. d; done
$ Ln-S/etc/init. d/etc/rc. d/init. d

11. start installing Oracle database software

Switch to Oracle user

Decompress the Installation File

Unzip-D./linux_11gr1_database_1013.zip

Enter the decompressed file directory and run runinstaller.

Next step, pay attention
Character Set in simplified Chinese zh16gbk
User Group oinstall

When running properly, you will see a GUI window interface. During the installation process, the installer will remind you twice to stop and run the script with the root permission. When it reminds you for the first time, let it pass, it only sets the corresponding permissions, the second time, it requires to run the root. Sh script

Switch to the root administrator account and run the following command:
#/Opt/ora11g/orainventory. orainstroot. Sh
#/Opt/ora11g/product/DB/root. Sh

Go back to the graphic screen and click "OK" until the operation is successful.

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.