Installing Oracle Database 11g on EL5 Linux x86 (OTN Installfest) Baltics --------------------------------------------------------------------- --note: sqldev & apex are installed for free by default with 11g -- Sept.2007 *** This guide is for test purposes only - not production *** ### Install Oracle 11g on EL5 Boot from EL5 dvd press enter for graphical install ** Need at least 1GB RAM / 3GB Space ** + Automaticaly or Manually partition your hard drive with Disk Druid /tmp = 512MB ext3 fixed size /boot = 128MB ext3 fixed size swap = 2048MB fixed size (expects 1.5GB swap default swap 2GB) / = fill to maximum allowable size + Accept defaults for GRUB boot loader, configure networking, set hostname eg.joburg hint: for testing disable ipv6 + Set time and root password + Mark the 'Software Development' checkbox, and select the 'customize now' radio button. + Make sure the packages essential for installing Oracle are selected. Desktop Environment : Gnome or KDE Applications : Editors - at least one editor - vi etc. Graphical Internet - a web browser eg.firefox Development : - Development Tools - Legacy Software Development Base System : - Java - legacy software support - Xwindow System + Uncheck the non-essential packages. Servers : Printing support + Most Linux distros and EL5 ship with default security preferences locked down. For testing purposes I typically turn off the firewall and disable SE Linux. For post-install configuration login as root -------------------------------------------- + Make sure that the pre-requisite rpms are installed # rpm -qa |grep libaio libaio-0.3.106-3.2 (the DB needs this for ASynch IO) # cd /media/cdrom/Server # rpm -ivh sysstat-7.0.0-3.el5.i386.rpm (runtime requirement for EM) # rpm -ivh libaio-devel-0.3.106-3.2.i386.rpm # rpm -ivh unixODBC-2.2.11-7.1.i386.rpm (if you plan on using ODBC) # rpm -ivh unixODBC-devel-2.2.11-7.1.i386.rpm (if you plan on using ODBC) + create groups # /usr/sbin/groupadd oinstall # /usr/sbin/groupadd dba # /usr/sbin/groupadd oper + create OS user oracle with group permissions # /usr/sbin/useradd -g oinstall -G dba,oper oracle # /usr/bin/passwd oracle + Create the directory for the software installation and assign ownership to oracle:oinstall # mkdir -p /opt/oracle/product/11g # chown -R oracle:oinstall /opt # chmod -R 775 /opt + Append user oracle's bash profile with PATH and ORACLE:BASE,HOME and SID information # vi /home/oracle/.bash_profile umask 022 PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin LD_LIBRARY_PATH=/usr/lib:/usr/X11R6/lib ORACLE_BASE=/opt/oracle ORACLE_HOME=$ORACLE_BASE/product/11g ORACLE_SID=orcl PATH=$ORACLE_HOME/bin:$PATH export PATH LD_LIBRARY_PATH ORACLE_BASE ORACLE_HOME ORACLE_SID + Make sure the correct kernel parmeters are appended to sysctl.conf # vi /etc/sysctl.conf (these can be easily copied from the Quick Installation Guide for Linux x86 doc on the Oracle11g DVD) kernel.shmall = 2097152 the el5 default value is already larger kernel.shmmax = 2147483648 the el5 default value is already larger kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.core.rmem_default = 4194304 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 262144 fs.file-max = 65536 net.ipv4.ip_local_port_range = 1024 65000 + set the kernel parameters or reboot # /sbin/sysctl -p + place the Oracle11g dvd in the media tray Login in to xwindows session as user oracle ------------------------------------------- + run the Database installer copy the dvd contents to the home directory $ ./11gR1db/runInstaller - follow the installer instructions (installer checks for 3GB of swap, default partitioning gives 2GB ) - set the oracle database password eg. welcome - use password mgmt to unlock DBuser HR & set password 'hr' + Installation successful https://joburg:1158/em (Login as user 'sys' as SYSDBA) (note: if you cannot access the database here but you can via sqlplus, then you probably need to install sysstat-7.0.0-3.el5.i386.rpm ) + The following enables the oracle user to dbshut, dbstart, lsnrctl start and stop As root # vi /etc/oratab change :N to :Y # cp /etc/oratab /home/oracle/oratab To launch sqldeveloper ---------------------- $ cd $ORACLE_HOME/sqldeveloper $ ./sqldeveloper.sh use the '+'icon to create a new connection '11g' change the SID from 'xe' to 'orcl' connect as user 'HR' with passwd 'hr' To enable and configure apex ---------------------------- $ cd $ORACLE_HOME/apex $ sqlplus /nolog SQL> connect sys as sysdba Enter password: Connected. SQL> @apxconf (runs apxconf.sql) when prompted, enter a password for the apex admin account (eg.apex_welcome) When prompted, enter the port for the Oracle XML DB HTTP server. The default port number is 8080. Note: Port numbers less than 1024 are reserved for use by privileged processes on many operating systems. SQL> ALTER USER ANONYMOUS ACCOUNT UNLOCK; (unlocks the anonymous account) User altered. SQL> quit + create a workspace in apex http://joburg:8080/apex/apex_admin login as admin/apex_welcome - change the passwd to your new supersecret passwd. and login - under the Manage Workspace tab click 'Create Workspace' - enter 'hr' at the Workspace Name and click next - Re-use select 'Yes'. enter 'HR' for the schema name and password 'hr' select '5 Megabytes' for the space quota then click next - enter 'HR/hr' as the admin username and password along with email address note: a new administrator user will be created in addition to the workspace - click create to confirm the provisioning of the new workspace and admin user. - logout as admin user + log into the new workspace http://joburg:8080/apex Workspace : hr Username : HR password : hr + useful commands to disable apex SQL> EXEC DBMS_XDB.SETHTTPPORT(0); SQL> COMMIT; to enable apex with default port 8080 SQL> EXEC DBMS_XDB.SETHTTPPORT(8080); SQL> COMMIT;