Solved

Placing scripts in server

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

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Recently, an awarded photographer, Selina De Maeyer (http://www.selinademaeyer.com/), completed a photo shoot of a beautiful event (http://www.sintjacobantwerpen.be/verslag-en-fotoreportage-van-de-sacramentsprocessie-door-antwerpen#thumbnails) in An…
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
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…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

777 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