Friday 15 April 2016

Pre-Installion tasks for pretty much database versions

 Here are some pre-installation tasks before installing Oracle Database software, some of the steps or statement may vary from versions to versions.
  • First of all create groups like oinstall, dba. (must 2 groups) Other groups like oper is optional and asmadmin, asmdba, asmoper are related to ASM / Grid Installation. Create user oracle who will be responsible for installation.
  •  [root@localhost /]# groupadd -g 501 oinstall  
     [root@localhost /]# groupadd -g 502 dba  
     [root@localhost /]# groupadd -g 503 oper  
     [root@localhost /]# groupadd -g 504 asmadmin  
     [root@localhost /]# groupadd -g 505 asmdba  
     [root@localhost /]# groupadd -g 506 asmoper  
     [root@localhost ~]# useradd -u 501 -g oinstall -G dba,oper,asmadmin,asmdba,asmoper oracle  
    
  • Now login as oracle user and then edit .bash_profile and add following code to that file:
  •  [root@localhost ~]# su – oracle  
     [oracle@localhost ~]$ cat .bash_profile  
     # .bash_profile  
     # Get the aliases and functions  
     if [ -f ~/.bashrc ]; then  
         . ~/.bashrc  
     fi  
     # User specific environment and startup programs  
     PATH=$PATH:$HOME/bin  export PATH  
     # Oracle Settings  
     TMP=/tmp; export TMP  
     TMPDIR=$TMP; export TMPDIR  
     ORACLE_HOSTNAME=localhost.localdomain; export ORACLE_HOSTNAME  
     # ORACLE_UNQNAME=DB11G; export ORACLE_UNQNAME  
     ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE  
     ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME  
     # ORACLE_SID=DB11G; export ORACLE_SID  
     PATH=/usr/sbin:$PATH; export PATH  
     PATH=$ORACLE_HOME/bin:$GRID_HOME/bin:$PATH; export PATH  
     LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib; export LD_LIBRARY_PATH  
     CLASSPATH=$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib; export CLASSPATH  
    
  • Now create the necessary directories and assign them with proper group and user. (skip if already created.)
  •  [root@localhost /]# mkdir -p /u01/app/oracle/product/11.2.0/db_1  
     [root@localhost /]# ls /u01/app/oracle/product/11.2.0/  
     db_1  
     [root@localhost /]# chown -R oracle:oinstall /u01/  
     [root@localhost /]# chmod -R 775 /u01/  
    

No comments :

Post a Comment