Linux Centos 6.6 Install Oracle 11g

Source: Internet
Author: User
Tags dba mkdir sqlplus

This article uses the interface installation method, applies to the LAN Remote Installation Oracle and installs directly on the Linux server.

Through the Internet environment installation has not been tested, the Internet environment by silent installation is better.

This article is installed through the red Hat Enterprise Linux 6 64-bit system, Centos 6.6 system.

The tools used in this article:

Xshell 4, Xftp 4, VMware 10.0.3

The Oracle version installed is:

Oracle Database 11g Enterprise Edition release 11.2.0.3.0-64bit Production

Oracle installation packages for use:

P10404530_112030_linux-x86-64_1of7.zip

P10404530_112030_linux-x86-64_2of7.zip



Directory

One, modify the configuration file
1.1, modify the/etc/security/limits.conf file, modify the user's shell restrictions.
1.2, modify the/etc/pam.d/login file.
1.3, modify the Linux kernel, modify the/etc/sysctl.conf file.
1.4, modify/etc/profile.
1.5, create users and groups.
1.6, create the database software directory and data file storage directory.
1.7, configure the Oracle user environment variables.
1.8, upload Oracle installation files
1.9, decompression installation files
Second, install Oracle 11.2 products
Third, the database builds the storehouse
Iv. Configuring monitoring and local network services
V. Start Oracle Services and listeners



One, modify the configuration file

1.1, modify the/etc/security/limits.conf file, modify the user's shell restrictions.

Enter the command: vi/etc/security/limits.conf to add the following content to the file.

Oracle   Soft    nproc    2047
Oracle   hard    nproc    16384
oracle   soft    Nofile   1024
Oracle   hard    nofile   65536

Press the INSERT key to enter the editing state, the editor completes press ESC to exit Edit state, press the key to enter English colon Wq ": Wq" save exit. Do not want to save: press ESC, and then press CTRL+Z.

[Root@localhost ~]# Su-root

[Root@localhost ~]# vi/etc/security/limits.conf



1.2, modify the/etc/pam.d/login file.

Enter the command: Vi/etc/pam.d/login to add the following content to the file.

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



1.3, modify the Linux kernel, modify the/etc/sysctl.conf file.

Enter the command: vi/etc/sysctl.conf to add the following content to the file.

Fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.shmall = 2097152 Kernel.shmmax
= 2147483648
Kerne L.shmmni = 4096
Kernel.sem = 32000 128
net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_de
Fault = 4194304
Net.core.rmem_max = 4194304
net.core.wmem_default = 262144 Net.core.wmem_max
= 1048576



Use the # notation to comment out the original configuration.

# Controls The maximum shared segment size, in bytes

#kernel. Shmmax = 68719476736

# Controls The maximum number of shared memory segments, in pages

#kernel. Shmall = 4294967296

Enter the command: Sysctl-p to make the/etc/sysctl.conf configuration file effective immediately.



1.4, modify/etc/profile.

Enter the command: Vi/etc/profile to add the following content to the file.

if [$USER = "Oracle"]; Then 
if [$SHELL = "/bin/ksh"]; then 
  ulimit-p 16384 ulimit-n 65536 
else 
  ulimit-u 16384-n />fi
fi



1.5, create users and groups.

To create a user group, enter a command:

Groupadd  oinstall 
groupadd  dba


Create Oracle User, primary group is Oinstall, Deputy Group DBA, enter command:

USERADD-G oinstall-g dba-m Oracle


Set User Oracle password, enter two times password, enter command:

passwd  Oracle

1.6, create the database software directory and data file storage directory.

Mkdir/home/oracle/app
mkdir/home/oracle/app/oracle
mkdir/home/oracle/app/oradata
mkdir/home/oracle /app/oracle/product

Modify directory permissions, change the directory owner to all Oracle users, enter the command:

Chown-r Oracle:oinstall/home/oracle/app

1.7, configure the Oracle user environment variables.

Switch to the Oracle user with the command su-oracle.

Su-oracle

Enter command: Vi. bash_profile, add the following content to the file.

Umask 022
export Oracle_base=/home/oracle/app
export oracle_home= $ORACLE _base/oracle/product/11.2.0/ Dbhome_1
export ORACLE_SID=ORCL
export path= $PATH: $HOME/bin: $ORACLE _home/bin
Export ld_library_path=$ Oracle_home/lib:/usr/lib


[Root@localhost ~]# Su-oracle

[Oracle@localhost ~]$ Vi. Bash_profile



1.8, upload Oracle installation files

Upload Oracle installation files to Linux server.

Open Xshell, create a new connection, enter an IP address and port, and connect using the SSH protocol.




Enter a user name and password.

Using Xshell and xftp tools to upload files, connect Linux in Xshell, click on the icon in the red wireframe to open the xftp.



Upload installation files

P10404530_112030_linux-x86-64_1of7.zip

P10404530_112030_linux-x86-64_2of7.zip

Upload to the/tmp directory below.


1.9, decompression installation files

Enter the TMP directory and use the Unzip command to extract the files.

[Root@localhost tmp]# CD/
[root@localhost/]# cd/tmp
[root@localhost tmp]# Unzip-p10404530_112030_ LINUX-X86-64_1OF7.ZIP-D/tmp
[root@localhost tmp]# unzip p10404530_112030_linux-x86-64_2of7.zip-d/tmp

After the decompression is complete, there will be a database folder in the TMP directory.

