Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
services at startup
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
soldstatic
Guru
Guru


Joined: 02 Jun 2006
Posts: 305

PostPosted: Sat Jul 01, 2006 4:18 pm    Post subject: services at startup Reply with quote

i know i could do this with cron jobs or something, but how do i run commands at start up
ie
/etc/apache2 start

so that way i can have the server running w/o someone needing to log on?
Back to top
View user's profile Send private message
Jogie214
Tux's lil' helper
Tux's lil' helper


Joined: 15 Aug 2004
Posts: 144
Location: Cologne / Germany

PostPosted: Sat Jul 01, 2006 4:21 pm    Post subject: Reply with quote

Hi!

With apache2 it's realy simple:
Code:

rc-update add apache2 default

Anything else can be added to /etc/conf.d/local.start, everything in this file is executed after any other boot services are started, you should of course add local (same command as above) to your default run level.

Sebastian
_________________
Desktop: Core 2 Duo E6600 / Asus P5B / 4GB DDR2-800 / Ati HD-4850/ Sidux amd64
Server : Phenom2 905e / Asus M4A785TD-V / 8GB DDR3-1333 / Geforce 8600GT / Gentoo amd64
Laptop : Core 2 Duo 5500 / HP nx7300 / 4 GB-RAM / Intel / Gentoo amd64
Back to top
View user's profile Send private message
soldstatic
Guru
Guru


Joined: 02 Jun 2006
Posts: 305

PostPosted: Sat Jul 01, 2006 4:24 pm    Post subject: Reply with quote

ok, well to be specific i need apache1,mysql, and sshd....
is it the same?
and where do i go to see whats already in rc-update?
Back to top
View user's profile Send private message
soldstatic
Guru
Guru


Joined: 02 Jun 2006
Posts: 305

PostPosted: Sat Jul 01, 2006 4:27 pm    Post subject: Reply with quote

if i do rc-update show, i get:

Code:
andy # rc-update show
           alsasound |
             apache2 |
            bootmisc | boot
             checkfs | boot
           checkroot | boot
               clock | boot
            coldplug | boot
         consolefont | boot
         crypto-loop |
               cupsd |
          domainname | boot
              esound |
            gkrellmd |
                 gpm |
              hdparm |
            hostname | boot
             hotplug |
             keymaps | boot
                lisa |
               local |      default nonetwork
          localmount | boot
             modules | boot
               mysql |
            net.eth0 |      default
              net.lo | boot
            netmount |      default
                nscd |
             numlock |
          portsentry |
             pwcheck |
             reslisa |
           rmnologin | boot
              rsyncd |
           saslauthd |
               spamd |
                sshd |
            svnserve |
           syslog-ng |      default
             urandom | boot
          vixie-cron |      default
                 xdm |      default


And I can see sshd and apache2 and mysql already in there i think... does that mean its already working?
Back to top
View user's profile Send private message
po0f
Apprentice
Apprentice


Joined: 08 Apr 2004
Posts: 162

PostPosted: Sat Jul 01, 2006 4:41 pm    Post subject: Reply with quote

All of those startup scripts can be added to the default runlevel. You would want to do:
Code:
# rc-update add mysql default
# rc-update add apache2 default


Any of the startup scripts in /etc/init.d/ can be started this way automatically at boot. The configuration for how they start up is stored in /etc/conf.d/. You might want to add:
Code:
# rc-update add alsasound default

if you plan on hearing anything coming out of your speakers.
Back to top
View user's profile Send private message
soldstatic
Guru
Guru


Joined: 02 Jun 2006
Posts: 305

PostPosted: Sat Jul 01, 2006 5:31 pm    Post subject: Reply with quote

and
Code:
rc-update add sshd default


for ssh right?
Back to top
View user's profile Send private message
frenkel
Veteran
Veteran


Joined: 13 May 2003
Posts: 1034
Location: .nl

PostPosted: Sat Jul 01, 2006 5:34 pm    Post subject: Reply with quote

soldstatic wrote:
and
Code:
rc-update add sshd default


for ssh right?

Yes.
Back to top
View user's profile Send private message
soldstatic
Guru
Guru


Joined: 02 Jun 2006
Posts: 305

PostPosted: Sat Jul 01, 2006 5:46 pm    Post subject: Reply with quote

Thank you VERY mucH!!!!!!!!!
Back to top
View user's profile Send private message
nixnut
Administrator
Administrator


Joined: 09 Apr 2004
Posts: 10973
Location: the dutch mountains

PostPosted: Sat Jul 01, 2006 6:24 pm    Post subject: Reply with quote

Moved from Installing Gentoo to Duplicate Threads.
See here please: https://forums.gentoo.org/viewtopic-t-306915.html
_________________
Please add [solved] to the initial post's subject line if you feel your problem is resolved. Help answer the unanswered

talk is cheap. supply exceeds demand
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum