美文网首页
腾讯云 CENTOS6.9安装oracle11g

腾讯云 CENTOS6.9安装oracle11g

作者: zxz_e5d9 | 来源:发表于2019-05-28 09:41 被阅读0次

    一、主机名修改

    vi /etc/sysconfig/network

    NETWORKING=yes
    HOSTNAME=centos

    [oracle@centos ~]$ vi /etc/hosts
    127.0.0.1 centos centos
    127.0.0.1 localhost.localdomain localhost
    127.0.0.1 localhost4.localdomain4 localhost4

    ::1 centos centos
    ::1 localhost.localdomain localhost
    ::1 localhost6.localdomain6 localhost6

    二、修改系统标识

    vi /etc/redhat-release

    redhat-6

    三、准备用户和组

    groupadd oinstall

    groupadd dba

    useradd -g oinstall -G dba oracle

    上传oracle安装包到/home/oracle并解压到database目录

    四、创建oracle安装目录:

    mkdir -p /app/oracle/product/11.2.0/db_1

    chown -R oracle:oinstall /app
    chmod -R 755 /app/oracle
    chown -R oracle:oinstall /home/oracle

    五、设置环境变量
    su oracle
    vi .bash_profile

    注意一定也不要错:

    删除上面的最后两行PATH和export,然后添加一下内容保存:

    export EDITOR=vi

    export ORACLE_BASE=/app/oracle

    export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

    export PATH=PATH:ORACLE_HOME/bin

    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib:/usr/local/lib

    export CLASSPATH=ORACLE_HOME/JRE:ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib

    umask 022

    生效环境变量:source /home/oracle/.bash_profile

    Sync后重新启动机器:reboot

    六、修改用户限制

    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

    七、修改内核参数:

    vi /etc/sysctl.conf

    添加

    fs.aio-max-nr = 1048576

    fs.file-max = 6815744

    kernel.shmall = 2097152

    kernel.shmmax = 1073741824

    kernel.shmmni = 4096

    kernel.sem = 250 32000 100 128

    kernel.panic_on_oops = 1

    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

    八、创建交换分区

    dd if=/dev/zero of=/swapfile bs=1024k count=4096

    mkswap /swapfile

    swapon /swapfile

    vi /etc/fstab

    /swapfile swap swap defaults 0 0

    九、关于xhost + 的问题:

    1、yum whatprovides "*/xhost"

    yum -y install xorg-x11-server-utils-7.7-14.el6.x86_64

    2、安装vncserver :

    yum -y install tigervnc-server-1.1.0-24.el6.x86_64

    vncserver

    输出以下日志

    You will require a password to access your desktops.
    Password:
    Verify:
    xauth: file /root/.Xauthority does not exist

    New 'centos:1 (root)' desktop is centos:1

    xhost +

    输出以下日志
    access control disabled, clients can connect from any host

    退出用oracle登录,xclock成功

    十、安装依赖
    yum install libaio glibc compat-libstdc++-33 elfutils-libelf-devel libaio-devel libstdc++ unixODBC unixODBC-devel ksh

    十一、进入database目录运行 ./runInstaller
    期间如果有相应库依赖检查不通过的话,直接忽略就好

    十二、设置oracle sid
    export ORACLE_SID=ora10g

    十三、netca修改网络连接配置

    十四、关于12512错误
    在lisntener.ora中添加以下内容,重启lsnrctl stop, lsnrctl start

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = orcl)
    (SID_NAME = orcl)
    )
    )

    相关文章

      网友评论

          本文标题:腾讯云 CENTOS6.9安装oracle11g

          本文链接:https://www.haomeiwen.com/subject/soozbqtx.html