Centos6 install and configure oracle11g R2 database details

Source: Internet
Author: User

This article introduces how to install and configure the oracle11g R2 database in Centos6. I hope this method will be helpful to you.

1. Install centos6.3 _ 64-bit:

: Http://mirror.bit.edu.cn/centos/6.3/isos/x86_64/

CentOS-6.3-x86_64-bin-DVD1.iso

CentOS-6.3-x86_64-bin-DVD2.iso

Setup disable firewall configuration IP
 

Check whether the content of the/etc/hosts file is correct.

View the/etc/host. conf file to check whether there is any additional content.


2. Preparations for installing Oracle:

The Code is as follows: Copy code

Yum install pdksh *
# Centos6.3 cannot install the pdksh package using yum. download and install the package using the following link:
Wget ftp://fr2.rpmfind.net/linux/centos/5.8/ OS /x86_64/CentOS/pdksh-5.2.14-37.el5.x86_64.rpm
Rpm-ivh pdksh-5.2.14-37.el5.x86_64.rpm # If you cannot download it, there are
Yum install binutils -*
Yum install compat-libstdc ++ *
Yum install elfutils-libelf *
Yum install glibc *
Yum install gcc -*
Yum install libaio *
Yum install libgcc *
Yum install libstdc ++ *
Yum install make *
Yum install sysstat *
Yum install unixODBC *

Configure Kernel Parameters

The Code is as follows: Copy code

Vi/etc/sysctl. conf
Kernel. shmmni = 4096
# Semaphores: semmsl, semmns, semopm, semmni
Kernel. sem = 250 32000 100 128
Fs. file-max = 6815744
Net. ipv4.ip _ local_port_range = 9000 65500
Net. core. rmem_default = 8388608
Net. core. rmem_max = 8388608
Net. core. wmem_default = 1048576
Net. core. wmem_max = 1048576

Sysctl-p

The Code is as follows: Copy code

# Restrictions on the number of opened files and processes

Vi/etc/security/limits. conf
Oracle soft nofile 65536
Oracle hard nofile 65536
Oracle soft nproc 16384
Hard nproc 16384
Vi/etc/pam. d/login # Add the following two lines
Session required/lib/security/pam_limits.so
Session required pam_limits.so
# Creating users and groups
Groupadd oinstall
Groupadd dba
Groupadd rule
Useradd-u600-g oinstall oracle
Usermod-G dba, role oracle
Id oracle
Passwd oracle

Use ftp to upload the installation file to the server. It is best to upload the file to the/home/oracle/directory after you have created oracle.

The Code is as follows: Copy code

# Create an oracle Installation Directory
Root mkdir/u01
Root mkdir/u02

Chown-R oracle: oinstall/u01
Chown-R oracle: oinstall/u02
Su-oracle
Mkdir-p/u01/app/oracle/product/11.2.0/db_1
Mkdir-p/u02/oradata
Mkdir-p/u02/oradata/devdb # It is best to have the same name as the data instance
# Use an oracle account to log on and open the terminal window,
# Use a text editor to open/home/oracle/. bash_profile and add the following setting line for environment variables:

ORACLE_BASE =/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
LD_LIBRARY_PATH = $ ORACLE_HOME/lib; export LD_LIBRARY_PATH
ORACLE_SID = devdb; export ORACLE_SID
ORA_NLS33 = $ ORACLE_HOME/nls/admin/data; export ORA_NLS33
NLS_LANG = american_america.zhs16gbk; export NLS_LANG
PATH = $ ORACLE_HOME/bin: $ PATH; export PATH

# Its zhs16gbk is a simplified Chinese code. It is also the character set of the database. American_america is a region code with little relationship.
Log out, Log on to the oracle account again, and enter the env command to view the environment variables you just set.
Env
# Decompress
Unzip linux_11gR2_database_1of2.zip
Unzip linux_11gr2_database204 f2.zip
# Log on to the GUI as the root user
Xhost +
Su oracle
# Install./runInstaller in the installation directory

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 


After the installation is complete, configure:

Log on with an oracle user

The Code is as follows: Copy code

Sqlplus
/As sysdba
Startup # Start the database. After the database is installed, it is started by default. Do not start the instance manually (recommended by dba ).
Exit
Lsnrctl start # start the listener. After the database is installed, it is started by default.

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.