安装用户debian7安装oracle11g

改章节笔者在北京游玩的时候突然想到的...这几周就有想写几篇关于安装用户的笔记,所以回家到之后就奋笔疾书的写出来发表了

    apt-get install gcc g++  make binutils libc6 libc6-dev libstdc++6 libstdc++5 rpm gawk alien ksh  lesstif2 libaio1 linux-headers elfutils libaio-dev sysstat unixodbc-bin unixodbc-dev pdksh

    groupadd oinstall

    

    groupadd dba

    

    useradd oracle -m -d /home/oracle -g oinstall -G dba -s /bin/bash

    

    passwd oracle

    


    

3,检查安装环境,此处直接写成了一个小脚本

    echo "sem: ";echo "min 250 32000 100 128"; echo "is " `cat /proc/sys/kernel/sem`; echo; \
echo "shmall: ";echo "min 2097152"; echo "is " `cat /proc/sys/kernel/shmall`; echo; \
echo "shmmax - should be able to hold the SGA - max 4G-1byte: ";echo "is " `cat /proc/sys/kernel/shmmax`; echo; \
echo "shmmni: ";echo "min 4096"; echo "is " `cat /proc/sys/kernel/shmmni`; echo; \
echo "file-max: ";echo "min 6815744"; echo "is " `cat /proc/sys/fs/file-max`; echo; \
echo "ip_local_port_range: ";echo "min/max 9000  65500"; echo "is     " `cat /proc/sys/net/ipv4/ip_local_port_range`; echo; \
echo "rmem_default: ";echo "min 262144"; echo "is " `cat /proc/sys/net/core/rmem_default`; echo; \
echo "rmem_max: ";echo "min 4194304"; echo "is " `cat /proc/sys/net/core/rmem_max`; echo; \
echo "wmem_default: ";echo "min 262144"; echo "is " `cat /proc/sys/net/core/wmem_default`; echo; \
echo "wmem_max: ";echo "min 1048576"; echo "is " `cat /proc/sys/net/core/wmem_max`; echo; \

    

echo "aio-max-nr: ";echo "max 1048576"; echo "is " `cat /proc/sys/fs/aio-max-nr`; echo;

    


    

 

    

4,检查必须的参数

    

echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf

    echo "kernel.shmall = 2097152" >> /etc/sysctl.conf
# !!!! needs to fit YOUR SGA (=main memory for database, be sure to have enough ram for PGA etc.)!!!!
echo "kernel.shmmax = 1200000000" >> /etc/sysctl.conf
#echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
echo "fs.file-max = 6815744" >> /etc/sysctl.conf
#echo "net.ipv4.ip_local_port_range = 1024 65000" >> /etc/sysctl.conf
echo "net.core.rmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.rmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.rmem_max = 4194304" >> /etc/sysctl.conf
echo "net.core.wmem_default = 262144" >> /etc/sysctl.conf
echo "net.core.wmem_max = 1048576" >> /etc/sysctl.conf

    

echo "fs.aio-max-nr = 1048576" >> /etc/sysctl.conf

    


    

 
    每日一道理
闷热的天,蝉儿耐不住寂寞地不停在鸣叫,我孤单一人,寂静的身旁没有一个知音,想疯狂地听摇滚乐,听歇斯底里的歌声,那只为逃避无人的世界里那浓烈的孤单气息。一个人是清冷,两个人便是精彩,于是,莫名的冲动让我格外想念旧日的好友,怀念过去的日子,尽管不够现实的遐想追回不了曾经一切,但却希望思绪可以飞扬于闭上双目后的世界中,印有微笑,印有舞动的身姿,翩翩起舞……

    

5,设置 limit

    

echo "oracle soft nproc 2047" >> /etc/security/limits.conf

    echo "oracle hard nproc 16384" >> /etc/security/limits.conf
echo "oracle soft nofile 1024" >> /etc/security/limits.conf

    

echo "oracle hard nofile 65536" >> /etc/security/limits.conf

    

echo "oracle soft stack 10240" >> /etc/security/limits.conf

    


    

6,建立安装目录,我的/datadisk空间最大,就放到这里面了

    

mkdir -p /datadisk/u01/app/oracle
mkdir -p /datadisk/u01/oradata
mkdir -p /datadisk/u01/flash_recovery_area
chown -R oracle:oinstall /datadisk/u01
chmod -R 775 /datadisk/u01/
避免犯错,添加如下链接目录
ln -s /usr/bin/awk /bin/awk
ln -s /usr/bin/basename /bin/basename

7,设置DISPLAY变量来显示GUI安装
     切换到你以后桌面登录的用户执行:xhost + ,此命令的意思是允许其它用户应用以后的桌面环境
     切换回oracle用户,export DISPLAY=:0 (debian7下是这样设置的),然后执行 xclock 看看效果

8,进行安装
./datadisk/oracle11g/database/runInstaller

9,安装过程当中碰到一些问题
      基本上都是一些链接的问题,用ln -s /usr/lib/xxxx.so  /lib64下基本上就OK了。看错误日志处理!

 

    


    


    


文章结束给大家分享下程序员的一些笑话语录: 问:你觉得让你女朋友(或者任何一个女的)从你和李彦宏之间选一个,你觉得她会选谁?  
  答:因为李艳红这种败类,所以我没女友!

--------------------------------- 原创文章 By
安装和用户
---------------------------------

posted @ 2013-05-25 14:46  xinyuyuanm  阅读(381)  评论(0编辑  收藏  举报