2018-1-3 第一节 安装系统redhat (redhat6.9) for oracle

redhat6.9  系统推送代码 for oracle

第一步:分区

# CLASSROOM MACHINE(c) NEED A DISK OF: 90000M  
cat >>  /tmp/partitioning <
第二步:系统配置

1、关闭防火墙:

查看防火墙状:

[root@station10 ~]# chkconfig --list iptables
iptables        0:off   1:off   2:on    3:on    4:on    5:on    6:off
立即关闭,并非永久关闭

[root@station10 ~]# service iptables stop
iptables: Setting chains to policy ACCEPT: filter          [  OK  ]
iptables: Flushing firewall rules:                         [  OK  ]
iptables: Unloading modules:                               [  OK  ]
永久关闭
 
  
[root@station10 ~]# chkconfig iptables off
2、配置网络:
[root@station10 ~]# vim /etc/sysconfig/network-scripts/ifcfg-eth0 
 
  
DEVICE=eth0  
BOOTPROTO=none  
ONBOOT=yes  
NETMASK=255.255.255.0  
IPADDR=XXX  
GATEWAY=192.168.0.254  
TYPE=Ethernet  
USERCTL=no  
IPV6INIT=no  
PEERDNS=yes 


 
  
3、挂载ISO文件
给ISO文件建立一个挂载点
[root@station10 /]# mkdir cd
[root@station10 /]#mount -o loop /stage/rhel-server-6.9-x86_64-dvd.iso  /cd
4、  配置yum源
配置本地文件源:
vim /etc/yum.repos.d/base.repo
配置163源:
 
  
在cd /etc/yum.repos.d下新建一个163.repo文件
root@station10 yum.repos.d]# vim /etc/yum.repos.d/163.repo
[root@localhost ~]# cd /etc/yum.repos.d/
[163]
name=163
baseurl=http://mirrors.163.com/centos/6.9/os/x86_64/
gpgcheck=0
enabled=1
这里要注意的是,baseurl这一项,你要到http://mirrors.163.com/centos这里,去找到你对应的redhat版本的目录,然后点os、再点x86_64(一般都有),然后用你地址栏上显示的网址替换上面的baseurl就行了,保存退出。
配置epel源
rpm -vih http://dl.fedoraproject.org/pub/epel/6/x86_64/Packages/e/epel-release-6-8.noarch.rpm  
 
  
5、补包:
#显示所有已经安装和可以安装的程序包
 
  
[root@station10 yum.repos.d]# yum list | grep oracleasm
 
  
# Install the pub keys  
rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-* 2>/dev/null  
 
yum -y groupinstall "Development tools"  
yum -y install libaio  
yum -y install libaio-devel  
    
yum -y install unixODBC  
yum -y install unixODBC-devel  

yum -y install oracleasm\*  
  
yum -y install openmotif\*  
yum -y install ksh\*  
yum -y install sysstat\*  
yum -y install compat\*  
yum -y install nfs-utils  
yum -y install "glibc-devel.i386"  
[root@station10 selinux]# yum -y install tigervnc-server.x86_64
[root@station10 selinux]# yum -y install tigervnc.x86_64
 
  
6、关闭:NetworkManager
 
  
chkconfig NetworkManager off  
7、关闭,SELINUX
 
  
sed -i.bak 's/SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux
[root@station10 selinux]# vim /etc/selinux/config 
selinux状态可以通过以下命令查看:
sestatus
getenforce      <<-查看selinux当前状态

