Code Newbie
News     Forums     Search     Members     Sign Up    

My Code Newbie
Username

Password

Articles/Snippets
ASP Classic
ASP.NET
C
C#
C++
HTML / CSS
Java
Javascript
Linux / BSD
Perl
PHP
Python
Ruby
SQL
VB 6
VB.NET

C.N. Friends
  Planet Rome

Link to Us!
Code Newbie
  Code Newbie
    forums
Old 01-05-2003, 03:14 AM   #1 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
fresh apache install

thought i'd start a new thread on this.

now i have apache in /usr/local/apache

there is another directory: /usr/local/apache/bin where all my executables are.

i'm having a hard time understanding how to start and restart the way other services do. in fact, .. i'm not sure how to make it a service to show up in my "ntsysv" screen.

i can start, stop, restart the server by using: ./apachectl restart

but i used to be able to type /etc/init.d/httpd restart

i guess i'm asking 2 questions here:

1. how do i make apache a service
2. how do i start/stop/restart w/o having to type "./" before apachectl or httpd ?

either way, i can manage now by just navigating to my apache directory, .. but i really want to understand this.
sde is offline   Reply With Quote
Old 01-05-2003, 07:00 AM   #2 (permalink)
sdeming
Code Monkey
 
Join Date: Jul 2002
Location: Michigan
Posts: 85
sdeming is on a distinguished road
Mike,

In /etc/init.d you will find your startup scripts. For an example, look at /etc/init.d/sendmail.

Here are a couple of things that you will want to learn and understand, read their man pages etc:

- init
- chkconfig

Run apachectl to get the command set:

- start
- stop
- restart
- configtest
- graceful

Generally, writing an /etc/init.d/httpd script is straight forward, just make sure you have the chkconfig line in there so you can turn it on and off as a service.

When you make changes to httpd.conf, make sure to run "apachectl configtest" before restarting.

There are numerous startup scripts out there that should just drop in and run for you with slight changes to file paths and such. Here is a very common one:

- http://www.e-gineer.com/instructions/httpd
__________________
Scott
B4 09 BA 09 01 CD 21 CD 20 53 63 6F 74 74 24
sdeming is offline   Reply With Quote
Old 01-05-2003, 08:00 AM   #3 (permalink)
anon
Guest
 
Posts: n/a
Yeah put it in your start up scripts (I use Slackware and System V init scripts so I can't help you out there.). What I find to be helpful is make a symbolic link from /www to /usr/local/apache it has made it faster to move. I don't know what is the reason that it's not starting, but I would say have a look at httpd.conf and also do whereis apachectl there are probably some left over things from the last apache install
  Reply With Quote
Old 01-05-2003, 10:53 AM   #4 (permalink)
sde
Moderator
 
sde's Avatar
 
Join Date: May 2002
Location: us.ca
Posts: 4,444
sde is on a distinguished road
thanks , that looks like it will work nicely !
sde is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
install Mono on Mac OS X mcjules MS Technologies ( ASP, VB, C#, .NET ) 2 06-25-2004 10:28 AM
restarting apache in debian. sde Linux / BSD / OS X 4 06-22-2002 12:27 AM
debian install report sde Linux / BSD / OS X 4 05-09-2002 04:56 PM


All times are GMT -8. The time now is 01:06 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.0.0 RC8





Copyright © 2000-2008, Milano Interactive
Web Hosting provided by Portal 360 Web Hosting