不会健身的程序员
不是好作家

oracle11g安装

安装准备

下载

  1. oracle下载
    360云盘
  2. 在服务器上创建上传路径,授权
    [root@temp ~]# mkdir /soft
    [root@temp ~]# chmod 775 -R /soft
    [root@temp ~]#
  3. 上传安装文件到/soft下
  4. 解压
    cd /soft
    unzip linux.x64_11gR2_database_1of2.zip
    unzip linux.x64_11gR2_database_2of2.zip

设置网卡静态IP

方法查看

设置系统字符编码(UTF8–>GBK)

修改文件vi /etc/sysconfig/i18n 替换成

LANG="zh_CN.GB18030"
LANGUAGE="zh_CN.GB18030:zh_CN.GB2312:zh_CN"
SUPPORTED="zh_CN.GB18030:zh_CN:zh:en_US.UTF-8:en_US:en"
SYSFONT="lat0-sun16"

关闭selinux

  1. 查看selinux状态
    [root@temp soft]# sestatus
    SELinux status:                 disabled
    [root@temp soft]#
  2. 临时关闭selinux
    [root@temp soft]# setenforce 0
    setenforce: SELinux is disabled
    [root@temp soft]#
  3. 永久关闭selinux

    修改/etc/selinux/config文件中设置SELINUX=disabled ,然后重启服务器。

关闭iptables

  1. 查看防火墙状态
    [root@temp soft]# service iptables status
    Firewall is stopped.
    [root@temp soft]#
  2. 临时关闭防火墙
    [root@temp soft]# service iptables stop
    [root@temp soft]#
  3. 永久关闭防火墙
    [root@temp soft]# chkconfig --level 2345 iptables off
    [root@temp soft]#

设置sysctl.conf

编辑sysctl.conf

vi /etc/sysctl.conf

在后面加入 for RedHat5:

kernel.sem = 500 64000 100 128
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 5000
net.core.netdev_max_backlog = 2000
net.core.somaxconn = 256
net.ipv4.tcp_max_syn_backlog = 2048
net.ipv4.tcp_retries2 = 5
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_keepalive_probes = 3
net.ipv4.tcp_keepalive_time = 1800
net.ipv4.ip_local_port_range = 1024 65000
net.core.rmem_default = 8092000
net.core.rmem_max = 8092000
net.core.wmem_default = 873200
net.core.wmem_max = 873200
fs.file-max = 65536

for Oracle 11gR2:

kernel.sem = 500 64000 100 128
net.ipv4.tcp_tw_reuse = 1
net.ipv4.tcp_tw_recycle = 1
net.ipv4.tcp_fin_timeout = 30
net.ipv4.tcp_keepalive_time = 1200
net.ipv4.tcp_max_syn_backlog = 8192
net.ipv4.tcp_max_tw_buckets = 5000
net.core.netdev_max_backlog = 2000
net.core.somaxconn = 256
net.ipv4.tcp_max_syn_backlog = 2048
net.ipv4.tcp_retries2 = 5
net.ipv4.tcp_keepalive_intvl = 30
net.ipv4.tcp_keepalive_probes = 3
net.ipv4.tcp_keepalive_time = 1800
net.ipv4.ip_local_port_range = 9000 65500
net.core.rmem_default = 8092000
net.core.rmem_max = 8092000
net.core.wmem_default = 873200
net.core.wmem_max = 1048576
fs.file-max = 6815744
fs.aio-max-nr=1048576

for RedHat 4

net.ipv4.tcp_syncookies = 1
kernel.msgmnb = 65536
kernel.msgmax = 65536
kernel.shmall = 262144
kernel.shmmax = 644245095
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 = 262144
net.core.rmem_max = 262144
net.core.wmem_default = 262144
net.core.wmem_max = 262144

执行下面命令使其生效

sysctl -p

修改系统资源使用限额

设置参数 # vi /etc/security/limit.conf 末行添加以下内容

*  soft nproc 8192
*  hard nproc 16384
*  soft nofile 10240
*  hard nofile 65536

使其限额资源生效

修改文件vi /etc/pam.d/login末行添加一下内容

session required /lib/security/pam_limits.so

64位系统则加入

session required /lib64/security/pam_limits.so

安装必须的包

  1. 挂载安装盘
    mount /dev/cdrom /mnt/
  2. 在cd /mnt/CentOS/(我的是centos,redhad的话是cd /mnt/Server)下执行
    rpm -Uvh setarch-2*
    rpm -Uvh make-3*
    rpm -Uvh glibc-2*
    rpm -Uvh libaio-0*
    rpm -Uvh compat-libstdc++-33-3*
    rpm -Uvh compat-gcc-34-3*
    rpm -Uvh compat-gcc-34-c++-3*
    rpm -Uvh gcc-4*
    rpm -Uvh libXp-1*
    rpm -Uvh openmotif-2*
    rpm -Uvh compat-db-4*
  3. 11gR2需要额外安装
    rpm -Uvh libaio-devel-0.3.106-5.*
    rpm -Uvh unixODBC-2*
    rpm -Uvh unixODBC-devel-2*

修改操作系统版本(10g安装需要)

修改redhat版本,Oracle 10g 默认只能支持到redhat-4这个版本

[root@oaapp ~]# vi /etc/redhat-release
redhat-4

(注:装完系统改回原来的发布版本号)

添加oracle用户和组

groupadd oinstall
groupadd dba
useradd  -g oinstall -G dba oracle
id oracle
passwd oracle

创建oracle安装目录和数据库目录

mkdir -p /dbdata
mkdir -p /u01/app/oracle
chmod -R 777  /dbdata
chown -R oracle.oinstall /u01/app/oracle
chmod -R 775 /u01/app/oracle

修改oracle环境变量

vi /home/oracle/./bash_profile

添加

# Oracle Settings
TMP=/tmp; export TMP
TMPDIR=$TMP; export TMPDIR
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1; export ORACLE_HOME
ORACLE_SID=orcl; export ORACLE_SID
ORACLE_TERM=xterm; export ORACLE_TERM
PATH=$PATH:$ORACLE_HOME/bin; export PATH
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib;export LD_LIBRARY_PATH
CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH

if [ $USER = "oracle" ]; then
if [ $SHELL = "/bin/ksh" ]; then
ulimit -p 16384
ulimit -n 65536
else
ulimit -u 16384 -n 65536
fi
#umask 022
fi

授权给解压文件

chmod 775 -R /soft/database/
chown oracle:oinstall -R /soft/database/

开启图形界面

详细方法可以查看 在图形界面中操作

xhost +
su - oracle
unset LANG
cd /soft/database

image

开始安装

./runinstaller
赞(0)
转载请注明出处:林俊龙博客 » oracle11g安装

评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

年年岁岁花相识,岁岁年年人不同

给我留言网站地图

谢主隆恩

支付宝扫一扫打赏

微信扫一扫打赏