How to install oracle 11g2r on centos6.5 x86

Source: Internet
Author: User

1. Install centos6.5 x86
2. Install the library required by ora
3. Modify the centos Kernel
4. create user groups and directory structures
5. Install ora11g2r
6. Install the SQL plus paging program and help patch
7. self-starting script
8. Common commands

######################################## ####################################

1. Install centos6.5 x86

Install centos 6x86, select desktop, and select development and check development tools and additional development. Memory 2 GB, swap partition 4200 M

2. Install the library required by ora

1. Install the system package
Rpm-q binutils-2.20.51.0.2 compat-libcap1 compat-libstdc ++-33-3.2.3 gcc-4.4.7 gcc-c ++-4.4.7 glibc-2.12 glibc-devel-2.12 libgcc libstdc ++-devel libgcc libstdc ++-libstdc ++ -devel libaio-0.3.107 libaio-devel-0.3.107 make-3.81 sysstat-9.0.4
Three missing
Rpm-ivh compat-libcap1-1.10-1.i686.rpm compat-libstdc ++-33-3.2.3-69.el6.i686.rpm libaio-devel-0.3.107-10.el6.i686.rpm

2. Install the database driver package
Rpm-q unixODBC-2.2.14 unixODBC-devel-2.2.14
Rpm-ivh unixODBC-2.2.14 *. rpm unixODBC-devel-2.2.14 *. rpm

3. Install the ksh package. According to the official documents, the installation of the ksh package is incorrect. The version may be too incompatible.
Wgetftp: // sdgtxuyong: xxxxx@192.168.7.66/tools/database/oracle11/ksh-20100621-18.el5.i386.rpm
Wgetftp: // sdgtxuyong: xxxxx@192.168.7.66/tools/database/oracle11/pdksh-5.2.14-37.el5_8.1.i386.rpm
Rpm-ivh ksh-20100621-18.el5.i386.rpm
Rpm-ivh pdksh-5.2.14-37.el5_8.1.i386.rpm

4. Install the font to fix Chinese garbled Characters During Installation
"18030" v2.01 missing
Mkdir-p/usr/share/fonts/zh_CN/TrueType
Cd/usr/share/fonts/zh_CN/TrueType
Wgetftp: // sdgtxuyong: xxxxxx@192.168.7.66/tools/database/oracle11/zysong. ttf

5. Disable iptables
Chkconfig iptables off
Chkconfig ip6tables off

3. Modify the centos Kernel

1. Modify the control file
Vim/etc/sysctl. conf

Kernel. shmmni = 8192
Kernel. sem = 250 32000 100 128
Fs. file-max = 6815744
Net. ipv4.ip _ local_port_range = 9000 65500
Net. core. rmem_default = 4194304
Net. core. rmem_max = 4194304
Net. core. wmem_default = 262144
Net. core. wmem_max = 1048576
Fs. aio-max-nr = 1048576

2. Modify the license file
Vim/etc/security/limits. conf

* Soft nproc 2047
* Hard nproc 16384
* Soft nofile 1024
* Hard nofile 65536

3. Modify the login security file
Vim/etc/pam. d/login

Session required pam_limits.so

4. Modify selinux
Vim/etc/selinux/config

SELINUX = disabled

5. Modify the Host Name

Vim/etc/hosts delete all other entries and leave only one

192.168.7.72 ora.tralinw..cn ora

4. create user groups and directory structures

1. Create users and groups and set passwords
Groupadd oinstall
Groupadd dba
Groupadd rule
Groupadd asmadmin
Useradd-g oinstall-G dba, role, asmadmin oracle
Passwd oracle

2. Create a directory structure
Mkdir-p/u01/app/oracle/product/11.2.0/
Mkdir/u01/oradata
Chmod-R 755/u01
Chown-R oracle. oinstall/u01

3. Modify Environment Variables
Vim/home/oracle/. bash_profile

Export TMP =/tmp
Export TMPDIR = $ TMP
Export ORACLE_BASE =/u01/app/oracle
Export ORACLE_HOME = $ ORACLE_BASE/product/11.2.0/
Export ORACLE_SID = ora
Export PATH = $ PATH: $ ORACLE_HOME/bin:/usr/local/sbin:/usr/local/bin
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/local/lib
Export CLASS_PATH = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib
Export LANG = "zh_CN.UTF-8"
Export ORACLE_TERM = vt100
If [$ USER = "oracle"]; then
If [$ SHELL = "/bin/ksh"]; then
Ulimit-p 16384
Ulimit-n 65536
Else
Ulimit-u 16384-n 65536
Fi
Fi

4. takes effect immediately
Run/sbin/sysctl-p on the terminal

5. Install ora11g2r

1. Download ora11g2r
Su-oracle
Wgetftp: // sdgtxuyong: xxxxx@192.168.7.66/tools/database/oracle11/linux_11gR2_database_1of2.zip
Wgetftp: // sdgtxuyong: xxxxx@192.168.7.66/tools/database/oracle11/linux_11gr2_databasesilicate f2.zip
Unzip linux_11gR2_database_1of2.zip
Unzip linux_11gr2_database204 f2.zip

2. Go to the ui and use root to enable xhost +
Xhost +

3. Install ora11g2r
Su-oracle
Cd database
./RunInstaller

4. Modify the partition size of tmpfs
Vim/etc/fstab
Tmpfs default, size = 6g 0 0

6. Install the SQL plus paging program and help patch

1. sqlplus paging Program
Wgetftp: // sdgtxuyong: xxxxx@192.168.7.66/tools/database/oracle11/rlwrap-0.37.tar.gz
Tar zxvf rlwrap-0.37.tar.gz
./Configure
Make & make install
Write user environment variables
# Echo 'Alias sqlplus = "rlwrap sqlplus" '>/home/oracle/. bash_profile

2. Install help to log on with system
@? /Sqlplus/admin/help/hlpbld. SQL helpus. SQL
Usage: help shutdown

3. Certificate bug. the browser prompts that the key length is too short to be managed on the web.
Certutil-setreg chain \ minRSAPubKeyBitLength 512


VII. self-starting script (### to be continued)

8. Common commands
Sqlplus/as sysdba

1. Enable and disable
Startup nomount mount open
Alter database mount open
Shutdown immediate

2. Listening Service
Lsnrctl

3. Enable the oem monitoring command
Emctl start | stop dbconsole

4. Query
Current user name and tablespace
Select username, default_tablespace from user_users;
5. User
Create
Create user Username identified by password [account lock | unlock]
Unlock
Alter user Username account lock | unlock;
Authorization
Grant CONNECT, resource to user name;
Reclaim
Revoke CONNECT, resource from username;

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.