How to install OracleXE on openSUSE 11.1

Something that might help someone avoid one or two minor struggles:

1. Install openSUSE OraRun RPM v1.9-52 (http://ftp.novell.com/partners/oracle/sles-10/orarun.rpm)
orarun.rpm
NOTE – Because orarun is intended for OracleEnterprise not OracleXE, it must be re-configured (a.k.a cleaned-up :wink: after installation. See step 3. OraRun Cleanup.

2. Install Oracle-XE RPM
oracle-xe-10.2.0.1-1.0.i386.rpm
(It might be a good idea to reboot now)

3. OraRun Cleanup (as root)
(a) Create an XE-named copy of OraRun’s profile script “oracle.sh” – you will edit this file in step 4. Edit Profile
cp /etc/profile.d/oracle.sh /etc/profile.d/oracle-xe.sh
(b) Relocate “unwanted” OraTab config/setup files (keeping them, just in case)
mkdir /tmp/OraRun_BKUP
mv /etc/init.d/oracle /tmp/OraRun_BKUP/etc-init.d-oracle
mv /etc/profile.d/oracle.sh /tmp/OraRun_BKUP/etc-profile.d-oracle.sh
mv /etc/profile.d/oracle.csh /tmp/OraRun_BKUP/etc-profile.d-oracle.csh
mv etc/sysconfig/oracle /tmp/OraRun_BKUP/etc-sysconfig-oracle

4. Edit Profile file (/etc/profile.d/oracle-xe.sh)
(a) Change ORACLE_BASE from /opt/oracle to /usr/lib/oracle/xe/app/oracle
(b) Change ORACLE_HOME from $ORACLE_BASE/product/10.2/db_1 to $ORACLE_BASE/product/10.2.0/server
(c) Change ORACLE_SID from orcl to XE
(d) Comment out For RAC exports

For RAC

#export ORA_CRS_HOME=$ORACLE_BASE/product/10gR2/crs
#export ORA_ASM_HOME=$ORACLE_BASE/product/10gR2/asm
(e) Comment out AGENT_HOME

Grid Control Agent Home

#AGENT_HOME=$ORACLE_BASE/product/10.2/agent

5. Configure Oracle
As root, run → sh /etc/init.d/oracle-xe configure
HTTP port → 8080
database listener → 1521
password for database accounts → syspass <–or your preferred PW for SYSTEM/DBA user
start on boot → y

**6. Open Firewall to Oracle **(as necessary)
Yast Control Center > Security & Users > Firewall > Allowed Services (on left-nav)
Choose “External Zone” from ‘Allowed Services for Selected Zone’ dropdown
Click Advanced button
Add 1521 and 8080 to both TCP & UDP Ports
Navigate to Start-Up (on left-nav)
Click “Save Settings & Restart Firewall Now” button
Click “Next” button
Click “Finish” button

**7. Configure Users/Groups **(using Yast Control Center > Security & Users > User & Group Management)
NOTE.1 – OraRun installs using a user/group of oracle:oinstall while Oracle uses oracle:dba, so there may be a mix of both oinstall and dba groups in your installation. I prefer to make everything consistent with Oracle’s dba group [see next step, 8. Clarify/Unify], and then also add the group dba to my own personal user account.
NOTE.2 – If you don’t see the user oracle or group dba in YaST User & Group Management after the install, you may need to change to a custom filter whereby you can see both system & local users/groups
(a) Add/change group dba password (I use “dbapass” for the time being)
(b) Add group dba to your personal user account
(c) Add/change user oracle
Change password as necessary (I use “orapass” for now)
IF DisableUserLogin = <blank>, change LoginShell to /bin/bash

8. Clarify/Unify ownership/permission of Oracle files & folders
NOTE.1 – I’ve had the problem where the listener wouldn’t start no matter what I tried, until I discovered that the listener could not access /var/tmp/.oracle. As appropriate, execute the following:
chown -R oracle:dba /usr/lib/oracle
chmod -R 755 /usr/lib/oracle

chown -R oracle:dba /var/tmp/.oracle
chmod -R 755 /var/tmp/.oracle

chown -R oracle:dba /tmp/.oracle
chmod -R 755 /tmp/.oracle

chown oracle:dba /var/opt/oracle
chmod 755 /var/opt/oracle

9. Reboot (at the very least, completely shut down Oracle & re-start, which will also restart the listener)
After this if you do something in Oracle, login as user oracle (see step 10. Some Testing)

10. Some Testing

SQL*Plus

(a) Connect
su oracle
sqlplus sys/syspass as sysdba
<or> sqlplus system/syspass
<or> sqlplus “connect / as sysdba” ← pasword is blank
<or> sqlplus /nolog
SQL> connect / as sysdba
<or> etc.
(b) Create your Oracle account, perhaps called <your Linux usernam>+o, e.g. tmso
create user tmso identified by tmspass;
grant dba to tmso;
grant sysdba to tmso;
(c) Query the DB for something that strikes your fancy
select count(TABLE_NAME) as Qty_Views from DICTIONARY where substr(TABLE_NAME,1,2)=‘V$’;
select * from V$VERSION;
select dbms_xdb.gethttpport() from dual;
(e) Disconnect
exit

Listener Status (from bash as user oracle)

Run /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/lsnrctl status
Successful results look like:
LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 15-MAY-2009 18:14:18
Copyright (c) 1991, 2005, Oracle. All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC_FOR_XE)))
STATUS of the LISTENER

