|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
||||
|
||||
|
Question about locations of conf files in general
I'm writing this application which will refer to a few conf files. Since there is going to be more than one conf file, what's the standard way of doing this:
1. Put the conf files in /etc (or /usr/local/etc) and name the conf files as: myapp.domains myapp.urls myapp.miscsettings i.e. the same way that the rc files are named. 2. Create a directory called /etc/myapp and put the conf files in there as: domains urls miscsettings i.e. the way ssh or ppp is configured. What is the standard way of doing this and is there some other standard than those enummerated above? Please post your suggestions here. |
|
#2
|
|||
|
|||
|
Use (1) and run man hier to find out more about the standard. If you use (2) and when it comes to upgrading, you are just asking for troubles, because non-system default files are all over your system-reserved /etc directory. For (1) putting stuffs to /etc probably doesn't do much harm but you need to look for name conflict. Say you installed openssh by hand and placed the configure files to /etc/ssh, but the same location happens to be the default, thus a possible conflict.
|
|
#3
|
||||
|
||||
|
Thanks.
|
|
#4
|
|||
|
|||
|
First, read man 7 hier. Once you do so, you will notice that the correct answer is a combination of the two choices you offered:
Avoid putting anything directly under the / tree. That's for FreeBSD software (the actual OS). The exception to this is log files -- they can go in /var/log/ with log rotation controled via newsyslog(8). Try to avoid putting anything directly under the /usr/tree. That's for third-party software included in the FreeBSD distribution. Things like OpenSSH, BIND, Sendmail, and the like. Try to put all other software under the /usr/local/ tree. This is the default install location for ports/packages. Use it for anything you install by hand or develop on your own.
__________________
Linux is for those who hate Windows. FreeBSD is for those who love UNIX. ------- Have you read The Handbook yet? How about The FAQ? Have you searched the mailing lists? Or read any of the man pages? Have you searched the web for BSD resources? In short, have you done your homework yet?
|
|
#5
|
||||
|
||||
|
I did actually use /usr/local/etc for the conf files
I think I'll consider using /usr/local/etc/myapp if I have to add another .conf file though. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > BSD Help > Question about locations of conf files in general |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|