Solved

Placing scripts in server

Posted on 2015-02-10
3
82 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux boot cd to do hardware report on PC? 3 99
Linux MD5 Hash 7 97
Install XRDP on Ubuntu Server 16.10 x64 3 118
simple bash script needed to unpack tar.gz 4 62
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
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…
Suggested Courses

751 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