Open main menu

Wikibooks β

RAC Attack - Oracle Cluster Database at Home/Prep for Oracle

< RAC Attack - Oracle Cluster Database at Home

  1. Edit /etc/sysctl.conf

    [root@collabn1 ~]# gedit /etc/sysctl.conf
    kernel.shmmni = 4096
    # semaphores: semmsl, semmns, semopm, semmni
    kernel.sem = 250 32000 100 128
    net.ipv4.ip_local_port_range = 1024 65000
    [root@collabn1 ~]# sysctl -p
  2. Edit /etc/security/limits.conf

    oracle               soft    nproc   2047
    oracle               hard    nproc   16384
    oracle               soft    nofile  1024
    oracle               hard    nofile  65536
  3. Edit /etc/pam.d/login and insert the following lines BEFORE the "selinux open" line.

    session    required     /lib/security/
    session    required
  4. Create groups and users. Make the oracle password racattack

    [root@collabn1 ~]# groupadd oinstall
    [root@collabn1 ~]# groupadd dba
    [root@collabn1 ~]# groupadd oper
    [root@collabn1 ~]# groupadd asmdba
    [root@collabn1 ~]# groupadd asmoper
    [root@collabn1 ~]# groupadd asmadmin
    [root@collabn1 ~]#
    [root@collabn1 ~]# useradd -u 500 -g oinstall -G dba,oper,asmdba,asmoper,asmadmin oracle
    [root@collabn1 ~]# passwd oracle
    Changing password for user oracle.
    New UNIX password: racattack
    BAD PASSWORD: it is based on a dictionary word
    Retype new UNIX password: racattack
    passwd: all authentication tokens updated successfully.
  5. Create directories.

    [root@collabn1 ~]# mkdir -p /u01/grid/oracle/product/11.2.0/grid_1
    [root@collabn1 ~]# mkdir -p /u01/app/oracle/product/11.2.0/db_1
    [root@collabn1 ~]# chown -R oracle:oinstall /u01
  6. Logout of your session and login as the oracle user.

  7. Disable GNOME CD automount for the oracle user. Go to the menu System >> Preferences >> Removable Drives and Media.

  8. Uncheck all of the options under Removable Storage and click Close.

  9. Open a terminal window.

  10. From the menus, open Edit >> Current Profile.

  11. In the Title and Command tab, check the box for Run command as a login shell, then close the dialog.

  12. If you are using gedit, then open Edit > Preferences to disable text wrapping and enable line numbers.

  13. Setup ssh equivalence for oracle user.

    [oracle@collabn1 ~]$ ssh localhost
    The authenticity of host 'localhost (' can't be established.
    RSA key fingerprint is 3f:65:e6:77:af:11:84:56:a4:b9:0f:8b:41:b4:2f:8a.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'localhost' (RSA) to the list of known hosts.
    oracle@localhost's password: ^C
    [oracle@collabn1 ~]$ ssh-keygen -t rsa
    Generating public/private rsa key pair.
    Enter file in which to save the key (/home/oracle/.ssh/id_rsa): ^M  [default]
    Enter passphrase (empty for no passphrase): ^M  [no password]
    Enter same passphrase again: ^M  [no password]
    Your identification has been saved in /home/oracle/.ssh/id_rsa.
    Your public key has been saved in /home/oracle/.ssh/
    The key fingerprint is:
    [oracle@collabn1 ~]$ cat /home/oracle/.ssh/ >> /home/oracle/.ssh/authorized_keys
  14. Setup oracle and root users' profiles.

    [oracle@collabn1 ~]$ su - root
    [root@collabn1 ~]# gedit /etc/oratab
    [root@collabn1 ~]# chown oracle:dba /etc/oratab
    [root@collabn1 ~]# gedit /root/.bashrc
    . oraenv >/dev/null
    unset ORAENV_ASK 
    [root@collabn1 ~]# su - oracle
    [oracle@collabn1 ~]$ cd /mnt
    [oracle@collabn1 ~]$ cat */oracle-profile >>/home/oracle/.bash_profile
  15. Close and re-open your terminal sessions so that the new profiles take effect.

  16. Install fix_cssd script.

    [oracle@collabn1 ~]$ su - root
    [root@collabn1 ~]# cd /
    [root@collabn1 ~]# tar xvf mnt/*/fix_cssd.tar
    [root@collabn1 ~]# chmod 774 /root/fix_cssd/
    [root@collabn1 ~]# gedit /etc/rc.d/rc.local
    cd /root/fix_cssd
    nohup nice -n -20 ./ 2>&1 &
    [root@collabn1 ~]# /etc/rc.d/rc.local
    nohup: appending output to `nohup.out'