Access Keys:
Skip to content (Access Key - 0)

Installing Oracle and Blackboard on Centos

This is a guide for creating a Development installation using Centos. If you want to create a production instance of Blackboard, please refer to the official Blackboard documentation.
  1. Install latest Centos on a machine (6.2 x86_64)
  2. vi /etc/yum/pluginconf.d/fastestmirror.conf
    include_only=mirror.aarnet.edu.au
    
  3. yum update ; reboot
  4. vi /etc/sysconfig/iptables
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 443 -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 2222 -j ACCEPT
    -A INPUT -m state --state NEW -m tcp -p tcp --dport 1521 -j ACCEPT
    
  5. /etc/init.d/iptables restart
  6. chkconfig --level 2345 sshd on #enable sshd at startup
  7. vi /etc/sysctl.conf
    fs.suid_dumpable = 1
    fs.aio-max-nr = 1048576
    fs.file-max = 6815744
    kernel.shmmni = 4096
    # semaphores: semmsl, semmns, semopm, semmni
    kernel.sem = 250 32000 100 128
    net.ipv4.ip_local_port_range = 9000 65500
    net.core.rmem_default=4194304
    net.core.rmem_max=4194304
    net.core.wmem_default=262144
    net.core.wmem_max=1048586
    
  8. vi /etc/security/limits.conf
    oracle              soft    nproc   2047
    oracle              hard    nproc   16384
    oracle              soft    nofile  4096
    oracle              hard    nofile  65536
    oracle              soft    stack   10240
    
  9. Install necessary packages
    yum install binutils compat-libcap1 compat-libstdc++-33 elfutils-libelf-devel elfutils-libelf gcc-c++ gcc glibc glibc-common glibc-devel glibc-headers ksh libaio-devel libaio libgcc libstdc++-devel libstdc++ make nss-softokn freebl numactl-devel sysstat unixODBC unixODBC-devel
    
  10. Create groups and users
    groupadd -g 501 oinstall
    groupadd -g 502 dba
    groupadd -g 503 oper
    groupadd -g 504 asmadmin
    groupadd -g 506 asmdba
    groupadd -g 505 asmoper
    useradd -u 502 -g oinstall -G dba,asmdba,oper oracle
    passwd oracle
    useradd bbuser
    passwd bbuser
    
  11. vi /etc/selinux/config
    SELINUX=disabled
    
  12. Reboot
  13. Log in as oracle
  14. vi .bash_profile
    # Oracle Settings
    TMP=/tmp; export TMP
    TMPDIR=$TMP; export TMPDIR
    ORACLE_HOSTNAME=localhost.localdomain; export ORACLE_HOSTNAME
    ORACLE_UNQNAME=bb9; export ORACLE_UNQNAME
    ORACLE_BASE=/home/oracle/app/oracle; export ORACLE_BASE
    ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME
    ORACLE_SID=bb9; export ORACLE_SID
    PATH=/usr/sbin:$PATH; export PATH
    PATH=$ORACLE_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
    
  15. Reboot
  16. Install Oracle 11.2 as oracle user. The installer may complain that you are missing some required packages. This is because it does not detect updated packages that you will have installed above. You can safely click Ignore All if this happens
    cd database
    ./runInstaller
    
  17. Create the bb9 database by running dbca command as oracle user and then choosing appropriate (default?) options and db name = bb9
    dbca
    
  18. Login as root
  19. Create /etc/init.d/dbora
    #!/bin/sh
    # chkconfig: 345 99 10
    # description: Oracle auto start-stop script.
    #
    # Set ORA_HOME to be equivalent to the $ORACLE_HOME
    # from which you wish to execute dbstart and dbshut;
    #
    # Set ORA_OWNER to the user id of the owner of the
    # Oracle database in ORA_HOME.
    export ORACLE_BASE=/home/oracle/app/oracle
    export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1
    export ORACLE_HOME_LISTNER=$ORACLE_HOME
    export ORACLE_OWNR=oracle
    export ORACLE_OWNER=oracle
    export ORACLE_SID=bb9
    export ORACLE_UNQNAME=bb9
    export ORACLE_HOSTNAME=localhost.localdomain
    export PATH=$PATH:$ORACLE_HOME/bin
    if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]
    then
        echo "Oracle startup: cannot start"
        exit 1
    fi
    case "$1" in
        start)
            # Oracle listener and instance startup
            echo -n "Starting Oracle: "
            su $ORACLE_OWNR -c "$ORACLE_HOME/bin/emctl start dbconsole"
            su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl start"
            su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbstart $ORACLE_HOME"
            touch /var/lock/subsys/dbora
            echo "OK"
            ;;
        stop)
            # Oracle listener and instance shutdown
            echo -n "Shutdown Oracle: "
            su $ORACLE_OWNR -c "$ORACLE_HOME/bin/lsnrctl stop"
            su $ORACLE_OWNR -c "$ORACLE_HOME/bin/dbshut $ORACLE_HOME"
            su $ORACLE_OWNR -c "$ORACLE_HOME/bin/emctl stop dbconsole"
            rm -f /var/lock/subsys/dbora
            echo "OK"
            ;;
        reload|restart)
            $0 stop
            $0 start
            ;;
        *)
            echo "Usage: `basename $0` start|stop|restart|reload"
            exit 1
    esac
    exit 0
    
  20. Make dbora executable
    chmod +x /etc/init.d/dbora
    
  21. Add dbora to startup and shutdown procedure
    chkconfig --add dbora
    
  22. vi /etc/oratab. If you have followed the step above /re creating the database you may not need to add this line
    bb9:/home/oracle/app/oracle/product/11.2.0/db_1:Y
    
  23. Manually configure bb9 SID listener for Oracle and restart listener services
    vi /home/oracle/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
    
    # listener.ora Network Configuration File: /home/oracle/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
    # Generated by Oracle configuration tools.
    
    LISTENER =
      (DESCRIPTION_LIST =
        (DESCRIPTION =
          (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
          (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
        )
      )
    
    ADR_BASE_LISTENER = /home/oracle/app/oracle
    SID_LIST_LISTENER =
      (SID_LIST = 
        (SID_DESC =
          (ORACLE_HOME = /home/oracle/app/oracle/product/11.2.0/db_1)
          (SID_NAME = bb9)
        )
      )
    
    lsnrctl stop
    lsnrctl start
    

    You should now be able to issue the lisnrctl status command to see that your bb9 listener is running. You may only have one listener for the SID listed and with a status of UNKNOWN. This is fine for now and should change one Blackboard is up and running

    lsnrctl status
    
    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 15-NOV-2012 06:01:40
    
    Copyright (c) 1991, 2009, Oracle.  All rights reserved.
    
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
    STATUS of the LISTENER
    ------------------------
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 11.2.0.1.0 - Production
    Start Date                15-NOV-2012 05:29:41
    Uptime                    0 days 0 hr. 31 min. 58 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Listener Parameter File   /home/oracle/app/oracle/product/11.2.0/db_1/network/admin/listener.ora
    Listener Log File         /home/oracle/app/oracle/diag/tnslsnr/localhost/listener/alert/log.xml
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
    Services Summary...
    Service "bb9" has 2 instance(s).
      Instance "bb9", status UNKNOWN, has 1 handler(s) for this service...
    
  24. Add latest Java 1.6 rpm from Oracle
    chmod +x jdk-6u35-linux-x64-rpm.bin
    ./jdk-6u35-linux-x64-rpm.bin
    
  25. Make sure the bbuser account exists. Otherwise your build will fail User should have been created at the same time as you created the oracle user
  26. Run blackboard installer AS ROOT
    java -jar bb-as-linux-9.1.82223.0.jar
    
  27. Create /etc/init.d/blackboard
    #!/bin/bash
    # chkconfig: 345 99 10
    # description: Blackboard auto start-stop script.
    #
    #       /etc/rc.d/init.d/blackboard
    #
    # This shell script takes care of starting and stopping Blackboard
    #
    #
    BLACKBOARD_DIR=/usr/local/blackboard
    case "$1" in
        start)
            $BLACKBOARD_DIR/tools/admin/ServiceController.sh services.start
            ;;
        stop)
            $BLACKBOARD_DIR/tools/admin/ServiceController.sh services.stop
            ;;
        status)
            $BLACKBOARD_DIR/tools/admin/ServiceController.sh services.status
            ;;
        restart)
            $BLACKBOARD_DIR/tools/admin/ServiceController.sh services.restart
            ;;
        *)
            echo "Usage:  {start|stop|status|restart}"
            exit 1
            ;;
    esac
    exit $?
    
  28. Make blackboard executable
    chmod +x /etc/init.d/blackboard
    
  29. Add blackboard to startup and shutdown procedure
    chkconfig \--add blackboard
    
  30. vi /etc/inittab
    id:3:initdefault:
    
  31. reboot
  1. 17 Jul 2012

    Benjamin Jezyk says:

    very nice job on this! a little feedback from what i've experienced when i ...

    very nice job on this!

    a little feedback from what i've experienced when i ran through it.

    •    related to step #16 and the pre-req check (solution via: http://telinit0.blogspot.com/2010/11/rhel6-64-bit-and-oracle-11g-r2.html)
       install then started but encountered another error during a pre-req
              check - there are "missing" packages:
      
              libaio-0.3.105
              compat-libstdc++-33-3.2.3
              libaio-devel-0.3.105
              libgcc-3.4.6
              libstdc++-3.4.6
              unixODBC-2.2.11
              unixODBC-devel-2.2.11
              pdksh-5.2.14
      
      
              these packages are old versions. RHEL6 ships with the following:
      
              libaio-0.3.107-10.el6.x86_64
              libaio-0.3.107-10.el6.i686
              libaio-devel-0.3.107-10.el6.x86_64
              libaio-devel-0.3.107-10.el6.i686
              compat-libstdc++-33-3.2.3-69.el6.x86_64
              compat-libstdc++-33-3.2.3-69.el6.i686
              libgcc-4.4.4-13.el6.x86_64
              libgcc-4.4.4-13.el6.i686
              unixODBC-2.2.14-11.el6.x86_64
              unixODBC-devel-2.2.14-11.el6.x86_64
      
      
              (these packages will be installed by the kickstart file above).
      
              pdksh is no longer part of rhel6. i did install the following:
      
              ksh-20100621-2.el6.x86_64
              mksh-39-4.el6.x86_64
      
      
              So i chose "Ignore All" and continued the installation. it finished with
              no additional complaints.
      
    • after creating /etc/init.d/dbora, make sure its executable (maybe: chmod 550 /etc/init.d/dbora)
      • then make sure it is up and running before moving forward
    • i think that there may be a step missing before #19, regarding running the "Database Configuration Assistant" (located: /home/oracle/app/oracle/product/11.2.0/db_1/bin/dbca)
    • in Step #23 it looks like the Blackboard install directory is '/opt', the installer defaulted me to '/usr/local'.  (i wonder if the default setting is at all related to the location of the JDK)

    Thanks Again, this was very helpful!

Adaptavist Theme Builder (4.1.3) Powered by Atlassian Confluence 3.3, the Enterprise Wiki