Solved

Placing scripts in server

Posted on 2015-02-10
3
80 Views
Last Modified: 2015-02-16
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
Comment
Question by:magento
3 Comments
 
LVL 19

Expert Comment

by:jools
ID: 40601284
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
 
LVL 48

Expert Comment

by:Tintin
ID: 40601909
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
 
LVL 9

Accepted Solution

by:
Carlos Ijalba earned 500 total points
ID: 40604288
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
ignore other .htaccess 2 58
Impact of disabling SMB v1 on Mac and Linux clients 4 538
Recover Lacie Edmini data. 11 53
When trying to install php-fpm on CentOS 7 - GPG error 2 43
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
SSH (Secure Shell) - Tips and Tricks As you all know SSH(Secure Shell) is a network protocol, which we use to access/transfer files securely between two networked devices. SSH was actually designed as a replacement for insecure protocols that sen…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question