Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 86
  • Last Modified:

Placing scripts in server

Hi,

I have completed around 15 shell scripts , now i have to place in server. Any guidelines how and where to place them.
I thought of creating a directory /root/home/app/code as sudo root and place all the files there as owner,group = root.

New to this, any help please.

Thanks
0
magento
Asked:
magento
1 Solution
 
joolsCommented:
You can put them where ever you want really, it all depends on who needs to run them.

I usually stick stuff in /usr/local/bin and make sure the permissions are set so only those with the right permissions can read/execute them.
0
 
TintinCommented:
Depends on their purpose, who and how they will be run.

Just put them where ever makes logical sense.

As jools pointed out, /usr/local/bin is a common place for custom scripts/binaries.
0
 
Carlos IjalbaIT Systems CoordinatorCommented:
Depends on your environment.

We have used /sysadmin and /operator for scripts for system admins/technical analysts and operators, respectively.

Not only that, they were filesystems, that way scripts going AWOL can only fill-up their FS, whitout affecting the root fs.
Placing them somewhere in /home is also usually a good idea, as it's generally hosted in a FS, so it won´t affect root fs.

What is obvious is to use the same convention in all your servers. It's not unusual to find scripts all over the place if you leave programmers and sysadmins on the loose :o)  
It will also help greatly when writing documentation.

But if you want to be strict or follow FHS Compliance:


The following directories, or symbolic links to directories, must be in /usr/local

Directory      Description
bin                      Local binaries
etc                      Host-specific system configuration for local binaries
games              Local game binaries
include              Local C header files
lib                      Local libraries
man              Local online manuals
sbin                      Local system binaries
share              Local architecture-independent hierarchy
src                      Local source code

No other directories, except those listed below, may be in /usr/local after first installing a FHS-compliant system.

This is from the standard FHS v2.3, for more info:

http://www.pathname.com/fhs/
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now