LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 11-18-2003, 08:04 PM   #1
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Rep: Reputation: 32
enable start up scripits


can any one help me out please.

I'm lost.

I wish to start my programs so they load on start up

I know how to turn them on like so

/etc/rc.d/init.d/httpd start , /etc/rc.d/init.d/vsftpd start etc etc etc..

I did look into this file /etc/rc.d/rc.local

But i didn't see alot, well it did say i could add my won stuff in there
but i'm not sure how to do it...

any one give me some idea's on how to start these programs on boot so i dont have to restart them every time i start my server up

thanks tommytomato
 
Old 11-18-2003, 08:13 PM   #2
tiger3
Member
 
Registered: Nov 2003
Location: Land of the Rising Sun!
Distribution: Fedors Core 3, Red Hat 9, Mandrake 8.1
Posts: 52

Rep: Reputation: 15
You should be able to use the chkconfig command to turn on services at your next startup.

# chkconfig nfs on
# chkconfig nfslock on

Should work for most services:

# chkconfig httpd on
# chkconfig vsftpd on

Reboot to see if the service starts.
 
Old 11-18-2003, 08:21 PM   #3
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
If you're using redhat, you can use "redhat-config-services" to configure which service to load on startup. Otherwise go to /etc/rc.d/rc5.d (assuming runlevel 5 is your default), then make a sym link to the service you want to start in /etc/init.d, eg:
ln -s /etc/rc.d/init.d/httpd /etc/rc.d/rc5.d/S50httpd

for the S50httpd bit you can actually use any name you like, but keep in mind that the services start in the sequential order of their name inside the runlevel directory( /etc/rc.d/rcX.d ).
On top of my head I think mandrake and suse also use the same directories for storing startup scripts, not exactly sure though.
 
Old 11-18-2003, 08:22 PM   #4
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
Thanks for the relpy, i'll give it ago and see what happens

I'm still new to liunx but getting there.

here is what i did last night...

Did a fresh install to try and load in as less as possible....and it's a good way for me to learn

I did a custom install from the GUI installer....

I picked all the server stuff and a mozilla browser and vi, and thats it....
I created my user ( cooldude ) and i created a folder within ( cooldude called downloads, just in case i need to install any appz.
I created a group called www, # groupadd www, but i have not added cooldude to it yet...

I tried startx, and that worked, comes up like the windows win 3.1 style but green
So the mozilla browser works, when running it from startx window.
So now i can check my URL if needed...

I did try installing webmin, but i found it was out of place with the system, half of it said it was not configered right
So i left it be, on this install webmin is not in.

the httpd start page works on my XP browser ok...
and the ftp works, if i contect to it...

sounds to me that i'm doing all right, but what you reckon ?

also i may try install myphpadmin rpm, so i'll be able to excute the scripits for phpnuke when needed via browser..
instead of using webmin...

tommytomato
 
Old 11-18-2003, 08:43 PM   #5
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
well i tried what you said

and i get this error

bash: chkconfig : command not found


mmm, unless i'm doing it wrong..

tommytomato
 
Old 11-18-2003, 09:08 PM   #6
tiger3
Member
 
Registered: Nov 2003
Location: Land of the Rising Sun!
Distribution: Fedors Core 3, Red Hat 9, Mandrake 8.1
Posts: 52

Rep: Reputation: 15
Sorry, according to my books " you can use the chkconfig command to create the appropriate links in the /etc/rcX.d directories" This will edit them so you don't have to do it manually. The only other thing you may try is:
chkconfig httpd reload
or
chkconfig httpd restart

Otherwise I think you have to modify one of the rcX.d files (X is the runlevel)
 
Old 11-18-2003, 09:14 PM   #7
fsbooks
Member
 
Registered: Jan 2002
Location: Missoula. Montana, USA
Distribution: Slackware (various)
Posts: 464

Rep: Reputation: 52
What distribution are you using? Your problem could be that you are not running chkconfig as root. Typically chkconfig is located in /sbin, which is not usually in the default user's path. Check your path with "echo $PATH" . On redhat the package containing chkconfig is ... chkconfig, you could also see if it is installed "rpm -q chkconfig".
 
Old 11-18-2003, 09:21 PM   #8
tommytomato
Member
 
Registered: Nov 2003
Location: Narrogin Western Australia
Distribution: GUI Ubuntu 14.0.4 - Server Ubuntu 14.04.5 LTS
Posts: 963

Original Poster
Rep: Reputation: 32
My OS is

Fedora Core 1

I did get it going about 2 minutes ago

what i did was

make sure i was root user

cd to that dir /etc/rc.d

the i typed the command in like so

vi /etc/rc.d/rc.local then hit enter, the file came up.

then i hit ( i ) to insert then i put in the line
( /etc/init.d/vsftpd start )

then hit Esc key then ( :w ) to write then ( :q ) to quit the file.

and it works cool stuff....


thanks guys for all the help

tommytomato
 
Old 12-03-2003, 05:52 AM   #9
tiger3
Member
 
Registered: Nov 2003
Location: Land of the Rising Sun!
Distribution: Fedors Core 3, Red Hat 9, Mandrake 8.1
Posts: 52

Rep: Reputation: 15
When you get bash: chkconfig : command not found
Use the whereis command to find the directory the program is in. See example below

[tiger3@laptop home]$ chkconfig
bash: chkconfig: command not found
[tiger3@laptop home]$ whereis chkconfig
chkconfig: /sbin/chkconfig /usr/share/man/man8/chkconfig.8.gz

If a command is not in your search path it will not be accessable without its full path. (you have to put the directory it is in)
 
  


Reply


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
Where to start to enable DVB TV USB key? rollo Linux - Newbie 6 10-24-2005 11:11 AM
Enable to start graphical root-tools xpucto Linux - Software 1 09-19-2005 12:39 PM
Enable to start graphical root-tools xpucto Fedora 0 09-19-2005 07:51 AM
how to enable kdm or gdm at start up salahuddin_66 Slackware 2 08-18-2004 04:56 PM
enable eth1 and dhcp on start up dag33k Linux - Networking 5 03-05-2004 04:51 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:27 AM.

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