当前位置:文档之家› oracle 11g安装配置文档

oracle 11g安装配置文档

第一部分
虚拟机配置
1,内存>2G
网络选择桥接
2,磁盘>40G
3,虚拟机网络与主机名配置
1),虚拟机网卡配置
vi /etc/sysconfig/network-scripts/ifcfg-eth0

ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.100.101
NETMASK=255.255.255.0
GATEWAY=192.168.100.1

保存退出之后,重启网络服务
service network restart;

2),设置主机名
vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=https://www.doczj.com/doc/ce5319242.html,

保存退出

3),编辑/etc/hosts
在该文件最后添加一行
192.168.100.101 ora11g https://www.doczj.com/doc/ce5319242.html,

保存退出



4,关闭防火墙和selinux
service iptables stop
chkconfig iptables off

cat /etc/selinux/config

# This filecontrols the state of SELinux on the system.
# SELINUX= cantake one of these three values:
# enforcing - SELinux security policy isenforced.
# permissive - SELinux prints warningsinstead of enforcing.
# disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE=can take one of these two values:
# targeted - Targeted processes areprotected,
# mls - Multi Level Security protection.
SELINUXTYPE=targeted

[5,操作系统版本及内核检查]
[root@ora11g etc]# cat /proc/version
Linux version 2.6.32-358.el6.x86_64 (mockbuild@https://www.doczj.com/doc/ce5319242.html,) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-3) (GCC) ) #1 SMP Tue Jan 29 11:47:41 EST 2013
[root@ora11g etc]# lsb_release -id
Distributor ID: RedHatEnterpriseServer
Description: Red Hat Enterprise Linux Server release 6.4 (Santiago)

6,空间检查
内存检查
[root@ora11g proc]# head -n 1 /proc/meminfo
MemTotal: 2046780 kB
交换分区检查
[root@ora11g proc]# grep 'SwapTotal' /proc/meminfo
SwapTotal: 4095992 kB
共享内存检查
[root@ora11g proc]# df -Th /dev/shm
Filesystem Type Size Used Avail Use% Mounted on
tmpfs tmpfs 1000M 224K 1000M 1% /dev/shm

7,rpm检查
unset uninstall_rpm;for i in binutils compat-libstdc++-33 \
elfutils-libelf elfutils-libelf-devel elfutils-libelf-devel-static \
gcc gcc-c++ glibc glibc-devel glibc glibc-headers kernel-headers \
ksh libaio libaio-devel libgcc libgomp libstdc++ libstdc++-devel \
make sysstat unixODBC unixODBC-devel;do rpm -q $i &>/dev/null || uninstall_rpm="$uninstall_rpm $i";\
done ;[[ -z "$uninstall_rpm" ]] && echo -e "\nuninstall_rpm:\n\tOK.OK.OK" || \
echo -e "\nuninstall_rpm:\n\t$uninstall_rpm"

8,内核参数调整
vi /etc/sysctl.conf
在该文件最后添加如下内容
fs.aio-max-nr = 1048576
fs.file-max = 6815744
kernel.shmall = 2097152
kernel.shmmax = 4294967295
kernel.shmmni = 4096
kernel.sem = 250 32000 100 128
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 262144
net.core.rmem_max = 4194304
net.core.wmem_default = 262144
net.core.wmem_max = 1048586

保存退出

然后执行sysctl -p

9,建立

用户组
[root@ora11g etc]# groupadd -g 1000 oinstall
[root@ora11g etc]# groupadd -g 1001 dba
[root@ora11g etc]# useradd -u 1000 -g oinstall -G dba oracle
[root@ora11g etc]# passwd oracle

10,创建相应的目录
[root@ora11g etc]# mkdir -p /u01/oracle
[root@ora11g etc]# chown -R oracle:oinstall /u01/
[root@ora11g etc]# cd
[root@ora11g ~]# su - oracle
[oracle@ora11g ~]$ cd /u01
[oracle@ora11g u01]$ ls -lrt

11,环境变量设置
su - oracle
vi .bash_profile/.bashrc
export ORACLE_BASE=/u01/oracle
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0
export ORACLE_SID=ora11g
export PATH=$PATH:$HOME/bin:$ORACLE_HOME/bin

保存退出
并执行source .bash_profile 使其生效。

12,资源限制设置
su

vi /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 10240

保存退出


grep 'limit' /etc/pam.d/system-auth
session required pam_limits.so

若没有
vi /etc/pam.d/login 添加以下内容
session required pam_limits.so

13,上传并解压安装文件
将db_112040_Linux-x86-64_1of7.zip
db_112040_Linux-x86-64_2of7.zip
拖拽到虚拟机中,然后,将其mv到/u01.
用unzip命令解压。
解压完成之后,修改宿主
chown -R oracle:oinstall database/

xhost +
su - oracle
cd /u01/database
./runInstaller


14,安装db软件

15,创建监听
netca

16,DBCA建库
ddbca

修改sql登陆提示符
vi $ORACLE_HOME/sqlplus/admin/glogin.sql;
在该文件最后,添加如下内容:
set sqlprompt "_user'@'_connect_identifier> "


安装过程中出现的问题:
1,node name
/etc/hosts
/etc/sysconfig/network


2,rpm

3,数据库名称













相关主题
文本预览
相关文档 最新文档