473,385 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

do I really need to insert links into rc?

Hi,

I recently installed SuSE 9.3 on x86, and it seems to contain scripts
"apache2" and "mysql" in the /etc/init.d folder. However, these two (Apache
or MySQL) are not running when I fresh reboot the machine. I am having to
execute a "./apache2 start" and "./mysql start" every time I reboot.

I am a newbie when it comes to unix admin, and I am trying to read up about
the rc scripts and how they link into the scripts under the /etc/init.d
folder. Before I rush and do what appears "natural" to me (create a S?? and
K?? links in the rc?.d), I'd like to find out some basic questions it
raises:

1. Why would the install place the apache2 and mysql scripts under the
/etc/init.d but not have any entries in any of the rc scripts?
2. What do I need to do (anything specific to SuSE) to make the apache and
mysql launch on reboot? Which rcN gets it?

Thanks!
Angus

Aug 28 '05 #1
4 1787
"Spare Brain" <sp*********@yahoo.com> wrote in message
news:_4*******************@tornado.tampabay.rr.com ...
Hi,

I recently installed SuSE 9.3 on x86, and it seems to contain scripts
"apache2" and "mysql" in the /etc/init.d folder. However, these two
(Apache
or MySQL) are not running when I fresh reboot the machine. I am having to
execute a "./apache2 start" and "./mysql start" every time I reboot.

I am a newbie when it comes to unix admin, and I am trying to read up
about
the rc scripts and how they link into the scripts under the /etc/init.d
folder. Before I rush and do what appears "natural" to me (create a S??
and
K?? links in the rc?.d), I'd like to find out some basic questions it
raises:

1. Why would the install place the apache2 and mysql scripts under the
/etc/init.d but not have any entries in any of the rc scripts?
2. What do I need to do (anything specific to SuSE) to make the apache and
mysql launch on reboot? Which rcN gets it?

Thanks!
Angus

After wading through many (many) different sites, I'd need to do this, even
though apache2 and mysql came packaged:

chkconfig --add apache2
chkconfig --add mysql

