Chinaunix首页 | 论坛 | 博客
  • 博客访问: 664804
  • 博文数量: 168
  • 博客积分: 2928
  • 博客等级: 中校
  • 技术积分: 1904
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-04 09:56
文章分类

全部博文(168)

文章存档

2010年(168)

我的朋友

分类: Oracle

2010-04-12 23:18:53

 

一 Linux系统安装: RedHat Linux  2.6.18-92.el5

二、配置ip、主机名

静态网络的配置:

Vi /etc/sysconfig/network- scripts/ifcfg-lo

添加:BOOTPROTO=static

 

三、安装VNC

四 、安装ORACLE 10g数据库

1, vi/etc/sysctl.conf 文件

kernel.shmall = 262144  (1G: 1*1024*1024*1024/4096=262144 块的概念总内存)

kernel.shmmax = 536870912  (512Mb: 512*1024*1024物理内存一半)

kernel.shmmni = 4096

 

添加以下参数(如果没有的话)

# semaphores: semmsl, semmns, semopm, semmnikernel.sem = 250 32000 100 128

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

 

运行下面命令使设置生效/sbin/sysctl p

 

2,vi /etc/security/limits.conf 文件

* soft nproc 2047

* hard nproc 16384

* soft nofile 1024

* hard nofile 65536

 

3,解压安装文件

# zcat 10201_database_linux_x86_64.cpio.gz |cpio –idmv

 

4,vi /etc/selinux/config 文件

SELINUX=disabled

 

5,建立oracle用户和组

groupadd dba

useradd –g dba oracle

passwd oracle

 

6, 建立相应的目录

/mc/oracle/

mkdir –p /mc/oracle

chown –R oracle:dba /mc/oracle

chmod –R 775 /mc/oracle

 

7, 编辑/etc/redhat-release

vi /etc/redhat-release

Red Hat Enterprise Linux Server release 5 (Tikanga) redhat-4 替换

 

8, 登陆oracle 建立相应的环境变量

su - oracle

vi ~/.bash_profile

# Oracle Settings

umask 022

LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib

ORACLE_BASE=/mc/oracle

ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1

ORACLE_SID=mcerp

PATH=$ORACLE_HOME/bin:$PATH:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin

export PATH LD_LIBRARY_PATH

export ORACLE_BASE ORACLE_HOME ORACLE_SID

export LASSPATH=$ORACLE_HOME/JREORACLE_HOME/jlibORACLE_HOME/rdbms/jlib

export LANG=AMRICAN

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK

 

9,运行以下三个脚本,检测通过再继续

1_zb_10gR2_check_net.sh

2_zb_10gR2_check_disk_pkg.sh

3_zb_10gR2_check_kernel.sh

 

10,设置显示

DISPLAY=:0.0; export DISPLAY

第一个0ip地址,第二个0是进入的端口,例如5801,就是1,如果服务器上安装就是0

#xhost +

$export DISPLAY=192.168.254.98:2

$xclock

 

附录:

1_zb_10gR2_check_net.sh

#!/bin/bash

check_net_card()

{

export basepp=`pwd`

export base_home=$basepp/base_home

if ! test -d ${base_home}

then

         mkdir ${base_home}

         if ! test -d ${base_home}/tmp

         then

                   mkdir ${base_home}/tmp

         fi

fi

#define function temp file name,use to save net card name

export f_base_ifcfg_tmp=$base_home/tmp/f_base_ifcfg.tmp

if ! test -f $f_base_ifcfg_tmp

then

         echo > $f_base_ifcfg_tmp

fi

#There are a few pieces of net card check system

f_base()

{

         ls /etc/sysconfig/network-scripts/ifcfg-* > ${f_base_ifcfg_tmp}

for ifcfg_name in $(cat ${f_base_ifcfg_tmp})

         do

         echo " "

         basename $ifcfg_name

         echo "+--------------------------------------"

         echo "|${ifcfg_name}"

         cat ${ifcfg_name}

 

done

}

f_base

 

rm -rf ${base_home}

echo ""

echo "example ifcfg-eth0"

echo "+--------------------------------------"

echo "******************************"

echo "* DEVICE=eth0                *"

echo "* BOOTPROTO=static           *"

echo "* HWADDR=00:0c:29:a7:21:94   *"

echo "* ONBOOT=yes                 *"

echo "* NETMASK=255.255.255.0      *"

echo "* IPADDR=192.168.254.99      *"

echo "* GATEWAY=192.168.254.254    *"

echo "* TYPE=Ethernet              *"

echo "******************************"

}

 

check_host_name()

{

echo " "

hst_name=`hostname`

echo "HOSTNAME: ${hst_name}"

echo "+----------------------------------"

echo "|/etc/sysconfig/network"

cat /etc/sysconfig/network

 

echo ""

echo "example HostName /etc/sysconfig/network"

echo "+--------------------------------"

echo "***********************"

echo "* NETWORKING=yes      *"

echo "* NETWORKING_IPV6=no  *"

echo "* HOSTNAME=simply.com *"

echo "***********************"

}

 

check_dns()

{

echo "Name Server"

echo "+----------------------------------"

echo "|/etc/resolv.conf"

cat /etc/resolv.conf

 

echo ""

echo "example Name Server /etc/resolv.conf"

echo "+--------------------------------"

echo "*********************************"

echo "* nameserver 192.168.254.43     *"

echo "* search localdomain            *"

echo "*********************************"

}

 

