Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 01-02-2006, 10:00 PM   #1
LQ Newbie
Registered: Jan 2006
Distribution: Debian, Gentoo, FreeBSD
Posts: 19

Rep: Reputation: 0
Question Not sure how to run terminal commands at startup


I just installed OpenSuSE Linux 10 on my machine to run a webserver. I configured everything so it would work, but I need to start the server when Linux boots. And the only way to do that is through super-user mode on my terminal.
This is what I need to do to start my server:

mandrakethepenguin@(hostname):~> cd /home/mandrakethepenguin/abyssws/
mandrakethepenguin@(hostname):~/abyssws> su
Password: (my root password)
(hostname):/home/mandrakethepenguin/abyssws # ./abyssws

If I execute the server under normal user mode, the server has a listening problem (www on port 80 and web console on port 1024)

Im sure there is a script i could bind this information to, but im unsure how. Any help would be apreciated.
Old 01-02-2006, 10:54 PM   #2
Registered: Aug 2004
Location: INDIA
Distribution: Various Distros
Posts: 203

Rep: Reputation: 31
hello mandrakethepenguin,

Look at your services (via control panel) and enable apache or httpd service to start on boot. This will launch webserver on boot of your system.

Thanks, Kirtimaan
Old 01-02-2006, 10:59 PM   #3
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
The first thing to do is figure out what runlevel your system boots into by default. Look for a line that liks like "id:n:initdefault" in /etc/inittab (the n is a number, usually 3 or 5 that specifies the runlevel to boot to). Then go into the /etc/init.d directory and create a script to start your service (look at the other scripts for examples, but if you call "<scriptname> start" it should start the service). Then add a symlink to your script in /etc/init.d/rcn.d, again replacing n with the runlevel you boot into, e.g. /etc/init.d/rc3.d for run level 3. The file name of the link should have the form SXXyourservice (again look at the other links in the directory). The XX is a number that describes where in the sequence it starts, higher numbers later -- put your service towards the end after networking and other system functions have been brought up.

Some distros provide a rc.local script that you can just add commands to, but I'm using SuSE 9.3 anbd it does not seem to have that (only a boot.init and you need to have networking set up before your server can start). Maybe SuSE 10 does. In any case, type "man init.d" (no quoters) at a command prompt to read up on mnore details about how the initialization works. SuSE uses standard System V style init scripts, so Googling on that term should also help. It looks complicated at first but is really dead simple once you have the knack of it.
Old 01-04-2006, 07:47 PM   #4
LQ Newbie
Registered: Jan 2006
Distribution: Debian, Gentoo, FreeBSD
Posts: 19

Original Poster
Rep: Reputation: 0

Actually, I don't use Apache webserver, I use Abyss Webserver ( Im using OpenSuSE 10, it comes with a rc.local file
Old 01-04-2006, 08:04 PM   #5
Senior Member
Registered: Aug 2003
Location: Houston, TX
Distribution: Arch
Posts: 1,380

Rep: Reputation: 47
you could make a /bin/sh and put it in /etc/init.d/rcX.d, /sbin/init.d/rcX.d or ??? or I think mandriva may use /etc/modprobe.preload. Take a look at that as well.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
making a script that opens terminal and enter commands into that terminal Cinematography Linux - General 8 12-16-2008 10:34 AM
Help to create a script to open a terminal and run commands in it. Brian1 Linux - Software 6 02-07-2005 06:46 PM
Run user command on Terminal startup coolfrog Linux - General 4 09-26-2004 09:08 AM
how to make/run startup scripts/commands ViN86 Slackware 3 04-24-2004 10:02 AM
How do I run commands at startup? Like Services in Windows defubar Linux - Newbie 4 02-02-2004 10:57 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:35 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration