Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Abolsule beginner 1

Status
Not open for further replies.

mrbusy

Technical User
Dec 10, 2003
118
Im trying to get a better grip of Linux, PHP and Apache at the moment and Ive recently installed Redhat 9 on my spare PC as a sort of learning aid, but Im having some problems.

I went with the default workstation installation and have a working install. Now I have things working the way I like (sort of) I tried to add HTTPD and mySQL and this is where it started to go wrong. Although I was asked for CD's and things seemed to get installed I dont know where the apps went or what I need to do to get the HTTP deamon running. I looked on the Apache website but programs are not where the helpfiles suggest they should be.

I assume I have to "unpack"(?) the applications or something simliar? I tired installing the relevant Server Configuration tool for Gnome in an attempt to figure out what I had to do, but now I cant find that either.

Im an experienced Windows admin and I remember the days of MS-DOS, so I can handle a command line o/s, but I need someone to explain to me where new apps go and how to make them run.

Thanks in advance.
 
Did you install Apache and MySQL during install or afterwards? If afterwards, what method did you use to attempt to install them and what confirmation or error-messages did you get?




Want the best answers? Ask the best questions!

TANSTAAFL!!
 
I used the add/remove application in Gnome after I had installed Lunixx and played around a bit. I didnt get any error messages at all. It reported that everything had worked fine.
 
In Gnome, go to Start-Here, then to System Settings, then Server Settings. In there is an applet called "Services" which should allow you to choose which daemons are running and whether they should be started when the system starts.

 
Okay, I did that and it worked.

Presumably if I had not installed the Server Configuration app for Gnome then I would have needed to have done the configuration from the command line? As HTTPD was not (as far as I can tell) where the Apache website said it would be how can I tell in future where applications have been installed?

At some point soon I will probably install BIND but I dont want to have the same problem of not being able to find it once its added.
 
One of the reasons I really like Debian is the front end for the package manager, "apt". It can use internet-based package repositories and grab the package you want to install and all supporting packages needed, so you don't have to mess around with CDs to get all your dependancies resolved. There's a port of apt available for Redhat:



----
JBR
 
First, let me say that I still consider myself a Linux newbie even though I've been using it for a couple years now.

In /etc there is a directory called init.d. This is where the installers (at least in Red Hat) put scripts that are used to control the services/daemons. I have absolutely no knowledge of shell scripting so I have no idea what exactly these scripts do. But you can run them directly and pass them a paramater such as 'start', 'stop', or 'restart' to control that service. So for example, if you wanted to restart MySQL, you'd do: /etc/init.d/mysqld restart. You can get these scripts to run automatically in a particular runlevel by putting a link to them in the appropriate rcX.d directory. You're probably starting up in runlevel 5, so to get a script to start automatically you'd put a link to it in /etc/rc5.d. I believe what the gnome tool you used simply adds that link for you.

For more info, check out the Linux Documentation Project, specifically this page:
 
Speaking of init.d... When you install a package and don't know where it ended up, you can usually find the startup script in a runlevel directory. View the script and you can generally see where the binaries and configuration files are.

Apache and other developers (PHP, MySQL, etc.) usually document their installations assuming that you're installing from source. Binary packages are tailored for your distribution and may not match the source setup.
 
If you don't have the GUI server config app, you can view a list of services on your system by using the command:

chkconfig --list

This will show something like below (formatting may be screwed):

sendmail 0:eek:ff 1:eek:ff 2:eek:n 3:eek:ff 4:eek:n 5:eek:n 6:eek:ff
yum 0:eek:ff 1:eek:ff 2:eek:ff 3:eek:ff 4:eek:ff 5:eek:ff 6:eek:ff
vsftpd 0:eek:ff 1:eek:ff 2:eek:ff 3:eek:ff 4:eek:ff 5:eek:ff 6:eek:ff
gpm 0:eek:ff 1:eek:ff 2:eek:n 3:eek:n 4:eek:n 5:eek:n 6:eek:ff
iptables 0:eek:ff 1:eek:ff 2:eek:n 3:eek:ff 4:eek:n 5:eek:n 6:eek:ff
smb 0:eek:ff 1:eek:ff 2:eek:ff 3:eek:n 4:eek:ff 5:eek:ff 6:eek:ff
apmd 0:eek:ff 1:eek:ff 2:eek:n 3:eek:ff 4:eek:n 5:eek:n 6:eek:ff
xinetd based services:
time: off
daytime: off
cups-lpd: off
chargen-udp: off
echo-udp: off
rsync: off
time-udp: off
sgi_fam: on
echo: off
daytime-udp: off
chargen: off
services: off

You can see what services start at what run-level and also if they start from init.d or xinetd.

You can then change the service start-up state by using the command:

chkconfig --level <levels> service_name on|off|reset


--== Anything can go wrong. It's just a matter of how far wrong it will go till people think its right. ==--
 
here is another method for starting and stopping services.

try

Code:
 service httpd start

and

Code:
 service mysqld start

For apache and mysql.
You can also substitute stop and restart as needed...

:)

Xaq

---

"I'm just here to regulate funkyness"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top