Rapha Posted October 1, 2006 Report Share Posted October 1, 2006 Hi, I've just installed MySQL 5 and Apache 2.0.59, and I want to know how to run those services at startup. Thank You! :D Quote Link to comment Share on other sites More sharing options...
tyme Posted October 2, 2006 Report Share Posted October 2, 2006 Open Mandriva Control Center, there should be a "Services" section that lists all the services. Click the option beside these two to have them start at boot. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted October 2, 2006 Report Share Posted October 2, 2006 Just in case it's not obvious, the apache service will probably be called "httpd" and not "apache" or anything like that. Mysql is "mysqld". Quote Link to comment Share on other sites More sharing options...
Rapha Posted October 2, 2006 Author Report Share Posted October 2, 2006 Open Mandriva Control Center, there should be a "Services" section that lists all the services. Click the option beside these two to have them start at boot. None of them are listed in the services section. I looked at "Mandriva Control Center->System->Enable or Disable Services". I installed Apache and MySQL manually, and not the mandriva cd version. Thank you Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted October 2, 2006 Report Share Posted October 2, 2006 Ah, that'll be why the services don't exist normally then. OK, you'll need to look for the services, so try this: whereis httpd whereis mysqld this will then tell you where httpd and mysqld exist. I will assume the results from this show: /usr/local/apache2/bin/httpd /usr/local/mysql/bin/mysqld these might be different for you, this is OK, I'm just using as an example, to show you what to do next. So, to run these, do: /usr/local/apache2/bin/httpd & /usr/local/mysql/bin/mysqld & the & tells the service to run in the background, and therefore means you get your command prompt back to use normally. Alternatively, to add these commands to start when you boot the machine, edit /etc/rc.local and add these to the bottom of the file: /usr/local/apache2/bin/httpd /usr/local/mysql/bin/mysqld note that I didn't put an & this time. You don't need it when you do it this way. Please note, my commands are examples, so change them where necessary. Post back if you have any further probs. Alternatively, you're best bet is to use the packages that come with mandriva, then you get the traditional services as we mentioned before. Quote Link to comment Share on other sites More sharing options...
Lexx Posted October 2, 2006 Report Share Posted October 2, 2006 Hi Rapha, You could also "try" the following: 1. Open up a terminal, console, shell, or which ever name you'd like to call it. :) 2. Type in the following command without the #>: #> sudo service httpd restart 3. Enter the "root" password when prompted. 4. You should see output similar to the following: Shutting down httpd: [ OK ] Starting httpd: [ OK ] 5. The important one is the "starting" section. If this works go to step 6 else step 7. 6. #> sudo chkconfig httpd on --- End: Apache should now start on subsequent boot. 7. If step 5 failed then I don't think Apache was installed. Could you explain what steps you took to install it? Similar steps to 3,4, and 6 are following for mysql. It just depends which mysql you installed. On my system I would substitute 'httpd' with 'mysqld-max'. Hope this helps. Quote Link to comment Share on other sites More sharing options...
Rapha Posted October 2, 2006 Author Report Share Posted October 2, 2006 Hi, I solved with the "/etc/rc.local" thing! Thank you ! Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted October 2, 2006 Report Share Posted October 2, 2006 2. Type in the following command without the #>:#> sudo service httpd restart 3. Enter the "root" password when prompted. 4. You should see output similar to the following: Shutting down httpd: [ OK ] Starting httpd: [ OK ] 5. The important one is the "starting" section. If this works go to step 6 else step 7. 6. #> sudo chkconfig httpd on These would normally work if rpm packages had been installed, but he said here: None of them are listed in the services section. I looked at "Mandriva Control Center->System->Enable or Disable Services".I installed Apache and MySQL manually, and not the mandriva cd version. so, neither of those would work, as this is what tyme originally suggested using the GUI to get to the services, which is effectively the same as using the command line for enabling and starting them as well ;) When compiled from source, the services don't appear normally, so you're only option is to add them to /etc/rc.local to get them to integrate correctly. Unless of course, that they do create init scripts, then you could move these to /etc/init.d and then do: chkconfig add httpd/mysqld where httpd/mysqld is the name of the initscript, and then the rest of the chkconfig and service commands would work as normal (I put them both, to save me typing the same line twice for the httpd service and mysqld service). Quote Link to comment Share on other sites More sharing options...
spinynorman Posted October 2, 2006 Report Share Posted October 2, 2006 chkconfig add httpd/mysqld where httpd/mysqld is the name of the initscript, and then the rest of the chkconfig and service commands would work as normal (I put them both, to save me typing the same line twice for the httpd service and mysqld service). 14 - 97 = -83 characters saved. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.