Linux Start Oracle As a Service

by on March 8, 2006 · 9 comments· LAST UPDATED September 15, 2010


How do I start the Oracle database server as a service under Linux operating systems?

Starting the Oracle database server is very easy under Linux:

a) Login as an oracle user

b) First start the Oracle listener processes using lsnrctl utility

c) Next start the Oracle database using dbstart utility that reads the oratab file (/etc/oratab)

d) Connect to server using sql plus client or isql pluse web based client

Type the following commands:
$ su - oracle
$ lsnrctl start
$ dbstart

To make the entire process easy we have a shell script that starts and stops Oracle database.

Download script to /tmp directory and rename it as oracle

Copy script to /etc/init.d directory:
# cp /tmp/oracle /etc/init.d/oracle
Create a soft link (Run level 3):

# cd /etc/rc3.d/
# ln -s ../init.d/oracle S100oracle
# ln -s ../init.d/oracle K100oracle

Alternatively, use the chkconfig command to add script:
# chkconfig --add oracle
# chkconfig --list oracle

Please note that you can just use script directly, to start the Oracle type the following command:
# /etc/init.d/oracle start
To stop the Oracle type the following command:
# /etc/init.d/oracle stop

Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 9 comments… read them below or add one }

1 gokalp May 7, 2008 at 10:56 am

Thanks a lot


2 abid mirza February 20, 2009 at 10:00 am

i did worked, thanks a lot


3 amit April 16, 2009 at 12:06 pm

it’s working..
thanks a lot..


4 william August 11, 2009 at 10:33 am

it works
thanks a lot!


5 Daniel September 15, 2010 at 6:18 am

The download link has been blocked.
Safe Browsing
Diagnostic page for
What is the current listing status for
Site is listed as suspicious – visiting this web site may harm your computer.
Part of this site was listed for suspicious activity 3 time(s) over the past 90 days.
What happened when Google visited this site?
Of the 17 pages we tested on the site over the past 90 days, 15 page(s) resulted in malicious software being downloaded and installed without user consent. The last time Google visited this site was on 2010-09-14, and the last time suspicious content was found on this site was on 2010-09-14.
Malicious software is hosted on 1 domain(s), including
1 domain(s) appear to be functioning as intermediaries for distributing malware to visitors of this site, including
This site was hosted on 1 network(s) including AS36351 (SOFTLAYER).
Has this site acted as an intermediary resulting in further distribution of malware?
Over the past 90 days, did not appear to function as an intermediary for the infection of any sites.
Has this site hosted malware?
No, this site has not hosted malicious software over the past 90 days.
How did this happen?
In some cases, third parties can add malicious code to legitimate sites, which would cause us to show the warning message.
Could you please fix it?
Thank you.


6 nixCraft September 15, 2010 at 7:35 am

This has been already fixed, but Google will take day or two to remove the same. Try wget.




7 bill October 20, 2010 at 7:16 pm

cheers. was very helpful.
on RHEL5U4.
Can you explain what the

# set username
# set password

are for?


8 clinton fisher November 18, 2010 at 8:09 pm

thank you for the script.
do i need to modify the script to use it in Ubuntu 10.10 Desktop , Debian base


9 Mark Sobkow March 25, 2012 at 12:24 am

For Ubuntu, if you use “alien” to install the Oracle 11g Express server, you will be left with an /etc/init.d/oracle-xe process management script intended for init.d based distributions.

Ubuntu has excellent documentation on how to wire that script to the system so it autostarts.


Leave a Comment

Tagged as: , , , , , , , , ,

Previous Faq:

Next Faq: