首页 > 代码库 > ORACLE安装(12c-Redhat6.5)
ORACLE安装(12c-Redhat6.5)
Oracle安装(12c-Redhat6.5)
Redhat6.5系统准备
/ | 10G |
SWAP | 4G |
/boot | 200M |
/HOME | 4G |
/usr | 8G |
/var | 4G |
/u01 |
|
Preinstallation Tasks |
Logging In to the System as root |
Checking the Hardware Requirements |
Checking the Software Requirements |
Checking the Network Setup |
Creating Required Operating System Groups and Users |
Configuring Kernel Parameters |
Identifying Required Software Directories |
Identifying or Creating an Oracle Base Directory |
Choosing a Storage Option for Oracle Database and Recovery Files |
Creating Directories for Oracle Database or Recovery Files |
Preparing Disk Groups for an Automatic Storage Management Installation |
Configuring Raw Partitions or Raw Logical Volumes |
Stopping Existing Oracle Processes |
Configuring the oracle User‘s Environment |
一:Linux挂载:VMware tools for Linux安装
# mkdir /mnt/cdrom
# mount /dev/cdrom /mnt/cdrom/
# cp VMwareTools-9.0.0-782409.tar.gz /opt/
# tar -zxvpf VMwareTools-9.0.0-782409.tar.gz
# cd vmware-tools-distrib
# ./vmware-install.pl
# /etc/init.d/vmware-tools status #查看是否有在執行
二、设置ip地址:Linux网络配置:设置IP地址、网关DNS、主机名
/etc/sysconfig/network-scripts/ifcfg-ethN 文件
/etc/hosts文件
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.0.66
NETMASK=255.255.255.0
GATEWAY=192.168.0.65
配置OK后使用service network restart重启网络服务
三、设置防火墙
设置 vim /etc/selinux/config
SELINUX=disabled
关闭防火墙
chkconfig ip6tables off
chkconfig iptables off
service iptables stop
service ip6tables stop
查看防火墻狀態:service iptables status
啟動防火墻:service iptables start
禁用防火墻:service iptables stop
四、建立oracle账户和群组
建立dba群组:groupadd dba
创建oracle用户并授权到dba群组:useradd -g dba oracle
设定oracle用户密码:passwd oracle
五、创建oracle工作目录
Oracle基础目录:mkdir -p /u01/app/oracle
Oracle软件存放目录:mkdir -p /u01/app/oracle/product
Oracle库存目录:mkdir -p /u01/app/oraInventory
Oracle数据库文件目录:mkdir -p /u01/app/oracle/oradata
六、授权Oracle工作目录
chown -R oracle.dba /u01
七、Yum源配置 ,安装Packages
挂载Redhat5.8ISO文件
mount /dev/cdrom /mnt/cdrom
注:虚拟机-〉setting->cd/dvd-〉device status-.connected前面的勾打上
备份Yum的配置文件
1. #cd /etc/yum.repos.d/
2. #cp rhel-debuginfo.repo rhel-debuginfo.repo.bak
配置文件进行编辑
vi rhel-debuginfo.repo | [rhel-debuginfo] name=Red Hat Enterprise Linux $releasever – $basearch – Debug baseurl=file:///mnt/cdrom/Server enabled=1 gpgcheck=1 gpgkey=file:///mnt//cdrom/pki/rpm-gpg/RPM-GRG-KEY-redhat-release |
vim rhel-source.repo | [oel6] name=oel6 baseurl=file:///mnt/cdrom/Server enabled=1 gpgcheck=0 |
验证可以安装的组件
#yum grouplist
安装组件
#yum groupinstall “KDE (K Desktop Environment)”
# yum -y install glibc-devel-2.5*
Packages:Red Hat Enterprise Linux 4.0:
binutils-2.15.92.0.2-10.EL4
compat-db-4.1.25-9
control-center-2.8.0-12
gcc-3.4.3-9.EL4
gcc-c++-3.4.3-9.EL4
glibc-2.3.4-2
glibc-common-2.3.4-2
gnome-libs-1.4.1.2.90-44.1
libstdc++-3.4.3-9.EL4
libstdc++-devel-3.4.3-9.EL4
make-3.80-5
pdksh-5.2.14-30
sysstat-5.0.5-1
xscreensaver-4.18-5.rhel4.2
八、Configuring Kernel Parameters
kernel parameter settings /etc/sysctl.conf | kernel.shmall = 2097152 kernel.shmmax = 2147483648 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 |
Setting Shell Limits for the oracle User | 1、Add the following lines to the /etc/security/limits.conf file: oracle soft nproc 2047 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 2、Add or edit the following line in the /etc/pam.d/login file, if it does not already exist: session required pam_limits.so 3、Depending on the oracle user‘s default shell, make the following changes to the default shell start-up file: For the Bourne, Bash, or Korn shell, add the following lines to the /etc/profile file (or the /etc/profile.local file on SUSE systems): if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi For the C shell (csh or tcsh), add the following lines to the /etc/csh.login file (or the file on SUSE systems)/etc/csh.login.local: if ( $USER == "oracle" ) then limit maxproc 16384 limit descriptors 65536 endif |
Configuring the oracle User‘s Environment
/home/oracle/.bash_profile
Source /home/oracle/.bash_profile | #Enter commands similar to the following to set the TEMP and TMPDIR environment variables: TMP=/tmp; export TMP TMPDIR=$TMP; export TMPDIR #Enter commands similar to the following to set the ORACLE_BASE and ORACLE_SID environment variables: ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE ORACLE_HOME=$ORACLE_BASE/product/12.2.0/dbhome_1; export ORACLE_HOME ORACLE_SID=ora01; export ORACLE_SID ORACLE_UNQNAME=ora01; export ORACLE_UNQNAME PATH=/usr/sbin:$PATH; export PATH PATH=$ORACLE_HOME/bin:$PATH; export PATH LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib64:/usr/lib64:/usr/local/lib64:/usr/X11R6/lib64; export LD_LIBRARY_PATH CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH TNS_ADMIN=$ORACLE_HOME/network/admin NLS_LANG=AMERICAN_AMERICA.AL32UTF8; export NLS_LANG umask 022 if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -p 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi |
九、解压缩安装文档:Linux压缩解压缩(unzip,tar)
ORACLE安装(12c-Redhat6.5)