The Musings of CrashSensei

Random thoughts caught by the InterWeb

Installing Oracle Linux 7

By crashsensei | October 16, 2017 | 0 Comment

Intro

This is  simple tutorial for installing and configuring Oracle Linux 7 for usage with a Oracle 12c database.  For instructions on installing Oracle 12c database software please refer to the ABC post

Install Environment

  • VMWare virtual machine
  • CPUs
    • One Node: 10 cores
    • Enterprise Manager: 8 cores
  • Memory
    • One Node: 64GB
    • Enterprise Manager: 16GB
  • Single network adapter
  • Storage
    • One Node
      Size Purpose
      64 GB Operating System
      16 GB Swap
      500 GB Oracle Software
      1.5 TB Oracle DATA01 disk
      1 TB Oracle FRA01 disk
      120 GB Database dump location
      1.5 TB Oracle DATA02 disk
    • Enterprise Manager
      Size Purpose
      64 GB Operating System
      8 GB Swap
      250 GB Oracle Software
      128 GB Oracle Database files
      72 GB Enterprise Manager Repo
      60 GB Database dump location

Booting Up

  1. Select Install Oracle Linux 7
  2. Select your language

Installation

  1. Click on Network & Host name
    1. Update the machine host name if necessary and click Apply
    2. Select the appropriate ethernet adapter and click on Configure…
    3. Under the General tab ensure both Automatically connect to this network when available and All users may connect to this network are selected

    4. If not using DHCP configure static IPs via the IPv4 Settings or IPv6 Settings tabs
    5. Click Save
    6. Ensure the ethernet adapter is enabled by toggling the switch to the On position
    7. Click Done to return to the main screen
  2. Click on Date & Time
    1. Select the appropriate timezone
    2. If needed update the NTP servers by clicking the gear icon next to Network Time
    3. Click Done to return to the main screen
  3. Click on Software Selection
    1. Under Base Environment select Server with GUI


    2. Under Add-Ons for Selected Environment select the following:
      • File and Storage Server
      • Java Platform
      • Large Systems Performance
      • Network File System Client
      • Performance Tools
      • Compatibility Libraries
      • Development Tools
    3. Click Done to return to the main screen/bootsasdasdasdasdasdasdasdasdsa
  4. Click on Installation Destination
    1. Select both the OS install disk and the Swap disk
    2. Choose I will configure partitioning


    3. Clicking Done will bring up the Manual Partitioning screen
    4. Select Standard Partition for the new partitioning scheme
    5. Perform the steps bellow for each of the partitions in the table (Oracle DB & Oracle EM)
      Mount Point Desired Capacity File System Label Device(s)
      /boot 1024 MiB ext3 bootfs sda
      / 99 GB (63 GB actual) xfs rootfs sda
      swap 99 GB (16 GB actual) swap swapfs sdb
      1. Click the + button to bring up the Add a New Mount Point screen
      2. Fill in the requested info then click Add mount point


      3. Select the appropriate File System and enter the partition Label


      4. Click on Modify…
      5. Highlight the appropriate device and click Select


    6. Once completed with all partitions click Done
    7. Review the Summary of Changes and then click Accept Changes
  5. Click on Security Policy
    1. Choose Standard System Security Profile and click Select Profile
    2. Click Done to return to the main screen
  6. Click Begin Installation
  7. Set the root password by clicking Root Password
  8. Click User Creation
    Note: For purposes of this tutorial, the user here will be disabled at a later point.

    1. For Full name enter localadmin
    2. Check Make this user administrator
    3. Enter in a password
    4. Click Done to return the the installation screen
  9. When the installation is completed click Reboot

Initial Setup

  1. Agree to the license
  2. Click Finish Configuration


  3. You should now see a login screen, but DO NOT login
  4. SSH to your new server and login as root
  5. Disable the install user passwd -l localadmin
  6. You can now either apply the OS Tweaks below or skip over to Prep for Oracle Software

OS Tweaks

