Installing ORACLE XE 11g on Debian Jessie:

Before anything, make sure you have at least 2GB of swap area on your disk. if you need more swap space, make a swap using a file.

Download and unzip Oracle XE 11g from http://www.oracle.com/technetwork/products/express-edition/downloads/index.html

 unzip oracle-xe-11.2.0-1.0.x86_64.rpm.zip 

run as user "root" :
 apt-get install alien libaio1 unixodbc vim         
 alien --scripts -d oracle-xe-11.2.0-1.0.x86_64.rpm 

Create a file named /sbin/chkconfig and put the shell script code below:
  #!/bin/bash                                                      
  # Oracle 11gR2 XE installer chkconfig hack for Ubuntu            
  file=/etc/init.d/oracle-xe							  
  if [[ ! `tail -n1 $file | grep INIT` ]]; then				  
  echo >> $file									  
  echo '### BEGIN INIT INFO' >> $file					  
  echo '# Provides: OracleXE' >> $file					  
  echo '# Required-Start: $remote_fs $syslog' >> $file		  
  echo '# Required-Stop: $remote_fs $syslog' >> $file			  
  echo '# Default-Start: 2 3 4 5' >> $file				  
  echo '# Default-Stop: 0 1 6' >> $file					  
  echo '# Short-Description: Oracle 11g Express Edition' >> $file  
  echo '### END INIT INFO' >> $file                                
  fi											  
  update-rc.d oracle-xe defaults 80 01					  
 
make it executable: 
 chmod +x /sbin/chkconfig 

add the following lines to /etc/sysctl.conf . They fix the linux kernel to allow oracle to use more memory:
  # Oracle 11g XE kernel parameters        
  fs.file-max=6815744                      
  net.ipv4.ip_local_port_range=9000 65000  
  kernel.sem=250 32000 100 128             

reload the sysctl: 
  sysctl -p 

run also as root:  
  ln -s /usr/bin/awk /bin/awk     
  mkdir /var/lock/subsys          
  touch /var/lock/subsys/listener 

now install the generated Debian oracle xe package, then configure it:
   dpkg --install oracle-xe_11.2.0-2_amd64.deb  
  /etc/init.d/oracle-xe configure               

add following lines to your $HOME/.bashrc file. remember to open a new terminal to run them . Don't  su  to root. not required:
  export ORACLE_HOME=/u01/app/oracle/product/11.2.0/xe    
  export ORACLE_SID=XE                                    
  export NLS_LANG=`$ORACLE_HOME/bin/nls_lang.sh`          
  export ORACLE_BASE=/u01/app/oracle                      
  export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
  export PATH=$ORACLE_HOME/bin:$PATH                      


start the Oracle 11gR2 XE :
 service oracle-xe start  

we move the /sbin/chkconfig script to anywhere just not conflict with the Debian package named "chkconfig"
 mv /sbin/chkconfig /root 
login as sysdba from command line from the new terminal:
 sqlplus sys as sysdba 
 
we now can create a normal oracle database user as follows:
  SQL> create user username identified by password;
    User created.                                  
  SQL> grant connect,resource to username;         
    Grant succeeded.                               
    

    
#################################################################################    
The following are to run the web interface of Oracle XE.    

also as sysdba:
 SQL> alter system set local_listener = '(ADDRESS=(PROTOCOL=TCP)(HOST=localhost)(PORT=1521))' scope = both;

change the passwords of the oracle users SYSTEM and SYS as following:
 SQL> alter user SYSTEM identified by new_password;
 SQL> alter user SYS identified by new_password;   



edit the file:
 vi /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora 

make the file lines similar to the following:

  SID_LIST_LISTENER =                                                                                      	
    (SID_LIST =                                                                                            	
      (SID_DESC =																	
	(SID_NAME = PLSExtProc)															
	(ORACLE_HOME = /u01/app/oracle/product/11.2.0/xe)										
	(PROGRAM = extproc)															
      )																		
    )																			
																			
    LISTENER =																	
      (DESCRIPTION_LIST =															
	(DESCRIPTION =																
	  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))										
	  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))								
	)																		
	(DESCRIPTION =																
	  (ADDRESS = (PROTOCOL = tcp)(HOST = 127.0.0.1)(PORT = 8080))(Presentation = HTTP)(Session = RAW)		
	)																		
      )																		
																			
    DEFAULT_SERVICE_LISTENER = (XE)														
   

   
   
edit another file:
 vi /u01/app/oracle/product/11.2.0/xe/network/admin/listener.ora 
 
make it similar to the following lines:

  XE =											
    (DESCRIPTION =									
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))	
      (CONNECT_DATA =									
	(SERVER = DEDICATED)								
	(SERVICE_NAME = XE)								
      )											
    )												
												
    XEXDB =											
      (DESCRIPTION =									
	(ADDRESS_LIST =									
	  (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 8080))	
	)											
	(CONNECT_DATA =									
	  (SERVER = DEDICATED)								
	  (SERVICE_NAME = XEXDB)							
	)											
      )											
												
    EXTPROC_CONNECTION_DATA =								
      (DESCRIPTION =									
	(ADDRESS_LIST =									
	  (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC_FOR_XE))			
	)											
	(CONNECT_DATA =									
	  (SID = PLSExtProc)								
	  (PRESENTATION = RO)								
	)											
      )											



   
start the listener:
   /u01/app/oracle/product/11.2.0/xe/bin/lsnrctl start 
 
to see listener status:
   /u01/app/oracle/product/11.2.0/xe/bin/lsnrctl status 
   
   
NOW you can run the web interface, BUT we need to login to the apex_admin on the following address. we need to reset the password of the user named ADMIN:
  http://localhost:8080/apex/apex_admin 
 
to reset password of ADMIN we login as sysdba and run an sql script named apxchpwd.sql
 sqlplus / as sysdba                                       
 SQL> @/u01/app/oracle/product/11.2.0/xe/apex/apxchpwd.sql 

follow the script prompt lines then login again on the apex_admin page with the reset password then make a new strong password for ADMIN. then finally login with it again.

##########
End of Manual

Number of page hits=93724 Your IP is 54.225.59.242

All rights reserved for Superlinux.net. Website Powered by Tcl scripting language and the Tcl for the Apache 2 module Rivet same website in PHP here This website is run by Host1Plus.com