BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Virtual Tradeshows by Ziff Davis Enterprise – A Unique Opportunity to Interact with IT Experts, Access Information, and Gain Insight on Today’s Trends in Technology Learn more
  #1  
Old December 11th, 2001, 11:44 PM
Wilbo Wilbo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Baltimore Md.
Posts: 8 Wilbo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
how do I get apache to start at boot up?

How do I get apache to start at bootup. All the documentation that I've read said to put a script in /usr/local/etc , but there is no usr/local/etc . Also, what is the script supposed to look like?

Reply With Quote
  #2  
Old December 12th, 2001, 12:02 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
/usr/local/etc/rc.d/apache.sh

/usr/local/etc/rc.d will be searched on startup by default. Check /etc/defaults/rc.conf, you should see local_startup="/usr/local/etc/rc.d /usr/X11R6/etc/rc.d".

Reply With Quote
  #3  
Old December 12th, 2001, 12:31 AM
Wilbo Wilbo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Baltimore Md.
Posts: 8 Wilbo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
So I'm supposed to create the directory /usr/local/etc , then create a rc.d file with the text apache.sh ? Am I missing something here? I did this, rebooted, and apache didn't start, I had to manually start it. Sorry for seeming so thickheaded, but I'm new to freebsd and trying to get a server up and running.

Reply With Quote
  #4  
Old December 12th, 2001, 02:11 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> So I'm supposed to create the directory /usr/local/etc

No. If you installed Apache via packages (precompiled binary) or from the ports collection at /usr/ports/www/apache13, it will mkdir the /usr/local/etc and rc.d directories for you automatically. apache.sh will also be copied from /usr/ports/www/apache/files/apache.sh to /usr/local/etc/rc.d.

Reply With Quote
  #5  
Old December 12th, 2001, 06:32 AM
Wilbo Wilbo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Baltimore Md.
Posts: 8 Wilbo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
There is no /usr/local/etc directory, it does not exist........once I create it and the and the rc.d document, what will be on the rc.d document? Thank you for your help and patience with this newbie.

Reply With Quote
  #6  
Old December 12th, 2001, 09:49 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
rc.d is a subdir under /usr/local/etc. If it doesn't already exists, mkdir it manually.

Reply With Quote
  #7  
Old December 12th, 2001, 10:01 AM
Wilbo Wilbo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Baltimore Md.
Posts: 8 Wilbo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Then what goes into this rc.d directory?

Reply With Quote
  #8  
Old December 12th, 2001, 10:05 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Read this entire thread again. Whatever local scripts that need to startup automatically on boot.

Reply With Quote
  #9  
Old December 12th, 2001, 10:23 AM
Wilbo Wilbo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Baltimore Md.
Posts: 8 Wilbo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
What do I put in the script that goes into /usr/local/etc/rc.d ?
If I just put "/usr/local/apache/bin/apachectl start" will that make it start at bootup, and what do I name the file?

Reply With Quote
  #10  
Old December 12th, 2001, 01:48 PM
UranHjort UranHjort is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2001
Location: Denmark, Europe
Posts: 15 UranHjort User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I start my Apache another way on boot up, but not as fancy as the rc.d way. in /etc/rc.local i have added /usr/local/apache/bin/apachectl start . it may not be the correct way but anyway it works.

Reply With Quote
  #11  
Old December 12th, 2001, 08:17 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> What do I put in the script that goes into /usr/local/etc/rc.d ?

The script apache.sh can be found from /usr/ports/www/apache13/files/, I already mentioned this previously. So you can copy it to /usr/local/etc/rc.d/ and alter it to your liking.

>> If I just put "/usr/local/apache/bin/apachectl start" will that make it start at bootup

Yes if the script is executable. However, a proper boot script expects more than just start option. At the minimum, you need start and stop. Unless you don't want Apache to shutdown gracefully.

Further, you are on FreeBSD, and apachectl should never be resided in a non-standard location, which violates FreeBSD directory layout [hier(7)]. Further, apachectl script should never go into bin directory, it should be sbin instead, for security reasons.
What you should do now is to remove your existing Apache and reinstall it from ports. Setting PREFIX of /usr/local/apache is extremely bad and non-standard. If you want to become a real FreeBSD user, follow the standard.

Reply With Quote
  #12  
Old December 13th, 2001, 06:43 AM
Wilbo Wilbo is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2001
Location: Baltimore Md.
Posts: 8 Wilbo User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Thanks for helping me out, I'll reinstall apache into the proper location.

Wilbo

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > how do I get apache to start at boot up?


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

 Free IT White Papers!
 
Accelerating Trading Partner Performance
One in five. That's how many partner transactions have at least one error. That is an amazing statistic, particularly given the extraordinary leaps in innovation across the global supply chain during the past two decades. Download this white paper to learn more.

 
Competing on Analytics
This Tech Analysis is designed to help identify characteristics shared by analytics competitors, and includes information about 32 organizations that have made a commitment to quantitative, fact-based analysis.

 
Cost Effective Scaling with Virtualization and Coyote Point Systems
An overview of the industry trend toward virtualization, how server consolidation has increased the importance of application uptime and the steps being taken to integrate load balancing technology with virtualized servers.

 
Five Checkpoints to Implementing IP Telephony
Implementation planning for IP PBX software and IP telephony has become vital as businesses replace discontinued legacy PBX phone systems. This informative whitepaper outlines five "checkpoints" for any implementation plan that will help make IP communications a successful proposition.

 
Hosted Email Security: Staying Ahead of New Threats
In the last two years, email has become a fierce battleground between the nefarious forces of spam and malware, and the heroes of messaging protection. The spam volumes increased alarmingly every month, bringing clever new forms of phishing and virus propagation attacks.

 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway