centos6.7 installation ORACLE11GR2 installation step record

Source: Internet
Author: User
Tags gpg

=====rdbms installation =====

# cd/etc/yum.repos.d/
# wget Http://public-yum.oracle.com/public-yum-ol6.repo

Upload "rpm-gpg-key-oracle" to "/etc/pki/rpm-gpg/"
Upload pdksh-5.2.14-37.el5.x86_64.rpm
# yum Install Oracle-rdbms-server-11gr2-preinstall

The above files can be obtained from the corresponding URL, where rpm-gpg-key-oracle need to manually copy the code to protect the file

====== Modifying host ======

1. Machine name

[Email protected] ~]# sed-i "s/hostname=localhost.localdomain/hostname=oracledb/"/etc/sysconfig/network
[Email protected] ~]# hostname oracledb

2, IP host corresponding

step-2# Add host name and IP correspondence record
[Email protected] ~]# vi/etc/hosts
x.x.x.x OracleDB
3. Turn off firewall SELinux

[Email protected] ~]# sed-i "s/selinux=enforcing/selinux=disabled/"/etc/selinux/config
[Email protected] ~]# Setenforce 0

4. Modify System Resource limits

[Email protected] #vi/etc/security/limits.conf #末尾添加如下

Grid Soft Nproc 2047
Grid hard Nproc 16384
Grid Soft Nofile 1024
Grid hard Nofile 65536

[Email protected] ~]# Vi/etc/pam.d/login
Session required pam_namespace.so #下面添加一条pam_limits. So
Session required/lib64/security/pam_limits.so
Session required/lib/security/pam_limits.so
Session Required Pam_limits.so

5. Create a directory to give permissions

[Email protected] ~]# mkdir/u01
[Email protected] ~]# mkdir/u02
[Email protected] ~]# chown-r oracle:oinstall/u01
[Email protected] ~]# chown-r oracle:oinstall/u02
[[email protected] ~]# su Oracle
[Email protected] ~]# mkdir-p/u01/app/oracle/product/11.2.0/db_1
[Email protected] ~]# mkdir-p/u02/oradata
[Email protected] ~]# mkdir-p/u02/oradata/oracledb #oracledb为你数据库实例名

6. Configure User Environment http://ruifar.blog.51cto.com/addblog.php

[Email protected] ~]# Vi/home/oracle/.bash_profile
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=oracledb; 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

[[email protected] ~]# Source/home/oracle/.bash_profile (make configuration effective immediately)
[[Email protected] ~]# env (check environment variable settings OK)

====== installation oracle=======

Uploading the installation package

Decompression 1, 2

[[Email protected] ~] $chown-R oracle:oinstall Database//Modify Permissions

Log out of root and log in as Oracle

[Email protected] ~]#./runinstaller

The installation process logs Oracle Service_Name and SIDS

    1. Create Ande Configure a database

    2. Single Instance database installation

    3. Language 中文版 Chinese

    4. Enterprise Edition

    5. Character Set:use Unicode Al32utf8

Run after installation is complete

[Email protected] ~]$/u01/app/orainventory/orainstroot.sh
[Email protected] ~]$/u01/app/oracle/product/11.2.0/db_1/root.sh


====== Open Port ============

[Email protected] ~]# Vi/etc/sysconfig/iptables
-A input-m state--state new-m tcp-p TCP--dport 1521-j ACCEPT


====== Modifying the Oracle boot ===========================
A. Modify Dbstart and Dbshut scripts
[Email protected] ~]$ VI $ORACLE _home/bin/dbstart
[Email protected] ~]$ VI $ORACLE _home/bin/dbshut
Locate the file in the
Oracle_home_listner=$1, modified to:
oracle_home_listner= $ORACLE _home

B. Modify the Oratab file
[Email protected] ~]$ Vi/etc/oratab
Will Oratsp:/home/oracle/app/product/11.2.0/dbhome_1:n
Modified to:
Oratsp:/home/oracle/app/product/11.2.0/dbhome_1:y

C, modify the rc.local file (root user)
[Email protected] deps]# vi/etc/rc.d/rc.local
Add the following information to the end of the file:
Su oracle-lc "/home/oracle/app/product/11.2.0/dbhome_1/bin/emctl start Dbconsole"
Su oracle-lc "/home/oracle/app/product/11.2.0/dbhome_1/bin/lsnrctl start"
Su ORACLE-LC "/home/oracle/app/product/11.2.0/dbhome_1/bin/dbstart


====== Adding a disk =======================

FDISK/DEV/SDB//For/DEV/SDB partition
N
1
_
W
MKFS-T EXT3/DEV/SDB1//formatted SDB1
PVCREATE/DEV/SDB1//Disk Setup
Vgdisplay//Show the situation of VG
Vgextend VG_ORACLEDB/DEV/SDB1//Adding a new disk to the VG
Vgdisplay//View the VG situation, free space
Lvextend-l 50g/dev/vg_oracledb/lv_root//Extended lv_root partition to size 50g,50g new size for lv_root;
Resize2fs/dev/vg_oracledb/lv_root//re-organize lv_root to make the expansion effective immediately
Df-h//view partition mount size

====== creating Tablespace ============

Create tablespace ABC logging datafile '/home/oracle/oradata/abc/abc.dbf ' size 1024m autoextend on next 100m maxsize 10240m Extent management Local;
Create tablespace nnc_data01 datafile '/home/oracle/oracledata/jnerp1/nnc_data01.dbf ' size 500M autoextend on next 50M ex Tent management local uniform size 256K;


===== Create a user-specified table space =======

Create user ABC identified by ABC default tablespace ABC temporary tablespace abc_temp;

Grant DBA to ABC;

Remove user Rights

Drop USER ABC cascade;


====== Data Export ===============

Export
1) Full export of database TEST, user Name System Password Manager exported to/home/oracle/backup/daochu.dmp
[[email protected]] #exp system/[email protected] file=/home/oracle/backup/daochu.dmp full=y
2) Export the system user in the database and the SYS user's table
[[email protected]] #exp system/[email protected] file=/home/oracle/backup/daochu.dmp owner= (System,sys)
3) Export the tables in the database inner_notify, Notify_staff_relat
[[email protected]] #exp aichannel/[email protected] file=/home/oracle/backup/daochu.dmp tables= (inner_notify,notify _staff_relat)


Import

[[email protected]] #imp System/[email protected] file=/home/oracle/backup/daochu.dmp[[email protected]] #imp Aichannel/[email protected] Full=y file=/home/oracle/backup/daochu.dmp ignore=y



============= Client connection listener not through ==============

You can connect to the database directly via Plsql, or you can connect to the database via Sqlplus
Debug and find related data find the problem for the following reasons:
When JDBC connects to a database, it needs to use the sid_name of the database, not the services_name of the database.
When you use Plsql to connect to a database, you only need the services_name of the database, so modify services_name in the connection string to Sid_name
Report:
Look at the current SID in the database:
Sql> select instance_name from V$instance;
Instance_name
----------------

OracleDB

------------------------

Sid==oracledb
Service_name==orcl
------------------------

This article is from the "Howfar" blog, make sure to keep this source http://ruifar.blog.51cto.com/4546320/1758774

centos6.7 installation ORACLE11GR2 installation step record

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.