Solved

Placing scripts in server

Posted on 2015-02-10
3
75 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
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…

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now