+ All Categories
Home > Documents > Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf ·...

Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf ·...

Date post: 21-Feb-2018
Category:
Upload: vodan
View: 243 times
Download: 5 times
Share this document with a friend
24
Oracle Database 12c Installation on CentOS 7 systems 1 Oracle Database 12c Installation Procedure Step 0: Preparation Step 0.1: Fully patch the system. Run: # yum update -y Step 0.2: Install the EPEL repo. Run: # yum install epel-release Step 0.3: Prepare for required YUM packages. The following packages are needed: # yum install binutils # yum install compat-libcap1 # yum install compat-libstdc++-33 # yum install gcc # yum install gcc-c++ # yum install glibc-devel # yum install ksh # yum install libgcc # yum install libstdc++ # yum install libstdc++-devel # yum install libXext # yum install libXtst # yum install libxcb # yum install libXmu # yum install libXxf86dga # yum install libX11 # yum install libXau # yum install libaio # yum install libaio-devel # yum install libdmx # yum install glibc # yum install make # yum install sysstat # yum install xorg-x11-utils # yum install xorg-x11-xauth # yum install libXv # yum install libXi # yum install libXt # yum install libXxf86misc
Transcript
Page 1: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

1

Oracle Database 12c Installation Procedure Step 0: Preparation Step 0.1: Fully patch the system. Run: # yum update -y Step 0.2: Install the EPEL repo. Run: # yum install epel-release Step 0.3: Prepare for required YUM packages. The following packages are needed: # yum install binutils # yum install compat-libcap1 # yum install compat-libstdc++-33 # yum install gcc # yum install gcc-c++ # yum install glibc-devel # yum install ksh # yum install libgcc # yum install libstdc++ # yum install libstdc++-devel # yum install libXext # yum install libXtst # yum install libxcb # yum install libXmu # yum install libXxf86dga # yum install libX11 # yum install libXau # yum install libaio # yum install libaio-devel # yum install libdmx # yum install glibc # yum install make # yum install sysstat # yum install xorg-x11-utils # yum install xorg-x11-xauth # yum install libXv # yum install libXi # yum install libXt # yum install libXxf86misc

Page 2: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

2

# yum install libXxf86vm Step 0.2: Set up X11 forwarding. Install the following 2 packages: # yum install xclock # yum install xauth Log out and log back in as root: # ssh -Y -i <private_key> root@<public_ip> Then verify the X11 forwarding is working: # xclock Note that for Mac users, you need to install XQuartz application on your Mac. Step 0.3: Prepare SELinux. Edit the /etc/selinux/config file and make sure that the following lines exist: >>>>> SELINUX=enforcing SELINUXTYPE=targeted <<<<< Run the following to check SELinux status: # sestatus Alternatively, check the /etc/selinux/conf file. If the settings need to be changed, run the following to change it immediately and temporary: # setenforce 1 Then reboot. Alternatively, modify the /etc/selinux/conf file and reboot. Step 0.4: Create oracle user and associated group. Run the following commands: # useradd oracle # groupadd dba # usermod -a -G dba oracle Set the password for the local user oracle as "oraclepassword". Step 0.3: Grant oracle SSH login.

Page 3: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

3

Add the following line into the end of the /etc/ssh/sshd_config file: >>>>> AllowUsers root oracle <<<<< Make sure the following line exists: >>>>> PasswordAuthentication yes <<<<< Then, restart the sshd service: # systemctl restart sshd.service Step 0.6: Prepare /etc/sysctl.conf Go to the /etc/sysctl.conf file and make sure the following lines exist: >>>>> kernel.shmmax = 4294967295 kernel.shmall = 2097152 fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 <<<<< If changes are committed, run the following command to make it to take effecr immediately: # sysctl -p Step 0.7: Prepare HBFW. It is stopped by default. Step 0.8: Prepare the /etc/security/limits.conf file. On rhel72x2 as root, edit the /etc/security/limits.conf file and make sure the following lines exit: >>>>> oracle soft nofile 1024 oracle hard nofile 65536 oracle soft nproc 2047 oracle hard nproc 16384 oracle soft stack 10240 oracle hard stack 32768

Page 4: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

4

<<<<< Reboot. Step 0.9: Prepare the oracle user environment variables. Edit the /home/oracle/.bash_profile file and make sure that the following lines exist: >>>>> ## Oracle Env Settings export TMP=/tmp export TMPDIR=$TMP export ORACLE_HOSTNAME=rhel72.linuxtoys.net export ORACLE_UNQNAME=demo export ORACLE_BASE=/u01/app/oracle export ORACLE_HOME=$ORACLE_BASE/product/12.1.0/db_1/ export ORACLE_SID=demo export PATH=/usr/sbin:$PATH export PATH=$ORACLE_HOME/bin:$PATH export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib export CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib <<<<< Step 0.10: Transfer installer .zip fiels to rhel72x2. Step 0.11: Unzip the .zip files. Run: # unzip linuxamd64_12102_database_1of2.zip # unzip linuxamd64_12102_database_2of2.zip The unzip installer is located in the database sundirectory. Step 0.12: Create swap space. Run: # dd if=/dev/zero of=/swapfile bs=1M count=4096 # mkswap /swapfile # swapon /swapfile