check_hosts()

{

echo "Hosts"

echo "+----------------------------------"

echo "|/etc/hosts"

cat /etc/hosts

 

echo ""

echo "example Hosts /etc/hosts"

echo "+--------------------------------"

echo "*******************************************************"

echo "* 127.0.0.1    localhost.localdomain      localhost   *"

echo "* ::1     localhost6.localdomain6         localhost6  *"

echo "* 192.168.254.99    simply.com            simply      *"

echo "*******************************************************"

 

}

 

restart_network()

{

echo -n "Are U restart network service (Y/N):"

read pin

case $pin in

        Y|y|yes|YES|Yes )

                   /etc/init.d/network restart ;;

        N|n|NO|no )  ;;

        *)

                echo "error" ;;

esac

}

 

check_net_card

echo " "

check_host_name

echo " "

check_dns

echo " "

check_hosts

echo " "

 

2_zb_10gR2_check_disk_pkg.sh

#!/bin/bash

echo "Physical RAM must be greater than 512 MB (524288 KB) "

grep MemTotal /proc/meminfo

echo ""

 

echo "Swap space must be greater than 1 GB (1048576 KB) or twice the size of RAM"

echo "On systems with 2 GB or more of RAM, the swap space can be between one and two times the size of RAM "

grep SwapTotal /proc/meminfo

echo ""

 

echo "Disk space in /tmp must be greater than 400 MB (409600 KB) "

df -hl /tmp

echo ""

 

echo "Disk space for software files  2.5 GB (2621440 KB) and"

echo "Disk space for database files  1.2 GB (1258290 KB) "

df -hl

echo ""

 

echo "OS:"

cat /etc/issue

echo ""

 

echo "Required packages:"

echo "Min: gcc-3.2.3-2"

rpm -q gcc

echo ""

echo "Min: make-3.79"

rpm -q make

echo ""

echo "Min: binutils-2.11"

rpm -q binutils

echo ""

echo "Min: openmotif-2.2.2-16"

rpm -q openmotif

echo ""

echo "Min: setarch-1.3-1"

rpm -q setarch

echo ""

echo "Min: compat-db-4.0.14.5"

rpm -q compat-db

echo ""

echo "Min: compat-gcc-7.3-2.96.122"

rpm -q compat-gcc-34

echo ""

echo "Min: compat-gcc-c++-7.3-2.96.122"

rpm -q compat-gcc-34-c++

echo ""

echo "Min: compat-libstdc++-7.3-2.96.122"

rpm -q compat-libstdc++-33

echo ""

echo "Min: compat-libstdc++-devel-7.3-2.96.122"

rpm -q compat-libstdc++-296

echo ""

echo "Min: libXp-1.0.0-8.1.el5"

rpm -q libXp

 

#rpm -ivh compat-db-4.2.52-5.1.i386.rpm

#rpm -ivh compat-gcc-34-3.4.6-4.i386.rpm

#rpm -ivh compat-gcc-34-c++-3.4.6-4.i386.rpm

#rpm -ivh libXp-1.0.0-8.1.el5.i386.rpm

#rpm -ivh openmotif-2.3.0-0.5.el5.i386.rpm

 

3_zb_10gR2_check_kernel.sh

#!/bin/bash

echo  "+------------------------------------------------"

echo  "|/proc/sys/kernel/sem "

echo  "|semmsl 250 "

echo  "|semmns 32000 "

echo  "|semopm  100 "

echo  "|semmni 128 "

/sbin/sysctl -a | grep sem

echo  ""

echo  "|/proc/sys/kernel/shmall  "

echo  "|shmall  2097152 "

/sbin/sysctl -a | grep shmall

echo  ""

 

echo  "|/proc/sys/kernel/shmmax  "

echo  "|shmmax  Half the size of physical memory"

echo  "|4Gmemery: shmmax=1*1024*1024/4=524288"

/sbin/sysctl -a | grep shmmax

echo  "|physical memory total:"

grep MemTotal /proc/meminfo

echo  ""

echo  "|/proc/sys/kernel/shmmni  "

echo  "|shmmni  4096  "

/sbin/sysctl -a | grep shmmni

echo  ""

 

echo  "|/proc/sys/fs/file-max  "

echo  "|file-max  65536  "

/sbin/sysctl -a | grep file-max

echo  ""

echo  "|/proc/sys/net/ipv4/ip_local_port_range  "

echo  "|ip_local_port_range  1024 65000  "

/sbin/sysctl -a | grep ip_local_port_range

echo ""

echo "|/etc/sysctl.conf"

echo "+---------------------------------"

echo "| net.core.rmem_default=262144 "

echo "| net.core.rmem_max=262144 "

echo "| net.core.wmem_default=262144 "

echo "| net.core.wmem_max=262144 "

echo ""

echo  ""

echo "+----------------------------------"

echo "|/sbin/sysctl -p"

/sbin/sysctl -p

echo ""

 

echo "+----------------------------------"

echo "|Setting Limits for the Maximum Number of Open File Descriptors for the Oracle User"

echo "|* soft nproc 2047"

echo "|* hard nproc 16384"

echo "|* soft nofile 1024"

echo "|* hard nofile 65536"

echo "|/etc/security/limits.conf"

sed -e /^#/d /etc/security/limits.conf |sed -e /^$/d

阅读(848) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~