oracle安装

1.下载oracle database
http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html
2.oracle 10g/11g官方文档
3.oracle开发和管理工具
plsql developer---window系统
toad for oracle
4.安装oracle
(1)系统版本
建议安装oracle11g,memory>3GB,swap=2倍memory,
[root@ora243 share]# df -lh
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             9.7G  6.9G  2.4G  75% /
/dev/sda5              43G  180M   41G   1% /u01
/dev/sda1             190M   13M  168M   7% /boot
tmpfs                 1.6G     0  1.6G   0% /dev/shm
[root@ora243 ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 5.7 (Tikanga)
[root@ora243 ~]# uname -a
Linux ora243 2.6.18-274.el5 #1 SMP Mon Jul 25 13:17:49 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
[root@ora243 ~]# ifconfig 
eth0      Link encap:Ethernet  HWaddr 08:00:27:B8:18:2A  
          inet addr:10.10.54.243  Bcast:10.10.54.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:5865 errors:0 dropped:0 overruns:0 frame:0
          TX packets:421 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:461417 (450.6 KiB)  TX bytes:52639 (51.4 KiB)
(2)创建oracle用户和用户组
[root@ora243 ~]# groupadd oinstall
[root@ora243 ~]# groupadd dba
[root@ora243 ~]# groupadd oper
[root@ora243 ~]# groupadd asmadmin
[root@ora243 ~]# useradd -g oinstall -G dba,oper,asmadmin oracle
[root@ora243 ~]# echo "oracle"|passwd --stdin oracle

(3)解压缩oracle软件包
[root@ora243 share]# unzip linux.x64_11gR2_database_1of2.zip 
[root@ora243 share]# unzip linux.x64_11gR2_database_2of2.zip

5.安装oracle数据库的依赖包
yum install -y oracle-validated.x86_64   ---软件包依赖,系统内核参数,limits.conf

[root@ora243 dbs]# sysctl -p
net.ipv4.ip_forward = 0
net.ipv4.conf.default.rp_filter = 2
net.ipv4.conf.default.accept_source_route = 0
kernel.sysrq = 0
kernel.core_uses_pid = 1
net.ipv4.tcp_syncookies = 1
fs.file-max = 6815744
kernel.msgmni = 2878
kernel.msgmax = 8192
kernel.msgmnb = 65536
kernel.sem = 250 32000 100 142
kernel.shmmni = 4096
kernel.shmall = 1073741824
kernel.shmmax = 4398046511104
kernel.sysrq = 1
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048576
fs.aio-max-nr = 3145728
net.ipv4.ip_local_port_range = 9000 65500
vm.min_free_kbytes = 51200

 vim /etc/security/limits.conf
# Oracle-Validated setting for nofile soft limit is 131072
oracle   soft   nofile    131072

# Oracle-Validated setting for nofile hard limit is 131072
oracle   hard   nofile    131072

# Oracle-Validated setting for nproc soft limit is 131072
oracle   soft   nproc    131072

# Oracle-Validated setting for nproc hard limit is 131072
oracle   hard   nproc    131072

# Oracle-Validated setting for core soft limit is unlimited
oracle   soft   core    unlimited

# Oracle-Validated setting for core hard limit is unlimited
oracle   hard   core    unlimited

# Oracle-Validated setting for memlock soft limit is 50000000
oracle   soft   memlock    50000000

# Oracle-Validated setting for memlock hard limit is 50000000
oracle   hard   memlock    50000000
6.创建目录
[root@ora243 share]# mkdir -p /u01/app/oracle
[root@ora243 share]# chown oracle.oinstall /u01/app/oracle/ -R

7,远程登录调用图形界面
[tech@tech:~$ ssh -X [email protected]
指定oracle环境变量
vi ~/.bash_profile
export ORACLE_BASE=/u01/app/oracle
export ORACLE_HOME=$ORACLE_BASE/11.2.0/db_1
export ORACLE_SID=orcl
PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export PATH

//验证环境变量生效
[oracle@ora243 ~]$ export |grep ORACLE_SID
declare -x ORACLE_SID="orcl"
[oracle@ora243 ~]$ export |grep ORACLE_BASE
declare -x ORACLE_BASE="/u01/app/oracle"
[oracle@ora243 ~]$ export |grep ORACLE_HOME
declare -x ORACLE_HOME="/u01/app/oracle/11.2.0/db_1"

oracle安装
sh /soft/database/runInstaller 
//soft为oracle解压缩目录
oracle登录
https://10.10.54.243:1158/em/console/logon/logon
emctl start dbconsole

orcale卸载
cd $ORCALE_HOME/11.2.0/db_1/deinstall

管理员帐号
sys

oracle启动过程
nomount -->mount-->open

1,20:19:07 SYS@ssr > startup nomount;
startup nomount;
ORACLE instance started.

2,20:21:27 SYS@ssr > alter database mount;
alter database mount;

Database altered.
3,20:22:26 SYS@ssr > alter database open;
alter database open;

Database altered.
20:22:24 SYS@ssr > select * from v$controlfile;



你可能感兴趣的:(oracle安装)