在今天Oracle终于放出了19c 安装包Linux X86版本,在两个月前只有exadata版本。整个安装方法以及GUI界面与18c类似,使用18c的依赖包即可,经测试与2.14发布的exadata版本部署方法一致。
附19c下载地址:
https://www.oracle.com/technetwork/database/enterprise-edition/downloads/oracle19c-linux-5462157.html
我已将安装环境准备过程整理为sh脚本如下,直接执行即可:
[root@ora19c opt]# cat 19c.sh
#!/bin/bash
#Purpose:Modify the NTPD YUM
#Usage:Log on as the superuser('root'),and then execute the command
#echo "Now start change HOSTS and backup hosts /etc/hosts.bak"
echo "Now create 6 groups named 'oinstall','dba','asmadmin','asmdba','asmoper','oper'"
echo "Plus 2 users named 'oracle','grid' "
groupadd -g 601 oinstall
groupadd -g 602 dba
groupadd -g 603 oper
groupadd -g 604 backupdba
groupadd -g 605 dgdba
groupadd -g 606 kmdba
useradd -u 601 -g oinstall -G dba,backupdba,dgdba,kmdba,oper oracle
echo "oracle" | passwd --stdin oracle
echo "The Groups and users has been created"
echo "Now create the necessary directory for oracle,grid users and change the authention to oracle,grid users..."
mkdir -p /u01/app/oracle
mkdir -p /u01/app/oraInventory
mkdir -p /u01/app/oracle/product/19.3.0/db_1
chown -R oracle:oinstall /u01/
chmod -R 775 /u01/
echo "The necessary directory for oracle,grid users and change the authention to oracle,grid users has been finished"
echo "Now modify the /etc/security/limits.conf,but backup it named /etc/security/limits.conf.bak before"
cp /etc/security/limits.conf /etc/security/limits.conf.bak
echo "oracle soft nproc 16384" >>/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
echo "oracle hard stack 32768" >>/etc/security/limits.conf
echo "Modifing the /etc/security/limits.conf has been succeed.
echo "Now modify the /etc/security/limits.d/90-nproc.conf,but with a backup named /etc/security/limits.d/90-nproc.conf.bak"
cp /etc/security/limits.d/20-nproc.conf /etc/security/limits.d/20-nproc.conf.bak
echo "# Default limit for number of user's processes to prevent" > /etc/security/limits.d/20-nproc.conf
echo "# accidental fork bombs." >> /etc/security/limits.d/20-nproc.conf
echo "# See rhbz #432903 for reasoning." >> /etc/security/limits.d/20-nproc.conf
echo "root soft nproc unlimited" >> /etc/security/limits.d/20-nproc.conf
echo "* - nproc 16384" >> /etc/security/limits.d/20-nproc.conf
echo "Modifing the /etc/security/limits.d/90-nproc.conf has been succeed.
echo "Now modify the /etc/pam.d/login,but with a backup named /etc/pam.d/login.bak"
cp /etc/pam.d/login /etc/pam.d/login.bak
echo "session required pam_limits.so" >>/etc/pam.d/login
echo "Modifing the /etc/pam.d/login has been succeed."
echo "Now modify the /etc/sysctl.conf,but with a backup named /etc/sysctl.bak"
cp /etc/sysctl.conf /etc/sysctl.conf.bak
echo "kernel.panic_on_oops = 1" >> /etc/sysctl.conf
echo "fs.aio-max-nr = 1048576" >> /etc/sysctl.conf
echo "fs.file-max = 6815744" >> /etc/sysctl.conf
echo "kernel.shmmni = 4096" >> /etc/sysctl.conf
echo "kernel.sem = 250 32000 100 128" >> /etc/sysctl.conf
echo "net.ipv4.ip_local_port_range = 9000 65500" >> /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 = 1048586" >> /etc/sysctl.conf
echo "kernel.shmmax = 15461882265" >> /etc/sysctl.conf
echo "kernel.shmall = 3774873" >> /etc/sysctl.conf
echo "Modifing the /etc/sysctl.conf has been succeed."
echo "Now make the changes take effect....."
sysctl -p
echo "Now modify the /home/oracle/.bash_profile,but with a backup named /home/oracle/.bash_profile.bak"
cp /home/oracle/.bash_profile /home/oracle/.bash_profile.bak
echo "export TMP=/tmp">> /home/oracle/.bash_profile
echo 'export TMPDIR=$TMP'>>/home/oracle/.bash_profile
echo "export ORACLE_HOSTNAME=orcl">> /home/oracle/.bash_profile
echo "export ORACLE_SID=orcl">> /home/oracle/.bash_profile
echo "export ORACLE_BASE=/u01/app/oracle">> /home/oracle/.bash_profile
echo 'export ORACLE_HOME=$ORACLE_BASE/product/19.3.0/db_1'>> /home/oracle/.bash_profile
echo "export ORACLE_UNQNAME=rac">> /home/oracle/.bash_profile
echo 'export TNS_ADMIN=$ORACLE_HOME/network/admin' >> /home/oracle/.bash_profile
echo "export ORACLE_TERM=xterm">> /home/oracle/.bash_profile
echo 'export PATH=.:$PATH:$HOME/bin:$ORACLE_BASE/product/19.3.0/db_1/bin:$ORACLE_HOME/bin'>> /home/oracle/.bash_profile
echo 'export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib'>> /home/oracle/.bash_profile
echo 'export CLASSPATH=$ORACLE_HOME/JRE:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib'>> /home/oracle/.bash_profile
echo "export THREADS_FLAG=native" >> /home/oracle/.bash_profile
echo "export LANG=en_US" >> /home/oracle/.bash_profile
echo "export NLS_LANG=american_america.AL32UTF8" >> /home/oracle/.bash_profile
echo "export NLS_DATE_FORMAT='yyyy/mm/dd hh24:mi:ss'" >> /home/oracle/.bash_profile
echo 'if [ $USER = "oracle" ]||[ $USER = "grid" ]; then' >> /home/oracle/.bash_profile
echo 'if [ $SHELL = "/bin/ksh" ]; then' >> /home/oracle/.bash_profile
echo 'ulimit -p 16384' >> /home/oracle/.bash_profile
echo 'ulimit -n 65536' >> /home/oracle/.bash_profile
echo 'else' >> /home/oracle/.bash_profile
echo 'ulimit -u 16384 -n 65536' >> /home/oracle/.bash_profile
echo 'fi' >> /home/oracle/.bash_profile
echo 'umask 022' >> /home/oracle/.bash_profile
echo 'fi' >> /home/oracle/.bash_profile
echo "Modifing the /home/oracle/.bash_profile has been succeed."
yum install -y binutils
yum install -y compat-libcap1
yum install -y compat-libstdc++-33
yum install -y compat-libstdc++-33.i686
yum install -y gcc
yum install -y gcc-c++
yum install -y glibc
yum install -y glibc.i686
yum install -y glibc-devel
yum install -y glibc-devel.i686
yum install -y ksh
yum install -y libgcc
yum install -y libgcc.i686
yum install -y libstdc++
yum install -y libstdc++.i686
yum install -y libstdc++-devel
yum install -y libstdc++-devel.i686
yum install -y libaio
yum install -y libaio.i686
yum install -y libaio-devel
yum install -y libaio-devel.i686
yum install -y libXext
yum install -y libXext.i686
yum install -y libXtst
yum install -y libXtst.i686
yum install -y libX11
yum install -y libX11.i686
yum install -y libXau
yum install -y libXau.i686
yum install -y libxcb
yum install -y libxcb.i686
yum install -y libXi
yum install -y libXi.i686
yum install -y make
yum install -y sysstat
yum install -y unixODBC
yum install -y unixODBC-devel
yum install -y readline
yum install -y libtermcap-devel
yum install -y pdksh
yum install -y *compat-libstdc*
systemctl disable avahi-daemon.socket
systemctl disable avahi-daemon.service
systemctl stop firewalld
systemctl disable firewalld
echo "NOZEROCONF=yes" >> /etc/sysconfig/network
cp /etc/selinux/config /etc/selinux/config.bak
echo "SELINUX=disabled" > /etc/selinux/config
echo "SELINUXTYPE=targeted" >> /etc/selinux/config
echo "never" > /sys/kernel/mm/transparent_hugepage/enabled
echo "never" > /sys/kernel/mm/transparent_hugepage/defrag
mv /etc/resolv.conf /etc/resolv.conf.20180320
systemctl stop chronyd
systemctl disable chronyd
systemctl stop ntpd.service
systemctl disable ntpd.service
systemctl stop ntpdate.service
systemctl disable ntpdate.service
mv /etc/chrony.conf /etc/chrony.conf.bak
mv /etc/ntp.conf /etc/ntp.conf.bak
rm -rf /var/run/ntpd.pid
rm -rf /var/run/chronyd.pid
进入到ORACLE_HOME目录进行解压zip包
[oracle@ora19c db_1]$ cd $ORACLE_HOME
[oracle@ora19c db_1]$ unzip /opt/LINUX.X64_193000_db_home.zip
[oracle@ora19c db_1]$ ./runInstaller
查看数据库版本
SQL> select banner_full from v$version;
BANNER_FULL
--------------------------------------------------------------------------------
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0 - Production
Version 19.3.0.0.0