LinuxQuestions.org
Visit Jeremy's Blog.
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 04-21-2002, 11:22 PM   #1
etherdeath
Member
 
Registered: Apr 2002
Location: New York City
Distribution: Debian
Posts: 30

Rep: Reputation: 15
Lightbulb 7-8 Years, still a newbie


Hello,

I'm using Mandrake 8.1. I've been running this particular linux server for awhile, wiped everything when 8.1 came out, was running it for a year before that.

I installed just about every option, perhaps that was a bad idea.

I shut off booting into X, because I rarely even see the server.

I run a development mud, a web server, a database and some other things on my server.

I'm just really confused as to where to start learning more about what the heck is going on on my machine.

I have two things I want to do, as examples :

1. I'd like my MUD to start up at boot time.

I know my server is using this rc scheme of starting things up. I have directories for rc0.d, rc1.d all the way to rc6.d. I don't really know how it all works. I'm confused as to why there most of the links in each of these directories are the same. I want to add my own script, I tried to kluge one together, but it didn't work. The MUD executable is located in a home directory of a development user setup just to develop the MUD code, for instance /home/usr/superMUD/MUD/src/server

2. I'd like to remove X from my machine. I'd like to get rid of the support libraries and any thing that has to do with X at all.

3. Recently a user account was compromised (someone gave out their password). Someone used that password and FTP'd in and deleted several files. I figured I can figure out when they did this through some log. I found that I have proftpd and wuftpd on my machine. When an ftp connection is made to my machine, I see that neither of these programs is running, but 'ftpd' is running. I have no idea where the log files are. I checked /var/log and there is a proftpd directory there, empty. I shouldn't have to hunt around though. I suspect proftpd is what is being used on my machine, since that is what I see in the rc.d directories.

I find I have a general hard time getting to the root of my problems. I don't know where to go. I don't mind doing a lot of grunt work to figure stuff out, but it is finally getting to the point where I just get overwelmed after 6-8 hours of trying to figure out a simple thing, like "Where is my FTP log file, and if it's not turned on for logging, can I start it up by editing some configuration file?" and getting nearly nowhere.

One day when I finally figure this all out, I'll run a site so clueless people like myself can figure this stuff out.

Thanks,
Etherdeath

Last edited by etherdeath; 04-21-2002 at 11:24 PM.
 
Old 04-22-2002, 05:38 AM   #2
mikek147
Member
 
Registered: Mar 2002
Location: Elyria, Ohio
Distribution: Debian, Nothing else required
Posts: 141

Rep: Reputation: 15
May I ask where this server resides? Is this a home installation or a business?

A ver short explanation about rc#.d files. There are 7 different run levels in the UNIX/Linux OS.

Level 0 = shutdown
Level 1 = single user mode
Level 2 - 5 = multiuser mode
Level 6 = reboot

Levels 0 and 6 are rather self-explanatory. Level 1 is used for SA work where the system is required to be as quiet as possible. So in this mode, only the / partition is mounted, and most function/daemons are not running, like X, print services, user logins, networking etc.

Levels 2 - 5 are, like I said, multiuser modes. The purpose of these modes is to allow the SA to control what gets loaded on boot. If set as such, entering level 2 could allow for just a stand alone multiuser system. Entering level 3 could add networking capability, level 3 could add X, etc. You get the idea. For each run level, there is an associated /etc/rc#.d directory.

When the system boots, one of the files the kernel looks at is /etc/inittab. Within /etc/inittab is an entry called initdefault. This tells the kernel which run level the system should run at, and defines which rc#.d to use.

Within the RC#.d are a selection of either K* or S* files. In the case of run level 0,1 and 6, you'll see mostly K* files, telling the kernel how to gracefully shutdown the system to the appropriate level. In runlevels 2-5, tje appropriate rc[2-5].d will have the startup scripts for the functions required at that run level.

On most systems, these rc directories are filled with synlinks to /etc/init.d, this location varies with distro. This directory contains the actual scripts that are run on startup or shutdown. If you look at any of these scripts, you'll see that they have the code to start, stop or restart the functions that comprise a running system.

Looking at any one of the /etc/rc* directories, you see that the K or S files are of the form S##filename. The ## portion of the file name is to give the kernel the order in which to start these function. As an example, you wouldn't want to start bind before you have a network identity.

Put your script for starting MUD in /etc/init.d, look in /etc/inittab to discover your initdefault level, then add a symlink in the appropriate rc*.d directory.

I don't expect you to move it immediately, but server software should never reside in a user home directory. It should reside in /opt, /usr or /usr/local. Just something to think about when you better understand Linux.

To get a better understanding of the commands available to you, look at Linux Manual Pages. You might also find this Linux System Admin. Guide useful. Good luck. -mk
 
Old 04-23-2002, 12:07 AM   #3
etherdeath
Member
 
Registered: Apr 2002
Location: New York City
Distribution: Debian
Posts: 30

Original Poster
Rep: Reputation: 15
thanks

It's a home installation, at a business.

Thanks very much for your help. Some of these I knew or suspected, but I never feel very confident about anything I do on Linux. Even when I add a user, for some reason I imagine I've done something wrong, like not used a good convention for a UID or something. It comes from using Windows I suspect, where it does mostly everything for you, but only one way. For some reason I was under the impression the rc#.d system was just one of a few different ways that distributions or people autostart programs.

If I do get stuff to work, I'll write a dummy tutorial or something.
 
  


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
What do you think will have been with Linux after 2 years? Nad0xFF General 21 04-08-2005 12:04 PM
Three Years and Counting! trickykid General 9 01-06-2004 07:30 PM
Finally after 3 long years...... ShieldedWolf LinuxQuestions.org Member Success Stories 6 12-27-2003 07:43 PM
Happy 3 years old ! PenGPow Linux - Software 5 06-17-2003 02:39 PM
Trying Slackware after years away Agent69 Slackware 5 06-04-2002 07:30 AM


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

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration