Centos 6 Oracle 11G 超详细安装
来源:互联网 发布:数据字典名词解释 编辑:程序博客网 时间:2024/06/05 20:56
Desktop Environment is not neccessary for Server usage, though. But Sometimes installation or using an application requires Desktop Environment, then build Desktop Environment as follwos.
[root@dlp ~]#yum -y groupinstall "X Window System"
[root@dlp ~]#yum -y groupinstall "Desktop"
[root@db01 ~]#vi /etc/sysctl.conf
# comment out
#
net.bridge.bridge-nf-call-ip6tables = 0#
net.bridge.bridge-nf-call-iptables = 0#
net.bridge.bridge-nf-call-arptables = 0# add follows to the end
net.ipv4.ip_local_port_range = 9000 65500
fs.file-max = 6815744
kernel.shmall = 10523004
kernel.shmmax = 6465333657
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=1048576
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 10523004
kernel.shmmax = 6465333657
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default=262144
net.core.wmem_default=262144
net.core.rmem_max=4194304
net.core.wmem_max=1048576
fs.aio-max-nr = 1048576
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
net.ipv4.ip_local_port_range = 9000 65500
fs.file-max = 65536
kernel.shmall = 10523004
kernel.shmmax = 6465333657
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.core.rmem_default = 262144
net.core.wmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_max = 1048576
fs.aio-max-nr = 1048576[4]Create user and groups for Oracle Database.[root@db01 ~]# groupadd -g 200 oinstall
[root@db01 ~]# useradd -u 440 -g oinstall -G dba -d /usr/oracle oracle
[root@db01 ~]# passwd oracle
Changing password for user oracle.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@db01 ~]#vi /etc/pam.d/login
# near line 14: add
session required pam_selinux.so opensession required pam_namespace.so
session required pam_limits.so
session optional pam_keyinit.so force revokesession include system-auth-session optional pam_ck_connector.so
[root@db01 ~]# vi /etc/security/limits.conf
# add follows to the end
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
[root@db01 ~]# vi /etc/profile
# add follows to the end
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
[5]Switch to a user "Oracle" and configure some settings.if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
fi
db01 login:
Password:oracle
[oracle@db01 ~]$ chmod 755 /usr/oracle
[oracle@db01 ~]$mkdir /usr/oracle/app
[oracle@db01 ~]$chmod 775 /usr/oracle/app
[oracle@db01 ~]$mkdir /usr/oracle/oradata
[oracle@db01 ~]$chmod 775 /usr/oracle/oradata
[oracle@db01 ~]$vi ~/.bash_profile
# add follows to the end
umask 022
export ORACLE_BASE=/usr/oracle/app
export ORACLE_BASE=/usr/oracle/app
# create a temporary directory for installation
[oracle@db01 ~]$mkdir tmp
Install Oracle Database 11g R2.
[1]Login and work with "oracle" user which you create in previous section.[2]Download Oracle Databse 11g R2 for Linux and upload on your server.
http://www.oracle.com/technology/software/products/database/index.html
[3]After uploading Oracle files, move to a tmp directory and run an Installer like follows.[oracle@db01 ~]$ cd tmphttp://www.oracle.com/technology/software/products/database/index.html
[oracle@db01 tmp]$ unzip linux.x64_11gR2_database_2of2.zip
[oracle@db01 tmp]$ ./database/runInstaller
Changing permissions of /usr/oracle/oraInventory.Adding read,write permissions for group.Removing read,write,execute permissions for world.Changing groupname of /usr/oracle/oraInventory to oinstall.The execution of the script is complete.[root@db01 ~]#[root@db01 ~]# /usr/oracle/app/product/11.2.0/dbhome_1/root.sh
Running Oracle 11g root.sh script...
The following environment variables are set as:ORACLE_OWNER= oracle
ORACLE_HOME= /usr/oracle/app/product/11.2.0/dbhome_1
Enter the full pathname of the local bin directory: [/usr/local/bin]: # Enter
Copying dbhome to /usr/local/bin ...
Copying oraenv to /usr/local/bin ...
Copying coraenv to /usr/local/bin ...
Creating /etc/oratab file...Entries will be added to the /etc/oratab file as needed by
Database Configuration Assistant when a database is created
Finished running generic part of root.sh script.
Now product-specific root actions will be performed.
Finished product-specific root actions.[16]Installation completed. Click "Close" button.[17]Configure some settings for Oracle user.
[oracle@db01 ~]$vi ~/.bash_profile
# add follows to the end
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1
export PATH=$PATH:$ORACLE_HOME/bin
export PATH=$PATH:$ORACLE_HOME/bin
source ~/.bash_profile
[oracle@db01 ~]$rm -rf tmp
Create Oracle Net Listener that is a network service on Oracle.
[1]Login with the "oracle" user and input a command "netca" like follows. [oracle@db01 ~]$ netca[2]Check a box "Listener Configuration" and go next.[3]Go next.[4]Set Listner's name. Input any one you like.[5]This example goes next with keeping default "TCP".[6]Set a port. This example goes next with keeping default.[7]If you'd like to create more Listeners, Answer "Yes". This example selects "No".[8]Configuration completed.[9]Click "Finish" to quit. After finishing, Confirm the status by "netstat" comand. Then you'll see "tnslsnr" listens 1521 port.
Create a Database.
[1]Login with the "oracle" user and input a command "dbca" like follows.[oracle@db01 ~]$ dbca[2]Click "Next" to proceed.[3]Select "Create Database" and go next.[4]This example selects "General Purpose ***" and go next.[5]Set Grobal Database name and SID like follows. Input any one you like.[6]This example goes next with keeping default.[7]Set passwords. Please set a password for a user for security.[8]This example goes next with keeping default "File System".[9]Configure recovery settings. If you'd like to change it, Set it.[10]Configure sample schema and scripts. If you'd like to add them, Set them.[11]Configure memory settings. After setting, go to next tab.[12]Specify max processes.[13]Set Character setting.[14]Select a connection mode. If your server does not have many clients, Select Dedicated server mode. If your server has many clients, Select Shared server mode.[15]Confirm parameters for Storage settings. If you'd like to change, set them.[16]Configuration completed. Click "Finish" button to finish.[17]Confirm settings and Click "OK" if all are OK.[18]Database creation starts.[19]After completing to create a database, Click "Exit" to finish.[20]Access to the URL that is shown on finished screen above with web browser, then follwing screen is shown. Input a user name and password that you configured on the section [6].[21]Just logined. It's possible to manage the database on here.
Create an init Script to make Oracle start automatically on system booting.
[1]Set environment variables for "oracle" user like follows.[oracle@db01 ~]$vi /etc/oratab
# end line: change
db01:/usr/oracle/app/product/11.2.0/dbhome_1:
Y
[oracle@db01 ~]$vi ~/.bash_profile
# add follows to the end
export ORACLE_SID=db01
[2]Create an init Script with the root user.[root@db01 ~]#vi /etc/rc.d/init.d/oracle
# it's an example, edit it you like.
#!/bin/bash# oracle: Start/Stop Oracle Database 11g R2## chkconfig: 345 90 10# description: The Oracle Database is an Object-Relational Database Management System.## processname: oracle. /etc/rc.d/init.d/functionsLOCKFILE=/var/lock/subsys/oracleORACLE_HOME=/usr/oracle/app/product/11.2.0/dbhome_1ORACLE_USER=oraclecase "$1" in'start') if [ -f $LOCKFILE ]; then echo $0 already running. exit 1 fi echo -n $"Starting Oracle Database:" su - $ORACLE_USER -c "$ORACLE_HOME/bin/lsnrctl start" su - $ORACLE_USER -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME" su - $ORACLE_USER -c "$ORACLE_HOME/bin/emctl start dbconsole" touch $LOCKFILE ;;'stop') if [ ! -f $LOCKFILE ]; then echo $0 already stopping. exit 1 fi echo -n $"Stopping Oracle Database:" su - $ORACLE_USER -c "$ORACLE_HOME/bin/lsnrctl stop" su - $ORACLE_USER -c "$ORACLE_HOME/bin/dbshut" su - $ORACLE_USER -c "$ORACLE_HOME/bin/emctl stop dbconsole" rm -f $LOCKFILE ;;'restart') $0 stop $0 start ;;'status') if [ -f $LOCKFILE ]; then echo $0 started. else echo $0 stopped. fi ;;*) echo "Usage: $0 [start|stop|status]" exit 1esacexit 0
[root@db01 ~]#chkconfig --add oracle
[root@db01 ~]#chkconfig oracle on
0 1
- Centos 6 Oracle 11G 超详细安装
- Centos 5 Oracle 11G 超详细安装
- Oracle 11g的超详细安装教程
- Centos 6 Oracle 12C 超详细安装
- centos 6 安装oracle 11g 要点
- 安装64位Oracle 10g超详细教程
- OEL5.5(64bit)安装Oracle 11g R2 RAC教程(图文并茂超详细) 2
- Centos 7 Oracle 12C 超详细安装
- CentOS 6.5 安装 Oracle 11gR2——超详细,一气呵成
- CentOS 6.3 32位静默安装Oracle 11g r2详细教程
- CentOS 6.3 32位静默安装Oracle 11g r2详细教程
- Oracle 11g r2 linux centos 6.5 安装配置教程(多图超详细)
- CentOS 6.3 32位静默安装Oracle 11g r2详细教程
- CentOS 6.7 静默安装Oracle 11g R2 详细操作总结
- CentOS 5下安装Oracle 11g
- CentOS 5下安装Oracle 11g
- CentOS 5下安装Oracle 11g
- linux CentOS 安装 oracle 11g
- 判断整数序列是不是二元查找树的后序遍历结果
- 在jsp页面page指令中pageEncoding怎么设置默认编码方式为utf-8?
- C# 委托 delegate
- centos7安装oracle12c
- 屏幕发生变化,重新请求页面
- Centos 6 Oracle 11G 超详细安装
- Canvas——认识CreateJs库
- windows核心编程第三章
- java经典编程300例
- Unix中 &0 &1 &2 $# 啥意思
- javascript复习第二天经典灯泡开关案例
- HDU3549Dinic
- js--笔试题1
- android广播(内部类)使用