Alias LISTENER
Version TNSLSNR for Linux: Version 10.2.0.1.0 - Production
Start Date 15-MAY-2009 17:06:22
Uptime 0 days 1 hr. 7 min. 55 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Default Service XE
Listener Parameter File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
Listener Log File /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
Listening Endpoints Summary…
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=lin-tms)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=lin-tms)(PORT=8080))(Presentation=HTTP)(Session=RAW))
Services Summary…
Service “PLSExtProc” has 1 instance(s).
Instance “PLSExtProc”, status UNKNOWN, has 1 handler(s) for this service…
Service “XE” has 1 instance(s).
Instance “XE”, status READY, has 1 handler(s) for this service…
Service “XEXDB” has 1 instance(s).
Instance “XE”, status READY, has 1 handler(s) for this service…
Service “XE_XPT” has 1 instance(s).
Instance “XE”, status READY, has 1 handler(s) for this service…
The command completed successfully

Connect to DB Home Page using browser

So far I have been only partly successful connecting to the DB Home Page on http://127.0.0.1:8080/apex. With Firefox I still can’t connect, period. However, using openSUSE’s Konqueror web browser I can connect (Konqueror’s connection URL changes from http://127.0.0.1:8080/apex to http://127.0.0.1:8080/apex/f?p=4550:11:3631164448473123::NO::: at the connection).

11. You are now ready to be dangerous with Oracle XE … ;->
BTW, for a SQL client I use SQuirreLSQL, since I also use SQLite and SQuirreLSQL can connect to SQLite as well as Oracle
Driver
Oracle Thin Driver
Alias
Name: OracleXEsys
URL: jdbc:oracle:thin:@localhost:1521:XE
UserName: system
Password: syspass

**12. PS **-- Here is some miscellaneous info that may or may not be useful to you:

SOME ORACLE DB COMMANDS (should be run as user oracle, except for the force-reload which requires root):

/etc/init.d/oracle-xe force-reload ← Shuts down & restarts Oracle and Listener (requires root privileges)
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/lsnrctl stop ← stop Listener
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/lsnrctl start ← start Listener
/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/lsnrctl status <–Status Listener
tail -50 /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log ← view last 50 lines of listener.log

USE SQL*PLUS to change a user’s PW and/or access

alter user username identified by password account unlock

VARIOUS LINUX CMDS I used in the course of trying to figure out the listener (in no particular order)

nmap 127.0.0.1
netstat -anp | grep ‘^tcp.*LISTEN’
lsof -i4 -P | grep -i oracle
ps -ef | grep LISTENER
ip addr
hostname -vf
cat /etc/HOSTNAME
cat /etc/hosts
cat /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
cat /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/tnsnames.ora

Important parameters in /etc/init.d/oracle-xe configuration script:

ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
ORACLE_OWNER=oracle
ORACLE_SID=XE
LSNR=$ORACLE_HOME/bin/lsnrctl
SQLPLUS=$ORACLE_HOME/bin/sqlplus

ORARUN-1.9-52 File List:

