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. |
- Install latest Centos on a machine (6.2 x86_64)
- vi /etc/yum/pluginconf.d/fastestmirror.conf
include_only=mirror.aarnet.edu.au
- yum update ; reboot
- 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
- /etc/init.d/iptables restart
- chkconfig --level 2345 sshd on #enable sshd at startup
- 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
- 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
- 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
- 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
- vi /etc/selinux/config
SELINUX=disabled
- Reboot
- Log in as oracle
- 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
- Reboot
- 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
- Create the bb9 database by running dbca command as oracle user and then choosing appropriate (default?) options and db name = bb9
dbca
- Login as root
- 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
- Make dbora executable
chmod +x /etc/init.d/dbora
- Add dbora to startup and shutdown procedure
chkconfig --add dbora
- 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
- 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...
- Add latest Java 1.6 rpm from Oracle
chmod +x jdk-6u35-linux-x64-rpm.bin ./jdk-6u35-linux-x64-rpm.bin
- 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
- Run blackboard installer AS ROOT
java -jar bb-as-linux-9.1.82223.0.jar
- 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 $?
- Make blackboard executable
chmod +x /etc/init.d/blackboard
- Add blackboard to startup and shutdown procedure
chkconfig \--add blackboard
- vi /etc/inittab
id:3:initdefault:
- reboot
Comments (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.
Thanks Again, this was very helpful!