Page 5: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

5

Step 1: Installation Step 1.1: Create the following directory tree: # mkdir -p /u01/app/oracle/product/12.1.0/db_1 Make sure its ownership is: oracle:dba Step 1.2: log back in as follows: # ssh -Y oracle@rhel72x2 Then, launch the following command: # ./runInstaller Note that you need to log in as oracle from your Mac: $ ssh -Y oracle@<public_ip>

Page 6: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

6

Page 7: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

7

Page 8: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

8

Note that you need to make sure that the db_1 directory is the directory name.

Page 9: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

9

Page 10: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

10

Page 11: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

11

Page 12: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

12

The passord is: oracle

Page 13: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

13

Page 14: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

14

On rhel72 as root, go to the /u01/app/oraInventory directory and then run: >>>>> [root@rhel72 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 oracle. The execution of the script is complete. <<<<< Then, I go to the /u01/app/oracle/product/12.1.0/db_1 directory, and run: >>>>> [root@rhel72 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.1.0/db_1 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...

Page 15: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

15

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. <<<<<

Click OK.

Click OK.

Page 16: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

16

Click OK.

Click Yes. So there is an error during the normal installation processs. On rhel72 as root, I go to the /u01/app/oraInventory/logs directory and check the installActions2017-08-25_06-22-18PM.log file for more details. It contains the following lines: >>>>> INFO: Starting 'Oracle Database Configuration Assistant' INFO: Starting 'Oracle Database Configuration Assistant' INFO: Executing DBCA INFO: Command /u01/app/oracle/product/12.1.0/db_1/bin/dbca -progress_only -createDatabase -templateName General_Purpose.dbc -createAsContainerDatabase true -pdbName pdborcl -

Page 17: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

17

numberOfPDBs 1 -sid orcl -gdbName orcl.linuxtoys.net -emConfiguration DBEXPRESS -storageType FS -datafileDestination /u01/app/oracle/oradata -datafileJarLocation /u01/app/oracle/product/12.1.0/db_1//assistants/dbca/templates -responseFile NO_VALUE -characterset WE8MSWIN1252 -obfuscatedPasswords false -sampleSchema true -automaticMemoryManagement true -totalMemory 1132 -maskPasswords false -oui_internal INFO: ... GenericInternalPlugIn.handleProcess() entered. INFO: ... GenericInternalPlugIn: getting configAssistantParmas. INFO: ... GenericInternalPlugIn: checking secretArguments. INFO: ... GenericInternalPlugIn: starting read loop. INFO: Read: SYS_PASSWORD_PROMPT INFO: Processing: SYS_PASSWORD_PROMPT for argument tag -sysPassword INFO: Read: SYSTEM_PASSWORD_PROMPT INFO: Processing: SYSTEM_PASSWORD_PROMPT for argument tag -systemPassword INFO: Read: PDB_ADMIN_PASSWORD_PROMPT INFO: Processing: PDB_ADMIN_PASSWORD_PROMPT for argument tag -pdbAdminPassword INFO: Completed Plugin named: Oracle Database Configuration Assistant INFO: Oracle Database Configuration Assistant failed. INFO: Oracle Database Configuration Assistant failed. <<<<< Then, I launch the dbca program: # dbca

Page 18: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

18

Give DB name orcl.

Page 19: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

19

Page 20: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

20

Page 21: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

21

Page 22: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

22

Page 23: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

23

Step 1.4: If you ever get the following error during installtion:

Page 24: Oracle Database 12c Installation Procedurepeople.fas.harvard.edu/~zzhao/cscie67/tasection1_2.pdf · Oracle Database 12c Installation on CentOS 7 systems 3 Add the following line into

OracleDatabase12cInstallationonCentOS7systems

24

The root cause of the error is that the oracle user environment is not set up correctly. You need to check the oracle home. Alternatively, run the following command: # cp /u01/app/oracle/product/12.1.0/db_1/javavm/jdk/jdk6/lib/libjavavm12.a /u01/app/oracle/product/12.1.0/db_1/lib/ # cp /u01/app/oracle/product/12.1.0/db_1/javavm/jdk/jdk6/lib/libjavavm12.a /u01/app/oracle/product/12.1.0/db_1/rdbms/lib/ Step 2: Post-installation. Step 2.1: Verify both instance and database. So everything looks fine. But I need to verify both instance and database are fine. On rhel72 as oracle, I launch the sqlplus program as follows: # tnsping orcl Then, I execute the following SQL statement: SQL> select name from v$database; Then, I run the following command to check which process is listening on 1521/tcp: # lsof -i :1521 Them, I run the following command to find out how many connection there are in relation to us01: # netstat -an | grep -i :1521 Then, I run the following commnnd to find out the Net listener: # lsnrctl status Step 2.2: Sometimes, if you need to abort the installation, and then install from the scratch again, you need to delete the entire directories: /u01/app/oraInventory diretcory and some other directories if necessary.


Recommended