Second, install Oracle 11.2 products

Switch to the Oracle user with the command su-oracle, and execute the installation command./runinstaller, as follows.

[Root@localhost database]# su-oracle
[oracle@localhost ~]$ cd/tmp/database
[Oracle@localhost database]$ display=192.168.0.107:0.0
[oracle@localhost database]$ export DISPLAY
[oracle@localhost database]$ Export  lang=en-us
[Oracle@localhost database]$./runinstaller

If you are remotely connected to a Linux server installation, you need to enter a command

display=192.168.0.107:0.0//Here is the IP address of the local computer, not the IP address of the server
Export Display//install interface map to local computer
Export lang=en-us//If the installation interface is garbled, the text will not display, you need to enter the command

If you are installing directly on a Linux server, you do not need to enter the three-line command above, just enter

Su-oracle
Cd/tmp/database
./runinstaller

This is the way in which the following sections of this article are similar.


Execute the installation command. After/runinstaller, the following message is displayed:

Starting Oracle Universal Installer ...

Checking Temp space:must be greater than MB. Actual 25737 MB passed

Checking swap space:must be greater than MB. Actual 4090 MB passed

Checking Monitor:must is configured to display at least 256 colors. Actual 16777216 passed

Preparing to launch Oracle Universal Installer from/tmp/orainstall2015-06-29_08-23-35pm. Please wait ... [Oracle@localhost database]$

Translation:

Starting Oracle Universal Installer ...

Check temporary space: must be greater than MB. The actual 32694 MB is passed

Check swap space: The available swap space is 4096 MB, and the required swap space is MB. Pass

Check monitor: The monitor configuration must display at least 256 colors. Actually for 16777216 through

Prepare to start Oracle Universal installer/tmp/orainstall2015-06-29_08-23-35pm from the following address. Please wait ...

























Install the missing components according to the actual situation. No components can be Baidu Google search download, and then upload up to install, after installation, click the Check Again button for inspection, the installation of the version applicable can be passed.

RPM-IVH pdksh-5.2.14-37.el5_8.1.x86_64.rpm

RPM-IVH libaio-devel-0.3.105-2.x86_64.rpm

RPM-IVH elfutils-libelf-devel-0.152-1.el6.x86_64.rpm

RPM-IVH compat-libstdc++-33-3.2.3-69.el6.x86_64.rpm

Yum-y Install libstdc++-devel*

Yum-y Install libstdc++-devel-4.4.7-11.el6.x86_64.rpm

Yum Install gcc-c++-*













Execute 2 shell scripts with root privileges, open a new terminal, and enter the command:

[Root@localhost ~]# su-root
[root@localhost ~]# cd/home/oracle/orainventory/
[root@localhost oraInventory]# SH orainstroot.sh
The following information is displayed:

changing permissions of/home/oracle/orainventory.

Adding Read,write permissions for group.

Removing Read,write,execute permissions for the world.

changing groupname of/home/oracle/orainventory to DBA.

The execution of the script is complete.

[Root@localhost orainventory]# cd/home/oracle/app/oracle/product/11.2.0/dbhome_1/
[root@localhost dbhome_1]# SH root.sh

The following information is displayed:

Performing root user operation for Oracle 11g

The following environment variables are set as:

Oracle_owner= Oracle

Oracle_home=/home/oracle/app/oracle/product/11.2.0/dbhome_1

Enter the full pathname to the local bin directory: [/usr/local/bin]:

Copying Dbhome To/usr/local/bin ...

Copying oraenv To/usr/local/bin ...

Copying coraenv To/usr/local/bin ...

Creating/etc/oratab file ...

Entries'll be added to The/etc/oratab file as needed by

Database Configuration Assistant When a database is created

Finished running generic part of root script.

Now product-specific root actions would be performed.

Finished product-specific root actions.





Finish the script, then click the OK button to close the window.



Installation complete. Displays similar information below.

Preparing to launch Oracle Universal Installer from/tmp/orainstall2015-06-29_07-37-00pm. Please wait ... [Oracle@localhost database]$ can find the log of this install session at:

/home/oracle/orainventory/logs/installactions2015-06-29_07-37-00pm.log


Verify that the installation is successful


Use the command su-oracle to switch the system account, and then enter the Sqlplus command to log in using the system user and password.

[Root@localhost ~]# su-oracle
[oracle@localhost ~]$ Sqlplus

Sql*plus:release 11.2.0.3.0 Production on Tue June 30 11:06:50 2015

Copyright (c) 1982, Oracle. All rights reserved.

Enter User-name:system

Enter Password:

Connected to:

Oracle Database 11g Enterprise Edition release 11.2.0.3.0-64bit Production

With the partitioning, OLAP, Data Mining and real application testing options

Sql>


third, the database builds the storehouse

Enter the command DBCA in the current terminal window and eject the library interface.

[Oracle@localhost database]$ DBCA


[Root@localhost dbhome_1]# DBCA

-bash:dbca:command not found

If the build interface is not popped, or the DBCA command is not found. Finish the two scripts in the previous way, and then do the following.

[Root@localhost bin]# su-oracle
[oracle@localhost ~]$ Cd/home/oracle/app/oracle/product/11.2.0/dbhome_1/bin
[Oracle@localhost bin]$ display=192.168.0.107:0.0
[Oracle@localhost bin]$ export DISPLAY
[oracle@localhost bin]$ export  lang=en-us
[Oracle@localhost bin]$ ./DBCA





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.