The following steps are not required to install the Oracle DB/EM software.  They are simply various ways I like to tweak the OS to suit my needs and preferences.

  1. Disable services
    1. Completely worthless
      systemctl disable avahi-daemon.service  #Zeroconf/Bonjour
      systemctl disable bluetooth.service     #Bluetooth
      systemctl disable ModemManager.service  #Cellular modems
      systemctl disable cups.service          #Printing services
    2. Unused in my environment
      systemctl disable firewalld.service     #Firewall
      systemctl disable mdmonitor.service     #software raid
      systemctl disable iscsi.service         #iSCSI
      systemctl disable iscsid.socket
      systemctl disable iscsiuio.socket
      systemctl disable lvm2-monitor.service  #LVM2
      systemctl disable lvm2-lvmetad.socket
      systemctl disable lvm2-lvmpolld.socket
      systemctl disable libvirtd.service      #Virtualization
  2. Tweak tcp keepalive
    1. Create conf files
      echo "#Keep FW from killing connections
      net.ipv4.tcp_keepalive_time = 1500
      net.ipv4.tcp_keepalive_intvl = 1500
      net.ipv4.tcp_keepalive_probes = 5" > /etc/sysctl.d/99-net-tcpkeepalive.conf
    2. Apply changes sysctl --system
  3. Enhance Bash
    1. Comment out command confirmations: nano /root/.bashrc
      # User specific aliases and functions
      
      #alias rm='rm -i'
      #alias cp='cp -i'
      #alias mv='mv -i'
    2. Deploy the LinearSoft linux-toolbag from GitHub
      wget https://raw.githubusercontent.com/LinearSoft/linux-toolbag/master/package/install.sh -O /tmp/lsoft-lt-install.sh
      chmod +x /tmp/lsoft-lt-install.sh
      /tmp/lsoft-lt-install.sh
      rm /tmp/lsoft-lt-install.sh
    3. Add Profile link
      ln -s /opt/linearsoft/toolbag/profile.d/all.sh /etc/profile.d/linearsoft-general.sh
  4. Update mail settings
    #Alter mail config to SmartHost
    sed -i 's/#myorigin = \$myhostname/myorigin = \$myhostname/g' /etc/postfix/main.cf
    sed -i 's/#relayhost = \[an\.ip\.add\.ress\]/relayhost = \[YOUR-SMTP-SERVER\.com\]/g' /etc/postfix/main.cf
    
    #Forward root email to central mailbox
    sed -i 's/^#root:.*$/root:    YOUR-EMAIL-ADDRESS@some-domain\.com/g' /etc/aliases
    
    #Apply changes
    newaliases
    service postfix restart
  5. Update SSHd settings
    1. Modify config file
      sed -i 's/#UseDNS yes/UseDNS no/g' /etc/ssh/sshd_config
      sed -i 's?#Banner none?Banner /etc/ssh/banner.txt?g' /etc/ssh/sshd_config
    2. Create banner file nano /etc/ssh/banner.txt
      • Oracle DB
        ----------------------------------------------------------------------
        |           __..--.                                   _.._           |
        |    _..--''_______|-._____  ______________________|``  __``--.._    |
        |   '-.-..---..---..---..--''.---..---..---..---..---..---..---.-'   |
        |     |_::___::___::___::___::___::___::___::___::___::___::___|     |
        |     |________________________________________________________|     |
        |     '.--.':'.--.' '.--.'  '.--.'  '.--.'  '.--.' '.--.' '.--.'     |
        |      |''|.|.|''|   |''|    |''|    |''|    |''|   |''|.|.|''|      |
        |      |''| |.|''|   |''|    |''|    |''|    |''|   |''| |.|''|      |
        |      |''|.|.|''|   |''|    |''|    |''|    |''|   |''|.|.|''|      |
        |      |''| |.|''|   |''|    |''|    |''|    |''|   |''| |.|''|      |
        |      |''|'|.|''|   |''|    |''|    |''|    |''|   |''|'|.|''|      |
        |    .-''''---''''---''''----''''----''''----''''---''''---''''-.    |
        |   '------------------------------------------------------------'   |
        ######################################################################
        ##                                                                  ##
        ##            Welcome to My Organizations Oracle server             ##
        ##             *Unathorized access prohibited by law*               ##
        ##                                                      (oracle12c) ##
        ######################################################################(EOF -- No CR/LF)
      • Oracle EM
        ----------------------------------------------------------------------
        |           __..--.                                   _.._           |
        |    _..--''_______|-._____  ______________________|``  __``--.._    |
        |   '-.-..---..---..---..--''.---..---..---..---..---..---..---.-'   |
        |     |_::___::___::___::___::___::___::___::___::___::___::___|     |
        |     |________________________________________________________|     |
        |     '.--.':'.--.' '.--.'  '.--.'  '.--.'  '.--.' '.--.' '.--.'     |
        |      |''|.|.|''|   |''|    |''|    |''|    |''|   |''|.|.|''|      |
        |      |''|.| |''|   |''|    |''|    |''|    |''|   |''| |.|''|      |
        |      |''|.|.|''|   |''|    |''|    |''|    |''|   |''|.|.|''|      |
        |      |''|_|_|__|   |''|    |''|    |''|    |''|   |''| |.|''|      |
        |      |'/  )| | ||  |''|    |''|    |''|    |''|   |''|'|.|''|      |
        |    .-'|`-' | | ||--''''----''''----''''----''''---''''---''''-.    |
        |   '---|| | | | ||----------------------------------------------'   |
        ######################################################################
        ##                                                                  ##
        ##          Welcome to My Organizations Oracle EM server          ##
        ##            *Unauthorized access prohibited by law*               ##
        ##                                                         (oraman) ##
        ######################################################################(EOF -- No CR/LF)
    3. Apply changes service sshd restart
  6. Partition Mounting
    • Alter fstab to use labels instead of UUIDs nano /etc/fstab
      Note: This will be a life-saver if the machine is ever mirrored

      #<file system>    <mount point>           <type>  <options>                     <dump> <pass>
      LABEL=bootfs      /boot                   ext3    defaults                      1      2
      LABEL=rootfs      /                       xfs     defaults                      0      0
      LABEL=swapfs      none                    swap    sw                            0      0
  7. System Updates
    1. Edit Yum configuration: nano /etc/yum.conf
      • Point to local caching server via proxy
        [main]
        ...
        proxy=http://YOUR-PROXY-SERVER\.com
      • Prevent unplanned kernel upgrades
        [main]
        ...
        exclude=kernel*
    2. Perform system update (including kernel)
      yum -y --disableexcludes=all update
    3.  If the kernel was updated reboot the system

That’s all folks

TAGS

0 Comments