Parte 1 – Criando o Banco de Dados.
Nesse artigo vou instalar o Oracle 12c r2 que será o nosso repositório na instalação do SOA 12.2.1 .
1- Instalando os pacotes necessários.
yum install binutils -y yum install compat-libstdc++-33 -y yum install compat-libstdc++-33.i686 -y yum install gcc -y yum install gcc-c++ -y yum install glibc -y yum install glibc.i686 -y yum install glibc-devel -y yum install glibc-devel.i686 -y yum install ksh -y yum install libgcc -y yum install libgcc.i686 -y yum install libstdc++ -y yum install libstdc++.i686 -y yum install libstdc++-devel -y yum install libstdc++-devel.i686 -y yum install libaio -y yum install libaio.i686 -y yum install libaio-devel -y yum install libaio-devel.i686 -y yum install libXext -y yum install libXext.i686 -y yum install libXtst -y yum install libXtst.i686 -y yum install libX11 -y yum install libX11.i686 -y yum install libXau -y yum install libXau.i686 -y yum install libxcb -y yum install libxcb.i686 -y yum install libXi -y yum install libXi.i686 -y yum install make -y yum install sysstat -y yum install unixODBC -y yum install unixODBC-devel -y yum install zlib-devel –y yum install zlib-devel.i686 -y yum -y install unixODBC unixODBC.i686 unixODBC-devel unixODBC-devel.i686 yum -y install oracleasm-support
wget http://download.oracle.com/otn_software/asmlib/oracleasmlib-2.0.4-1.el6.x86_64.rpm rpm -Uvh oracleasmlib-2.0.4-1.el6.x86_64.rpm Preparing... ########################################### [100%] 1:oracleasmlib ########################################### [100%]
Adicione as linhas no arquivo “/etc/sysctl.conf”.
fs.file-max = 6815744 kernel.sem = 250 32000 100 128 kernel.shmmni = 4096 kernel.shmall = 1073741824 kernel.shmmax = 4398046511104 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 fs.aio-max-nr = 1048576 net.ipv4.ip_local_port_range = 9000 65500 # Recommended value for kernel.panic_on_oops kernel.panic_on_oops = 1
/sbin/sysctl -p
Adicione as linhas no arquivo “/etc/security/limits.conf”.
oracle soft nofile 1024 oracle hard nofile 65536 oracle soft nproc 2047 oracle hard nproc 16384 oracle soft stack 10240 oracle hard stack 32768 grid soft nofile 1024 grid hard nofile 65536 grid soft nproc 2047 grid hard nproc 16384
Criando usuários e grupos:
groupadd -g 1000 oinstall groupadd -g 1200 asmadmin groupadd -g 1201 asmdba groupadd -g 1202 asmoper groupadd -g 1300 dba groupadd -g 1301 oper
useradd -m -u 1100 -g oinstall -G asmadmin,asmdba,asmoper -d /home/grid -s /bin/bash grid useradd -m -u 1101 -g oinstall -G dba,oper,asmdba -d /home/oracle -s /bin/bash oracle
Criando os Diretórios:
mkdir -p /u01/app/oracle mkdir -p /u01/app/oracle/product/12.2.0.1/grid chown -R grid:oinstall /u01/app/ chmod -R 775 /u01/ mkdir -p /u01/app/oracle/product/12.2.0.1/db_1 chown oracle:oinstall /u01/app/oracle/product/12.2.0.1/db_1 chmod -R 775 /u01/
Na máquina altere o SELinux de “enforcing” para “permissive”.
vi /etc/selinux/config
Desabilite o firewall.
chkconfig iptables off chkconfig ip6tables off
Formatando um novo disco para o ASM
fdisk /dev/sdb Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel Building a new DOS disklabel with disk identifier 0x92e2b75a. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable. Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) WARNING: DOS-compatible mode is deprecated. It's strongly recommended to switch off the mode (command 'c') and change display units to sectors (command 'u'). Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-2627, default 1): Using default value 1 Last cylinder, +cylinders or +size{K,M,G} (1-2627, default 2627): Using default value 2627 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.
Configurando o ASM
/etc/init.d/oracleasm configure Configuring the Oracle ASM library driver. This will configure the on-boot properties of the Oracle ASM library driver. The following questions will determine whether the driver is loaded on boot and what permissions it will have. The current values will be shown in brackets ('[]'). Hitting <ENTER> without typing an answer will keep that current value. Ctrl-C will abort. Default user to own the driver interface []: grid Default group to own the driver interface []: asmadmin Start Oracle ASM library driver on boot (y/n) [n]: y Scan for Oracle ASM disks on boot (y/n) [y]: y Writing Oracle ASM library driver configuration: done Initializing the Oracle ASMLib driver: [ OK ] Scanning the system for Oracle ASMLib disks: [ OK ]
/etc/init.d/oracleasm status Checking if ASM is loaded: yes Checking if /dev/oracleasm is mounted: yes
Criando o disco ASM
/etc/init.d/oracleasm createdisk DISK01 /dev/sdb1 Marking disk "DISK01" as an ASM disk: [ OK ]
/etc/init.d/oracleasm scandisks Scanning the system for Oracle ASMLib disks: [ OK ]
/etc/init.d/oracleasm listdisks DISK01
Entre com o usuário grid e copie o software de instalação para dentro do GRID_HOME
Copiando o software do grid:
cp linuxx64_12201_grid_home.zip /u01/app/oracle/product/12.2.0.1/grid/
unzip linuxx64_12201_grid_home.zip Archive: linuxx64_12201_grid_home.zip creating: addnode/ inflating: addnode/addnode_oraparam.ini.sbs inflating: addnode/addnode.pl inflating: addnode/addnode.sh inflating: addnode/addnode_oraparam.ini creating: assistants/ inflating: assistants/netca/images/netcaNSNDone.gif inflating: assistants/netca/images/netcaLsnr.gif inflating: assistants/netca/images/netcaNam.gif inflating: assistants/netca/netca_deinst.sbs ……. inflating: xdk/mesg/lsxtr.msb inflating: xdk/mesg/lpxel.msb inflating: xdk/mesg/jznpt.msb inflating: xdk/mesg/lsxja.msb finishing deferred symbolic links: bin/lbuilder -> ../nls/lbuilder/lbuilder javavm/admin/libjtcjt.so -> ../../javavm/jdk/jdk8/admin/libjtcjt.so javavm/admin/lfclasses.bin -> ../../javavm/jdk/jdk8/admin/lfclasses.bin javavm/admin/classes.bin -> ../../javavm/jdk/jdk8/admin/classes.bin javavm/admin/cbp.jar -> ../../javavm/jdk/jdk8/admin/cbp.jar javavm/lib/sunjce_provider.jar -> ../../javavm/jdk/jdk8/lib/sunjce_provider.jar lib/libclntshcore.so -> libclntshcore.so.12.1 lib/libjavavm12.a -> ../javavm/jdk/jdk8/lib/libjavavm12.a lib/libodm12.so -> libodmd12.so lib/libagtsh.so -> libagtsh.so.1.0 lib/libclntsh.so -> libclntsh.so.12.1 lib/libocci.so -> libocci.so.12.1
[root@soadb ~]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete. [root@soadb ~]# /u01/app/oraInventory/orainstRoot.sh Changing permissions of /u01/app/oraInventory. Adding read,write permissions for group. Removing read,write,execute permissions for world. Changing groupname of /u01/app/oraInventory to oinstall. The execution of the script is complete. [root@soadb ~]# /u01/app/oracle/product/12.2.0.1/grid/root.sh Performing root user operation. The following environment variables are set as: ORACLE_OWNER= grid ORACLE_HOME= /u01/app/oracle/product/12.2.0.1/grid Enter the full pathname of the local bin directory: [/usr/local/bin]: Copying dbhome to /usr/local/bin ... Copying oraenv to /usr/local/bin ... Copying coraenv to /usr/local/bin ... Creating /etc/oratab file... Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. Using configuration parameter file: /u01/app/oracle/product/12.2.0.1/grid/crs/install/crsconfig_params The log of current session can be found at: /u01/app/oracle/crsdata/soadb/crsconfig/roothas_2018-03-01_10-35-18PM.log 2018/03/01 22:35:20 CLSRSC-363: User ignored prerequisites during installation LOCAL ADD MODE Creating OCR keys for user 'grid', privgrp 'oinstall'.. Operation successful. LOCAL ONLY MODE Successfully accumulated necessary OCR keys. Creating OCR keys for user 'root', privgrp 'root'.. Operation successful. CRS-4664: Node soadb successfully pinned. 2018/03/01 22:35:29 CLSRSC-330: Adding Clusterware entries to file 'oracle-ohasd.conf' CRS-2791: Starting shutdown of Oracle High Availability Services-managed resources on 'soadb' CRS-2673: Attempting to stop 'ora.evmd' on 'soadb' CRS-2677: Stop of 'ora.evmd' on 'soadb' succeeded CRS-2793: Shutdown of Oracle High Availability Services-managed resources on 'soadb' has completed CRS-4133: Oracle High Availability Services has been stopped. CRS-4123: Oracle High Availability Services has been started.soadb 2018/03/01 22:36:40 /u01/app/oracle/product/12.2.0.1/grid/cdata/soadb/backup_20180301_223640.olr 02018/03/01 22:36:40 CLSRSC-327: Successfully configured Oracle Restart for a standalone server
Instalando o Banco de Dados
Entre com o Usuário Oracle
/u01/app/oracle/product/12.2.0.1/db_1/root.sh Performing root user operation. The following environment variables are set as: ORACLE_OWNER= oracle ORACLE_HOME= /u01/app/oracle/product/12.2.0.1/db_1 Enter the full pathname of the local bin directory: [/usr/local/bin]: The contents of "dbhome" have not changed. No need to overwrite. The contents of "oraenv" have not changed. No need to overwrite. The contents of "coraenv" have not changed. No need to overwrite. Entries will be added to the /etc/oratab file as needed by Database Configuration Assistant when a database is created Finished running generic part of root script. Now product-specific root actions will be performed. Do you want to setup Oracle Trace File Analyzer (TFA) now ? yes|[no] : yes Installing Oracle Trace File Analyzer (TFA). Log File: /u01/app/oracle/product/12.2.0.1/db_1/install/root_soadb.localdomain_2018-03-01_23-09-51-437976225.log Finished installing Oracle Trace File Analyzer (TFA)
Criando a instancia soadev
SQL> select cdb from v$database; CDB --- YES SQL> SQL> show con_name CON_NAME ------------------------------ CDB$ROOT SQL> SQL> select name, con_id, dbid from v$containers; NAME -------------------------------------------------------------------------------- CON_ID DBID ---------- ---------- CDB$ROOT 1 729845342 PDB$SEED 2 2646787755 SOADEVPDB 3 2488326404
sqlplus / as sysdba Connected to: Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production SQL> alter pluggable database soadevpdb open read write; Pluggable database altered. SQL> alter session set container=soadevpdb; Session altered. SQL> alter pluggable database storage unlimited; Pluggable database altered. SQL> create temporary tablespace tempsoadev_pdb tempfile '+DATA/tempodipdb.dbf' size 1000m; Tablespace created. SQL>
No próximo artigo instalaremos o Oracle SOA Suite 12.2.