安装环境
系统要求
- Linux安装Oracle系统要求
系统要求 |
说明 |
内存 |
必须高于1G的物理内存 |
交换空间 |
一般为内存的2倍,例如:1G的内存可以设置swap 分区为3G大小 |
硬盘 |
5G以上 |
oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 |
session required /lib/security/pam_limits.so session required pam_limits.so |
fs.file-max = 6815744 fs.aio-max-nr = 1048576 kernel.shmall = 2097152 kernel.shmmax = 2147483648 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 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 |
linux:~ # sysctl -p
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.conf.all.rp_filter = 1
fs.file-max = 6815744
fs.aio-max-nr = 1048576
kernel.shmall = 2097152
kernel.shmmax = 2147483648
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
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 |
if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi |
创建用户,输入命令:
groupadd oinstall
groupadd dba 创建Oracle用户和密码,输入命令:
useradd -g oinstall -g dba -m oracle
passwd oracle
然后会让你输入密码,密码任意输入2次,但必须保持一致,回车确认 |
输入命令:
mkdir /home/oracle/app
mkdir /home/oracle/app/oracle
mkdir /home/oracle/app/oradata
mkdir /home/oracle/app/oracle/ product |
chown -R oracle:oinstall /home/oracle/app |
umask 022
export ORACLE_BASE=/home/oracle/app
export ORACLE_HOME=$ORACLE_BASE/oracle/product/11.2.0/dbhome_1
export ORACLE_SID=orcl
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/usr/lib |
安装过程
输入命令:
unzip linux.x64_11gR2_database_1of2.zip
unzip linux.x64_11gR2_database_2of2.zip |
输入命令:
cd database |
su – root
cd /home/oracle/app/oracle/product/11.2.0/dbhome_1
sh root.sh
cd /home/oracle/app/oraInventory
sh orainstRoot.sh |
数据库建库
配置监听及本地网络服务
(转发请注明出处:http://www.cnblogs.com/zhangyongli2011/ 如发现有错,请留言 谢谢)