I. Check the environment
1. Check whether the software package is installed.
Binutils-, compat-libstdc ++-, elfutils-libelf, glibc, gcc, elfutils-libelf-devel
Glibc-common, glibc-devel, gcc-c ++, libaio, libaio-devel, libgcc, libstdc ++
Libstdc ++-devel, make, sysstat, unixODBC, unixODBC-devel
2. Check whether the java software package is installed.
View the installed java version.
# Prepare java environment variables. If the preceding command can be executed, no configuration is required.
Export JAVA_HOME =/usr/local/jdk1.6.0 _ 20
Export PATH = $ PATH:/usr/local/jdk1.6.0 _ 20/bin
3. We recommend that you do not install orarun and sapinit software packages.
Ii. configuration parameters
1. Modify/etc/hosts to prepare the host
2. Set the core parameter/etc/sysctl. conf
# Kernel. core_uses_pid = 1
Kernel. shmall = 2097152
Kernel. shmmax = 2147483648 # bytes, physical memory x1024x1024x2, 2 times the memory
Kernel. shmmni = 4096
Kernel. sem = 250 32000 100 128
Fs. file-max = 65536
Net. ipv4.ip _ local_port_range = 1024 65000
Net. core. rmem_default = 8388608
Net. core. rmem_max = 8388608
Net. core. wmem_default = 262144
Net. core. wmem_max = 262144
# Use sysctl-p to make kernel parameters take effect
3. Modify/etc/security/limits. conf in shell limits
Oracle soft nofile 65536
Oracle hard nofile 65536
Oracle soft nproc 16384
Hard nproc 16384
Or
Oracle-nofile 65536
Oracle-nproc 16384
4. Create an oracle user
Groupadd dba oinstall
Useradd-g oinstall-G dba-m oracle
Mkdir-p/opt/oracle
Mkdir-p/opt/oraInventory
Chown-R oracle: oinstall/opt/oracle
Chown-R oracle: oinstall/opt/oraInventory
Chmod-R 755/opt/oracle
5. Set the environment variable/home/oracle/. profile
Export ORACLE_BASE =/opt/oracle
Export ORACLE_HOME = $ ORACLE_BASE/product/oraHome # $ ORACLE_BASE/product/11gR1/db
Export ORACLE_SID = orcl
Export ORACLE_OWNER = oracle
Export ORACLE_TERM = vt100 # xterm
Export PATH = $ PATH: $ ORACLE_HOME/bin: $ HOME/bin: $ ORACLE_HOME/Apache/bin
Export LD_LIBRARY_PATH = $ ORACLE_HOME/lib:/usr/local/lib
Export CLASSPATH = $ ORACLE_HOME/JRE: $ ORACLE_HOME/jlib: $ ORACLE_HOME/rdbms/jlib: $ ORACLE_HOME/network/jlib
Export ORA_NLS33 = $ ORACLE_HOME/nls/admin/data
Export SHLIB_PATH = $ ORACLE_HOME/lib32: $ ORACLE_HOME/rdbms/lib32
Export DBCA_RAW_CONFIG =/opt/oracle/rawdevpath
Export NLS_LANG = AMERICAN_AMERICA.UTF8 # AL32UTF8 # american_america.ZHS16GBK
# DISPLAY = localhost: 0
# Export ORACLE_USER = oracle
# Vi/etc/oratab N-> Y (uppercase) Automatic Start
3. After the environment configuration is complete, you can start to install oracle. It is no different from normal software installation.
1. During installation, you can select to only install software. You must use the oracle account for installation. Follow the prompts to run several scripts with the root account.
2. After oracle is installed, create a database file.
Netca (or netmgr) ---- configure the listener
Dbca ---- create a database
3. Common operation commands
Sqlplus/nolog
Connect/as sysdba # sqlplus/as sysdba
Startup
Shutdown abort force shutdown the database # shutdown immediate
Lsnrctl start/stop start and stop listening