|
I have just seen that the new 11G XE beta is out for Windows and Linux x64 and decided to try it out. You can download it at http://www.oracle.com/technetwork/database/express-edition/11gxe-beta-download-302519.html. Unfortunately there is just an RPM and no DEB file. Here is the way how I achieve to run it on my Ubuntu 10.04 LTS x64. Create a .deb out of the RPMI used alien for the conversion, the resulting .deb is not a perfect one but it is a good start: sudo apt-get install alien sudo alien -d --scripts oracle-xe-11.2.0-0.5.x86_64.rpm InstallationNow I tried to install it but I got an error from /var/lib/dpkg/info/oracle-xe.postinst that /sbin/chkconfig does not exist. As I don't want to have Oracle started automatically on my laptop anyway I have just commented out the whole section of the script: if [ -f /etc/SuSE-release ]
then
/usr/lib/lsb/install_initd oracle-xe > /dev/null 2>&1
/sbin/insserv oracle-xe > /dev/null 2>&1
/sbin/SuSEconfig > /dev/null 2>&1
#else
# /sbin/chkconfig --add oracle-xe
fi
then I ran the script again and it went fine: # sudo /var/lib/dpkg/info/oracle-xe.postinst Executing post-install steps... You must run '/etc/init.d/oracle-xe configure' as the root user to configure the database. Additional dependenciesBefore doing the configuration I had to install the following dependency (which was not installed by apt-get) sudo apt-get install libaio1 Sanity checksBefore you proceed I would advice to make some sanity checks and see if the installation was successful Oracle user and groupgrep oracle /etc/passwd oracle:x:1001:1001::/u01/app/oracle:/bin/bash grep dba /etc/group dba:x:1001: If you don't see the oracle user or/and the group dba, something went wrong and I would deinstall the package, remove /u01 (sudo rm -rf /u01), create them manually and start the installation again Check if the placeholder in the init.ora file are correctly replaced# grep sga /u01/app/oracle/product/11.2.0/xe/config/scripts/init* /u01/app/oracle/product/11.2.0/xe/config/scripts/init.ora:sga_target=805306368 /u01/app/oracle/product/11.2.0/xe/config/scripts/initXETemp.ora:sga_target=805306368 If you see real numbers there then everything is OK, if you see %sga_target% instead of the numbers then the step with executing /var/lib/dpkg/info/oracle-xe.postinst was not ok Check the owner and permissions# ls -latr /u01/app/oracle/product/11.2.0/xe/bin/oracle -rwsr-s--x 1 oracle dba 178499800 2011-03-23 07:05 /u01/app/oracle/product/11.2.0/xe/bin/oracle If the owner is not oracle:dba then probably the user and the group were not created correctly so I would create them manually, remove the installation and the files and reinstall again (see further how to create the user and the group Configure the databaseRun sudo /etc/init.d/oracle-xe configure It will ask you for a password, ports for the listener and for the APEX server, you can accept the defaults. After some time it will say that everything is fine. (Optional) Create the oracle user and dba group manuallyCreate the dba group and oracle user: sudo /usr/sbin/groupadd dba sudo /usr/sbin/useradd -M -g dba -d /u01/app/oracle -s /bin/bash oracle Create a profile for the oracle user (vi/u01/app/oracle/.bash_profile and put the following settings) export ORACLE_SID=XE alias vi='vim' export ORACLE_BASE=$HOME export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/xe export ORACLE_TERM=xterm export _EDITOR=vim export NLS_LANG=american_america.utf8 export TNS_ADMIN=$ORACLE_HOME/network/admin export ORA_NLS33=$ORACLE_HOME/ocommon/nls/admin/data export LD_LIBRARY_PATH=$ORACLE_HOME/lib export PATH=$ORACLE_HOME/bin:$PATH Verify the databaseLogin with the user oracle and run some select statement sudo su - oracle sqlplus / as sysdba select count(1) from all_objects; If everything is fine you should get around 17901 objects. Now you can try APEX too: goto http://localhost:8080/apex (if you have accepted the default port during the installation)
Alexander Penev |
Skip to end of sidebar Go to start of sidebar |
34 Comments
Hide/Show CommentsApr 11, 2011
Anonymous
Great tutorial, thanks!
Apr 16, 2011
Anonymous
Nice job, this is a big help.
Note - I think in the "Configure" section the "configure" argument needs to be added:
/etc/init.d/oracle-xe configure
Apr 17, 2011
Alexander Penev
Sure, thank you for the correction.
Apr 25, 2011
Anonymous
hi, i'm following your step above, i even try more than 3 times, and still doesnt work
....
Starting Oracle Net Listener...Done
Configuring database...grep: /u01/app/oracle/product/11.2.0/xe/config/log/*.log: No such file or _directory
grep: /u01/app/oracle/product/11.2.0/xe/config/log/*.log: No such file or directory
Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details
also i still have %sga_target%
i do installing libaio1 too
did i miss something important step??
thanks
Apr 26, 2011
Alexander Penev
Have you edited the /var/lib/dpkg/info/oracle-xe.postinst file, commented out the following line:
and rerun /var/lib/dpkg/info/oracle-xe.postinst ?
Apr 27, 2011
Anonymous
hi, thanks for your reply..
actually i intend to, but my oracle-xe.postinst only contain following
#!/bin/sh
set -e
#Automatically added by dh_makeshlibs
if [ "$1" = "configure" ]; then
ldconfig
fi
#End automatically added section
and still after i rerun sudo /etc/init.d/oracle-xe configure
Starting Oracle Net Listener...Done
Configuring database...
Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details
i tried to run sqlplus and come with following result
$ORACLE_HOME/bin$ sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.2.0 Beta on Wed Apr 27 16:50:13 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/u01/app/oracle/product/11.2.0/xe/dbs/initXE.ora'
its really painful installing Oracle XE on Ubuntu instead of Enterprise edition, but i'm still trying.. hehehehe
Apr 28, 2011
Alexander Penev
very strange, here is the file /var/lib/dpkg/info/oracle-xe.postinst should be a copy of the POSTIN from the rpm script an looks like that:
I must admit I have no idea where your file comes from. You could try to to create this file manually and run it.
After that the sga_target should be replaced by the calculated values. Please try this and tell me if you database starts successfully after that.
Can you write which versions of ubuntu and alien you are using?
Best regards,
Alex
Apr 28, 2011
Anonymous
hi, thanks for the full script!
running script /var/lib/dpkg/info/oracle-xe.postinst is now fine
also /etc/init.d/oracle-xe configure ... great...
all above instruction is goin smoothly
except the last one..
i still get error when verified the database...
sqlplus "/as sysdba"
SQL*Plus: Release 11.2.0.2.0 Beta on Thu Apr 28 16:45:28 2011
Copyright (c) 1982, 2010, Oracle. All rights reserved.
ERROR:
ORA-09925: Unable to create audit trail file
Linux-x86_64 Error: 2: No such file or directory
Additional information: 9925
i check the group permission and its seems good .. oracle dba
ls -lad $ORACLE_HOME/rdbms/audit
drwxr-xr-x 2 oracle dba 4096 2011-04-27 14:24 /u01/app/oracle/product/11.2.0/xe/rdbms/audit
i'm keep looking if there is any direction into solving it somewhere..
btw i'm using ubuntu maverick 10.10
and alien version 8.81
May 09, 2011
Alexander Penev
I have just created a new VM with a stock ubuntu 10.10 64 bit. Then followed my howto step by step and everything went perfect
The VM is with 2G RAM, 20G disk space (just 6G used after the install).
So I would suggest to remove everything (deinstall the .deb, remove /u01) and start from scratch but really sticking 100% to the steps. Very important is to comment the 2 lines of /var/lib/dpkg/info/oracle-xe.postinst and run it again, then do the sanity checks and the rest will work for sure.
Hope you succeed this time.
best regards,
Alex
May 09, 2011
Anonymous
thanks alot. this tutorial just made my day.
May 15, 2011
Anonymous
There is a wrapper /sbin/chkconfig script around update-rc command:
http://www.directadmin.com/forum/showthread.php?t=22842
(NOTE: the script in that web page has double ""s and ""s which should be replaced by single "" and "")
With this script, there is no need to modify the postinst script.
May 15, 2011
Anonymous
Worked perfectly! Thanks for taking the time and making our lives easier...Oracle hasn't got around to it yet
May 25, 2011
Anonymous
Kiss principle....thanks man!
Jun 14, 2011
Anonymous
worked for me - thanks allot!
Jun 27, 2011
Anonymous
I tried to follow and for strange reason everything probably worked except there is no command to actually "Install RPM". So sudo alien will extract everything from RPM and bundle it into .deb file and does take some time. Once completed you need to run following command sequence.
$sudo dpkg -i oracle-xe-11.2.0-0.5.x86_64.rpm
Perhaps the owner of this article could add it to the instructions, unless I am missing it somewhere.
Kamran Shah
Jun 27, 2011
Anonymous
Also...
Since the installer does require /sbin/chkconfig, it may be worth adding the #sudo apt-get install chkconfig before you do anything. My command sequence was simply below four commands and following the instructions and it worked like magic.
$sudo apt-get install alien libaio1 chkconfig
$sudo alien -d --scripts oracle-xe-11.2.0-0.5.x86_64.rpm
$sudo dpkg -i oracle-xe-11.2.0-0.5.x86_64.rpm
$sudo /etc/init.d/oracle-xe configure
Kamran Shah
Jun 28, 2011
Alexander Penev
Thanks Kamran, I added an update at the end of the blog!
Alex
Jul 13, 2011
Anonymous
It is possible not to modify installation script with simple adding chkconfig script to the system via
sudo apt-get install chkconfig
Jul 14, 2011
Alexander Penev
sure, it is written as an update at the end of the blog
Jul 26, 2011
Anonymous
On Natty Narwhal 11.04 64bit, wasn't able to follow to follow this track successfully. Instead I seem to have Oracle XE 10g working via
the attack outlined at http://littlebrain.org/2008/05/12/how-to-install-oracle-xe-in-ubuntu-64-bit/#comment-196553755 fyi
– george herson
Jul 27, 2011
Alexander Penev
Hi George,
What kind of problems did you get? Could you paste some more info here?
Thanks,
Alex
Jul 27, 2011
Anonymous
/etc/init.d/oracle-xe configure
would either complain that Oracle wasn't available or, if it was available, that it couldn't be started because of a port conflict!
– george h
Jul 27, 2011
Alexander Penev
Can you put a dump of "netstat -nap" run as root here? Probably you have really a port conflict with another service
Jul 28, 2011
Anonymous
$ sudo netstat -nap|grep 1521
tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN 1044/tnslsnr
tcp 0 0 127.0.1.1:1521 127.0.0.1:44318 ESTABLISHED 1044/tnslsnr
tcp 0 0 127.0.0.1:1521 127.0.0.1:52510 ESTABLISHED 6838/oracleXE
tcp 0 0 127.0.0.1:44318 127.0.1.1:1521 ESTABLISHED 2940/xe_pmon_XE
tcp 0 0 127.0.0.1:1521 127.0.0.1:52511 ESTABLISHED 6840/oracleXE
tcp 0 0 127.0.0.1:1521 127.0.0.1:52509 ESTABLISHED 6836/oracleXE
tcp 0 0 127.0.0.1:1521 127.0.0.1:52505 ESTABLISHED 6828/oracleXE
tcp 0 0 127.0.0.1:1521 127.0.0.1:52512 ESTABLISHED 6842/oracleXE
tcp 0 0 127.0.0.1:1521 127.0.0.1:52506 ESTABLISHED 6830/oracleXE
tcp 0 0 127.0.0.1:1521 127.0.0.1:52508 ESTABLISHED 6834/oracleXE
tcp 0 0 127.0.0.1:1521 127.0.0.1:52507 ESTABLISHED 6832/oracleXE
tcp6 0 0 127.0.0.1:52510 127.0.0.1:1521 ESTABLISHED 3140/java
tcp6 0 0 127.0.0.1:52509 127.0.0.1:1521 ESTABLISHED 3140/java
tcp6 0 0 127.0.0.1:52512 127.0.0.1:1521 ESTABLISHED 3140/java
tcp6 0 0 127.0.0.1:52505 127.0.0.1:1521 ESTABLISHED 3140/java
tcp6 0 0 127.0.0.1:52507 127.0.0.1:1521 ESTABLISHED 3140/java
tcp6 0 0 127.0.0.1:52511 127.0.0.1:1521 ESTABLISHED 3140/java
tcp6 0 0 127.0.0.1:52508 127.0.0.1:1521 ESTABLISHED 3140/java
tcp6 0 0 127.0.0.1:52506 127.0.0.1:1521 ESTABLISHED 3140/java
From my memory of a week ago and looking at my command history of the time:
544 ps -ef|grep -i ora
545 kill 1702
546 sudo kill 1702
547 netstat -a --numeric-ports|grep 1521
548 sudo /etc/init.d/oracle-xe configure
I believe I confirmed that killing Oracle process 1702 freed up my port 1521 but that i again ran into the issue that
sudo /etc/init.d/oracle-xe configure
failed complaining Oracle wasn't available ("ORA-01034: ORACLE not available" litters my /u01/app/oracle/product/11.2.0/xe/config/log/ files). That's when I finally changed tact to trying the Oracle 10g .deb download.
– george h
Jul 28, 2011
Alexander Penev
Hi George,
Thanks for the listing but this seems to be the status after installing and running the XE. In order to find the reason why the 11G XE is not installing we would need the listing of ports without running Oracle.
Best regards,
Aex
Jul 28, 2011
Anonymous
Last week I wasn't running Oracle 10g so this probably isn't what I'd have gotten then, but after clicking Oracle XE 10g's Stop Database and exiting NetBeans:
$ sudo netstat -nap|grep 1521
tcp 0 0 0.0.0.0:1521 0.0.0.0:* LISTEN 1044/tnslsnr
tcp6 1 0 127.0.0.1:50444 127.0.0.1:1521 CLOSE_WAIT 8448/java
– george h
Aug 21, 2011
Anonymous
Thanks for these instructions, I was able to install 11g Express on Ubuntu. I found /var/lib/dpkg/info/oracle-xe.postinst to be the main culprit. After downloading the RPM and converting to deb via alien, install the debian package once and you will see the error related to oracle-xe.postinst. Then comment out the part in that script as instructed and execute the script again. After that run oracle script to configure the database and you are done!
Oct 13, 2011
Anonymous
It doesn't work for me. The error is "Database configuration error" in "/etc/init.d/oracle-xe configure".
In the init.ora file there isn't any placeholder. Maybe this is the problem?
Oct 14, 2011
Alexander Penev
Can you give some more information, which OS version, output of some log files?
Oct 19, 2011
Anonymous
hi.
i does not work for me too.
the output for sudo /etc/init.d/oracle-xe configure is:
Starting Oracle Net Listener...Done
Configuring database...
Database Configuration failed. Look into /u01/app/oracle/product/11.2.0/xe/config/log for details
i installed oracle without an error, then i modified the /var/lib/dpkg/info/oracle-xe.postinst file and commented out those two lines, run it but configuring as above lead to the error message. i also tried installing chkconfig and ran the original oracle-xe.postinst script without an error. but i get the same failure when running "oracle-xe configure".
the only difference i see is when doing your the sanity checks:
does not list me any files. in fact, the scripts in my installations are named init.ora and initXETemp.ora, so this files do not contain any placeholders!! could that be the problem?
i am using a fresh ubuntu 11.10 64bit desktop edition.
thanks, harald
Dec 04, 2011
Anonymous
Alexander,
thanks, nice tutorial.
Oracle have now released the production version of 11gXE. The installation steps are more or less the same as you have here ( apart from a few issues with NLS_LANG settings for some languages).
The steps I followed for installing are at http://mikesmithers.wordpress.com/2011/11/26/installing-oracle-11gxe-on-mint-and-ubuntu/
HTH
Mike
Jan 28, 2012
Anonymous
Hi,
oracle@swapnil-VPCEB46FG:~$ sqlplus / as sysdba
sqlplus: command not found
oracle@swapnil-VPCEB46FG:~$
I have followed all the steps mentioned above but I am getting above error. Can anyone please help here?
Jan 29, 2012
Alexander Penev
Can you give some more details? Which Ubuntu version are you using? Did you get some errors during the installation?
Does the file /u01/app/oracle/product/11.2.0/xe/bin/sqlplus exists?
Feb 16, 2012
Anonymous
Add Comment