And then reboot for it to take effect (or do a /etc/init.d/<program> start
if you don't want a reboot right away).

This answers #2 above, but #1 is still open.

Angus
Aug 28 '05 #2
Spare Brain wrote:
1. Why would the install place the apache2 and mysql scripts under the
/etc/init.d but not have any entries in any of the rc scripts?
That effectively installs the products, but does not configure them to
start automatically at boot time at any runlevel. This might be
considered equivalent to a Windows Service being set to "Manual" startup.
2. What do I need to do (anything specific to SuSE) to make the apache and
mysql launch on reboot? Which rcN gets it?


The `chkconfig' command can help. It looks in the script for a line
describing a recommended runlevel at which to install links, and what
number to use for the startup order. Chkconfig is not specific to SuSE,
it's common on Linux and similar systems.

Regards,
Bill K.
Aug 28 '05 #3
Spare Brain wrote:
"Spare Brain" <sp*********@yahoo.com> wrote in message
news:_4*******************@tornado.tampabay.rr.com ...
Hi,

I recently installed SuSE 9.3 on x86, and it seems to contain scripts
"apache2" and "mysql" in the /etc/init.d folder. However, these two
(Apache
or MySQL) are not running when I fresh reboot the machine. I am having to
execute a "./apache2 start" and "./mysql start" every time I reboot.

I am a newbie when it comes to unix admin, and I am trying to read up
about
the rc scripts and how they link into the scripts under the /etc/init.d
folder. Before I rush and do what appears "natural" to me (create a S??
and
K?? links in the rc?.d), I'd like to find out some basic questions it
raises:

1. Why would the install place the apache2 and mysql scripts under the
/etc/init.d but not have any entries in any of the rc scripts?
2. What do I need to do (anything specific to SuSE) to make the apache and
mysql launch on reboot? Which rcN gets it?

Thanks!
Angus


After wading through many (many) different sites, I'd need to do this, even
though apache2 and mysql came packaged:

chkconfig --add apache2
chkconfig --add mysql

And then reboot for it to take effect (or do a /etc/init.d/<program> start
if you don't want a reboot right away).

This answers #2 above, but #1 is still open.

Angus


Angus has done a good job with #2. I'd add that you should follow up
the chkconfig add with

chkconfig --level 2345 apache2 on
chkconfig --level 2345 mysql on

This will have the effect of apache2 and mysql starting at each run
level, 2, 3, 4, 5.

As for #1, I have only a guess. These are packages usually run on
servers, not desktops. Did you configure for a desktop? Also, I'd
argue that SuSE leaving it to you to decide and figure out how to turn
these on results in a less vulnerable Internet, on average.

Any service you run may be subvertible. Therefore, the fewer you run,
the more secure, in general. A good exercise for you, since you're new,
is to run

chkconfig --list |grep on

For every line that comes back, prove to yourself that you know what the
service is and why you need it. If you don't recognise it, you may not
need it. Read the man page for it. If you're not sure, turn it off and
see what breaks. If nothing breaks, leave it off. To turn a service
off with chkconfig

chkconfig --level 2345 the_name_of_the_service off

Once you've done that, the service will not be started anymore for the
run levels you've turned if off for. You still will have to kill the
running instance of the process with

service the_name_of_the_service stop

Good luck.
Aug 31 '05 #4
Spare Brain wrote:

1. Why would the install place the apache2 and mysql scripts under the
/etc/init.d but not have any entries in any of the rc scripts?


As others have already answered #2, I'll try to answer #1 for you as
best as I can.

Different installations require different things. There are quite a few
ways to have your /sbin/init (or even /etc/init on older systems!)
configured to allow new packages to run. Mostly, there is the BSD way
of doing things, and the AT&T way of doing things. However, I never
remember which is which, because many Linux distributions emulate one or
the other, or both.

In one version, you can use /etc/rc.d/script_name_here and those scripts
are directly run at startup and shutdown, with varying parameters, and
some scripts take more then just the default "start" and "stop". For
example, for Apache and MySQL on my system, the following is run by my
startup scripts when I boot up:

/etc/rc.d/rc.mysql start
/etc/rc.d/rc.httpd start

In the other one, however, you have the complex structure of symlinks
that begin with S* and K*, located in different directories which
signify the runlevel (e.g., /etc/rc.2 for runlevel two). This yields a
slightly more flexible configuration, however, it also can lead to
disaster if you forget to add something to more then one runlevel if
needed, or if you put things in that you should... essentially it adds
more points of failure to the init system. It depends on shell globbing
features for it to work, for starters, and it also depends on the
administrator wanting to spend the time to really tweak the system.
This is good if you use actually use different runlevels for something
useful; for example, Runlevel 2 is multi-user, and Runlevel 3 is more of
a high-load multi-user, or, in the case of a testing box, you can use
runlevels to switch from a set of production/stable servers, to a set of
testing/unstable/development servers that you're trying to work on,
debug, whatever. Largely enough, though, it's a PITA.

Slackware Linux, FWIW, provides the former behavior by default, and
impelements the latter using a shell script to emulate the full
functionality. This should be used with caution, however, as it's not
perfect. I am not sure how SuSE does things, but I'm sure that it can
probably be configured to do either/or, since you can have one script
that is linked to, managing a /etc/rc.d/rc.* configuration similar to
what is native (and, simpler) in many systems. For the most part, in
systems that are "live," and use the former configuration that I
mentioned, they will run those scripts for all runlevels except for 0,
1, and 6, assuming that on your system you're not using a terribly
heavily customized configuration: These runlevels typically represent
halt, single-user mode, and reboot, respectively.

HTH,
Michael
Aug 31 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Tom | last post by:
Please help. I need a quick little scrpit to place on a web page that will count how many days have passed since January 1, 1970. I have ZERO experience writing ANY scripts. Anyone have any...
5
by: Chris | last post by:
Based upon some prevoius postings on what to do for adding a 'add' row to a datagrid I utilize the footer to create the 'add' row. The only issue is that I have it sharing the 'UpDate_Command' and...
2
by: clinttoris | last post by:
Hello, If someone could help me it would be appreciated as I am not having much luck. I'm struggling with my asp code and have some questions relating to asp and oracle database. First...
1
by: rllioacvuher | last post by:
I need help with a program. I have implemented that following header file with an unordered list using one array, but i need to be able to use an ordered list and 2 arrays (one for the links and one...
20
by: mike | last post by:
I help manage a large web site, one that has over 600 html pages... It's a reference site for ham radio folks and as an example, one page indexes over 1.8 gb of on-line PDF documents. The site...
2
by: Sells, Fred | last post by:
I've got a ~100 page document I assemble from ~30 OOo .odt files with some search and replace functions. I then produce a PDF. So far so good. Now I need to get a barcode from our internal...
6
by: pbd22 | last post by:
Hi. I am trying to insert a zero into the below table and I am being told that: Cannot insert the value NULL into column 'UsageToday', table DB.dbo.Pub_Count'; column does not allow nulls....
3
by: bbatson | last post by:
Hello, Suppose I have a table called "Links_Tbl" with a column titled "Link" and a text box on a form called "txtlink". I am finding that the following code is not making the uploaded links...
2
by: global2009 | last post by:
Hello I am working on a site and I am trying to insert an onClick function into the JS, so users can click to the different links. Well, when I do add the onClick function the links work but the...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.