8、建oracle用户/组
 
  
echo "oracle" | passwd --stdin root  
# oracle  
groupadd oinstall  
groupadd dba  
groupadd oper  
# grid  
groupadd asmadmin  
groupadd asmdba  
groupadd asmoper  
# oracle  
useradd -g oinstall -G dba,oper,asmadmin,asmdba,asmoper -d /home/oracle   oracle  
echo "oracle" | passwd --stdin oracle  
echo "export ORACLE_BASE=/u01/app/oracle" >> /home/oracle/.bash_profile  
echo '# export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/dbhome_1' >> /home/oracle/.bash_profile  
echo "# export ORACLE_SID=orcl"  >> /home/oracle/.bash_profile  
echo '# export TNS_ADMIN=/u01/app/oracle/product/11.2.0/grid/network/admin'  >> /home/oracle/.bash_profile  
echo "export NLS_LANG=american_america.AL32UTF8" >> /home/oracle/.bash_profile  
echo "export ORACLE_TERM=xterm" >> /home/oracle/.bash_profile  
echo "export EDITOR=vi" >> /home/oracle/.bash_profile  
echo '# export PATH=$ORACLE_HOME/bin:$PATH:/u01/app/oracle/product/11.2.0/grid/bin' >> /home/oracle/.bash_profile  
echo "export LANG=en_US" >> /home/oracle/.bash_profile  
  
mkdir -p /u01/app/oracle  
chown oracle:oinstall /u01/app  
chown oracle:oinstall /u01/app/oracle  
9、系统参数调整:
 
  
# Oracle2  
echo "fs.file-max = 6815744" >> /etc/sysctl.conf  
echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf  
echo "kernel.shmall = 2097152" >> /etc/sysctl.conf  
echo "kernel.shmmni = 4096" >> /etc/sysctl.conf  
echo "net.core.rmem_default=4194304" >> /etc/sysctl.conf  
echo "net.core.rmem_max=4194304" >> /etc/sysctl.conf  
echo "net.core.wmem_default=1048576" >> /etc/sysctl.conf  
echo "net.core.wmem_max=1048576" >> /etc/sysctl.conf  
echo "net.ipv4.ip_local_port_range = 9000 65500" >> /etc/sysctl.conf  
echo "fs.aio-max-nr = 1048576" >> /etc/sysctl.conf
kernel.shmmax = 68719476736
这个参数为物理内存的一半,最好是一半到三分之二中间。
 
  
# Oracle3  
echo "session required /lib/security/pam_limits.so" >>/etc/pam.d/login  
# Oracle4  
echo "grid soft nproc 2047" >>/etc/security/limits.conf  
echo "grid hard nproc 16384" >>/etc/security/limits.conf  
echo "grid soft nofile 1024" >>/etc/security/limits.conf  
echo "grid hard nofile 65536" >>/etc/security/limits.conf  
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  
wget -P /stage/ -c --tries=1000 --wait=5 ftp://192.168.0.254/pub/O11g_x8664/DATABASES/flashplayer-11.2.202.297-1.ram0.98.x86_64.rpm  
rpm -ivh /stage/flashplayer-11.2.202.297-1.ram0.98.x86_64.rpm  
cp /usr/lib/mozilla/plugins/libflashplayer.so  /usr/lib64/mozilla/plugins/  
# wget -P /stage/ -c --tries=1000 --wait=5 ftp://192.168.0.254/pub/O11g_x8664/DATABASES/pdksh-5.2.14-36.el5.x86_64.rpm  
# rpm -ivh /stage/pdksh-5.2.14-36.el5.x86_64.rpm --force --nodeps



 
  
wget -P /stage -c --tries=1000 --wait=5 ftp://192.168.0.254/pub/O12c_x8664/ASMLIB/oracleasmlib-2.0.4-1.el6.x86_64.rpm  
rpm -ivh /stage/oracleasmlib-2.0.4-1.el6.x86_64.rpm  
wget -P /stage -c --tries=1000 --wait=5 ftp://192.168.0.254/pub/O12c_x8664/ASMMOD/kmod-oracleasm-2.0.8-13.el6_8.x86_64.rpm  
rpm -ivh --force --nodeps /stage/kmod-oracleasm-2.0.8-13.el6_8.x86_64.rpm   
# UEK3 for ASMFD 
kmod-oracleasm 6.9要装新版本的,kmod-oracleasmXXXXX6.9XXXXX
ASM盘组
 
  
chkconfig oracleasm on  
oracleasm configure -i<
安装过程中使用到的软件跟镜像:
链接:https://pan.baidu.com/s/1nw9D2sD 密码:4t02
 
  

 
  
 
 

你可能感兴趣的:(ORACLE_OCP_课堂笔记)