/etc/init.d/oracle
/etc/profile.d/oracle.csh
/etc/profile.d/oracle.sh
/sbin/fuser
/usr/bin/fuser
/usr/lib/libInternalSymbols.a
/usr/lib/libInternalSymbols.so
/usr/lib/libInternalSymbols.so.1
/usr/sbin/rcoracle
/usr/share/doc/packages/orarun
/usr/share/doc/packages/orarun/README
/var/adm/fillup-templates/sysconfig.oracle

Thank you! thank you! thank you! I was going crazy trying to configure this properly (and without orarun)

A couple minor notes for anyone following the steps:

(1) I wasn’t sure how to interpret this line:
“IF DisableUserLogin = <blank>, change LoginShell to /bin/bash”
Ultimately, I un-checked the “Disable User Login” option in Yast, and so was able to su to the oracle user.

(2) When I initially logged in using:
sqlplus system/syspass
I did not have permission to run:
grant sysdba to tmso;
But, upon exiting sqlplus, and logging in again using:
sqlplus “connect / as sysdba” ← pasword is blank
I was able to successfully grant sysdba…

(3) I was able to connect to the DB Home Page (http://127.0.0.1:8080/apex) with Firefox as well as Konqueror…

After going through this post, I was just wondering why still someone wants to use Oracle instead of PostgreSQL :frowning:
(No flames please…)

Anyway, thank you for posting this. It is definitely useful.

Hi all,

I tried to install ORACLE XE at opensuse 11.2 but without success.

Everything seems to be ok, but the WebBrowser Interface doesn’t work.
The following output from the listener:


TNSLSNR for Linux: Version 10.2.0.1.0 - Production on 25-NOV-2009 09:07:13

Copyright (c) 1991, 2005, Oracle. All rights reserved.

System parameter file is /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
Log messages written to /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
Trace information written to /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/trace/listener.trc
Trace level is currently 0

Started with pid=5349
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC_FOR_XE)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost)(PORT=1521)))
Listener completed notification to CRS on start

TIMESTAMP * CONNECT DATA * PROTOCOL INFO * EVENT * SID * RETURN CODE
25-NOV-2009 09:07:13 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=linux-bjn9)(USER=oracle))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=169869568)) * stat
25-NOV-2009 09:07:13 * service_register * XE * 0
25-NOV-2009 09:07:13 * service_update * XE * 0

There can be seen, the webinterface listener won’t be started!

Are there any ideas?

Thank you best regards
Michael

Hi,
I installed ORACLE XE at opensuse 11.2
The su command in the oracle-xe configure script failt. I don’t know why, but the su command ask for a password for user oracle. After setting the oracle passwort to nothing the script runs sucsessfully.
But after that I changed the oracle user password to a new one.

In the info of command su is described that root can su to another user without password, but it don’t work. No idea why.

I’ve got a question for ya. Why did you use Ora Run? I tried, unsuccesfully, to install Oracle XE (10g) earlier this year on a Vector (slackware) box (learning experience!),

before successfully doing so on an Ubuntu machine. Would I have seen some benefit from using OraRun as well?

Btw, I’m considering changing the server to openSuse.

what is ora run?
I installed oracle xe reading the installation guide from oracle
(Oracle® Database Express Edition Installation Guide)
It worked 2 years ago installing oracle xe on opensuse 10.3.
And it worked now installing on opensuse 11.2, expect for the problem with su mentioned above.

Ok, :shame:, answered my own question by applying one bit of google-fu.

This
Orarun package - CoolSolutionsWiki

sez:

The orarun package is a rpm software package provided as part of SUSE Linux Enterprise Server (SLES) for the i386 and x86_64 platforms. The purpose of the orarun package is to simplify the installation and administration of Oracle software products. Use of the orarun package is not required to install or run Oracle products, but it is recommended as the package automates some of the manual steps involved in installing Oracle software on SLES. This Cool Solutions wiki page will describe in detail the features and contents of the orarun package.

:slight_smile:

Kudos on the how-to!

It turns out that after installing the oracle-xe rpm you need to run /etc/init.d/oracle-xe configure.

This will result in errors. Zooming in turns out the listener proces does not start up.

When you hack the xe.sh script in /etc/init.d and put a “strace -f -s 128 -o /tmp/stracefile” in front of the listener startup line you will see it does some libnss switch search stuff.

Turns out that adding your own ip and hostname to /etc/hosts fixed this installation mahem.

have a nice day.

Jeroen “Kwoot” Baten.

p.s. and this is yet another reason why I prefer PostgreSQL :slight_smile: