Centos5.2 install oracle 11g2r on x86

Source: Internet
Author: User

1. Install centos

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 CentOS 5.2 32bit.

1. Memory 2 GB, Swap partition 4200 M

2. In the application, do not select "office/efficiency rate", "games and entertainment", "Video and Audio"

3. Check "development tools" and "Development Database" in Development (three packages are missing during subsequent installation)

4. Disable Selinux and iptables

5. Install the vmware Enhancement Tool and set the resolution to 1024*768

6. Load the optical drive mount-r/dev/hdc/media (mount the optical drive in read-only mode) umount/dev/hdc

2. Install the library required by ora

1. Mount the CentOS installation disk

2. binutils-2.17.50.0.6 elfutils-libelf-0.125 elfutils-libelf-devel-0.125 elfutils-libelf-devel-static-0.125 gcc-4.1.2 glibc-2.5-24 glibc-common-2.5 glibc-devel-2.5 glibc-headers-2.5 ksh-20060214 libaio-0.3.106 libaio-devel-0.3.106 libgcc-4.1.2 libgomp-4.1.2 libstdc ++-4.1.2 libstdc ++-devel-4.1.2 make-3.81 sysstat-7.0.2

3. Three library packages are missing

Rpm-ivh compat-libstdc ++-33-3.2.3 *. rpm libaio-devel-0.3.106 *. rpm sysstat-7.0.2 *. rpm

4. Install the database driver

Rpm-q unixODBC-2.2.11 unixODBC-devel-2.2.11

Rpm-ivh unixODBC-2.2.11 *. rpm unixODBC-devel-2.2.11 *. rpm

5. Installation Package yum install pdksh

(Vim/etc/yum. conf keepcache = 1 changed to save the download package ksh-20100621-18.el5.i386.rpm pdksh-5.2.14-37.el5_8.1.i386.rpm)

3. Modify the Linux 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 (modified, check)

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. Run/sbin/sysctl-p on the terminal immediately

5. Install oracle 11g2r

1. Download ora11g2r

Su-oracle

Wget ftp: // sdgtxuyong: xxxxx@192.168.7.66/tools/database/oracle11/linux_11gR2_database_1of2.zip

Wget ftp: // 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 size of the tmpfs partition (sometimes, when the database is started, the system prompts that the temporary zone space is insufficient. In centos5, there is a bug, but in centos6, no report)

Vim/etc/fstab

Tmpfs default, size = 6g 0 0

6. Install the SQL plus paging program and help patch

1. sqlplus paging Program

Wget ftp: // 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 Environment Variables

# Echo 'Alias sqlplus = "rlwrap sqlplus" '>/home/oracle/. bash_profile

2. Install help

Log On With system

@? /Sqlplus/admin/help/hlpbld. SQL helpus. SQL

Usage: help shutdown

3. Certificate bug the bug in browser viewing. The length of the key does not match, leading to browsing failure.

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. 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;

5. Query

View the default tablespace of the current user

Select username, default_tablespace from user_users;

View All tables under a user

Select * from user_tables;

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.