1. Install centos 6.5
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
Ii. Install the patch package
1. Install the system package
Query missing packages
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
If you check the preceding check box, three packages are missing, the installation package is installed, and the disc is mounted to the directory where the disc is installed.
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 unix data driver package
Query rpm-q unixODBC-2.2.14 unixODBC-devel-2.2.14
Install
Rpm-ivh unixODBC-2.2.14 *. rpm unixODBC-devel-2.2.14 *. rpm
3. Install ksh
According to the official oracle documents, an error is reported when ksh is installed. It is suspected that the version is high and incompatible. Install a lower version later
Wget ftp: // sdgtxuyong: xxxxx@192.168.7.66/tools/database/oracle11/ksh-20100621-18.el5.i386.rpm
Wget ftp: // 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. 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
Wget ftp: // sdgtxuyong: xxxxx@192.168.7.66/tools/database/oracle11/zysong. ttf
5. Disable iptables
Chkconfig iptables off
Chkconfig ip6tables off
3. Modify Linux Kernel Parameters
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 entry
192.168.7.72 ora.tralinw..cn ora
3. 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. It takes effect immediately on the terminal.
/Sbin/sysctl-p
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 (no error is reported after three times of installation in centos6, but a bug is reported in centos5)
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: xxxxxx@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
Log On With system
@? /Sqlplus/admin/help/hlpbld. SQL helpus. SQL
Usage: help shutdown
3. Certificate bug the browser reports a certificate key length error.
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. Current user name and tablespace
Select username, default_tablespace from user_users;
4. Enable the oem monitoring command
Emctl start | stop dbconsole
5. User
Create user username identified by password [account lock | unlock]
Unlock alter user Username account lock | unlock;
Authorize grant CONNECT and resource to user name;
Reclaim revoke CONNECT and resource from user name;