John from the UK recently pointed out that if you did Not choose to start up XE on bootup during the configuration stage of following this
install guide for installing XE on Debian, Kubuntu or Ubuntu . It was not very clear as to how you could then start up XE after rebooting.
Here is one way to get around that, there are probably more elegant workarounds but this one worked for me on kubuntu.
ttrichle@nkosi-kubuntu:~$ su -
Password:
root@nkosi-kubuntu:~# /etc/init.d/oracle-xe configure
Oracle Database 10g Express Edition is already configured
root@nkosi-kubuntu:~#
1. Set the password for the user 'oracle' that was created during the oracle-xe install
root@nkosi-kubuntu:~# passwd oracle
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
2. Edit /etc/oratab file
root@nkosi-kubuntu:~# cat /etc/oratab
XE:/usr/lib/oracle/xe/app/oracle/product/10.2.0/server:N
root@nkosi-kubuntu:~# vi /etc/oratab
-edit the oratab file and change :N to :Y
root@nkosi-kubuntu:~# cp /etc/oratab /usr/lib/oracle/xe/oratab
by doing the above step you will be able to use the lisnrctl start and stop commands as user 'oracle'
3. Set Oracle environment variables for PATH, ORACLE_HOME & ORACLE_SID.
root@nkosi-kubuntu:~# vi /etc/profile ...and insert the following above the export command
ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
ORACLE_SID=XE
PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:$PATH
... and make sure you export the Oracle HOME & SID
export ORACLE_HOME ORACLE_SID
4. Add your local user to the dba group, so that you can use the menu items generated during the oracle-xe install process.
5. As user oracle stop and start your listener
root@nkosi-kubuntu:~# su - oracle
oracle@nkosi-kubuntu:~$ pwd
/usr/lib/oracle/xe
oracle@nkosi-kubuntu:~$ lsnrctl stop
oracle@nkosi-kubuntu:~$ lsnrctl start
6. Use the menue item to start the database (this will take a little time)
At this point you should be able to open up http://127.0.0.1:8080/apex in a browser and login in as sys with the password you used during configuring oracle-xe
ttrichle@nkosi-kubuntu:~$ ps -ef |grep smon
oracle 5484 1 0 18:20 ? 00:00:00 xe_smon_XE
ttrichle 5760 5527 0 18:35 pts/2 00:00:00 grep smon
ttrichle@nkosi-kubuntu:~$
You can also use sqlplus located here to start and stop the database
oracle@nkosi-kubuntu:~$ cd /usr/lib/oracle/xe/app/oracle/product/10.2.0/server
oracle@nkosi-kubuntu:~/app/oracle/product/10.2.0/server$ ls
bin ctx demo jdbc ldap log nls opmn plsql rdbms sqlplus
config dbs hs jlib lib network odbc oracore precomp slax xdk
for more information on using sqlplus check out the sqlplus homepage on OTN
http://www.oracle.com/technology/tech/sql_plus/index.htmlhope that helps
- Todd.
Please note: if you always want to start XE on bootup edit the /etc/default/oracle-xe file and change
ORACLE_DBENABLED=false to true.
ttrichle@nkosi-kubuntu:~$ su -
Password:
root@nkosi-kubuntu:~# cat /etc/default/oracle-xe
#This is a configuration file for automatic starting of the Oracle
#Database and listener at system startup.It is generated By running
#'/etc/init.d/oracle-xe configure'.Please use that method to modify this
#file
# ORACLE_DBENABLED:'true' means to load the Database at system boot.
ORACLE_DBENABLED=false
# LISTENER_PORT: Database listener
LISTENER_PORT=1521
# HTTP_PORT : HTTP port for Oracle Application Express
HTTP_PORT=8080
# Configuration : Check whether configure has been done or not
CONFIGURE_RUN=true
root@nkosi-kubuntu:~# vi /etc/default/oracle-xe