Skip to content

A collection of bash functions that composes an API for administrating CentOS Server linux boxes, i.e. provisioning websites, installing services, hardening daemons, etc.

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING
Notifications You must be signed in to change notification settings

jmike/cs-library

Repository files navigation

DESCRIPTION
***********
A collection of bash functions that composes an API for administrating CentOS Server linux boxes.
i.e. provisioning websites, installing services, hardening daemons, etc.

FILE USAGE
**********
ssh root@192.74.152.13 -p 22
sudo -s
cd ~
wget --output-document=jmike-cs-library.tar.gz https://github.com/jmike/cs-library/tarball/master
tar -zxf jmike-cs-library.tar.gz
cd jmike-cs-library*
source <file> <parameters>
<function>
exit

GENERAL GUIDELINES
******************
Included functions are made to run on local machines.
Thus, installing a daemon to a remote server means that you first have to log-in to that server.

Say you like to create a MySQL replication cluster. The actions you would do are:
1. Login to 1st server via SSH
2. Donwload cs-library to server
3. Run functions to install MySQL daemon and set as master
4. Logout
5. Login to 2nd server via SSH
6. Donwload cs-library to remote server
7. Run functions to install MySQL daemon and set as slave
8. Logout

DAEMON INSTALLATION GUIDELINES
******************************
01. Install prerequisites
02. Create user & group
03. Create directories & set appropriate permissions
04. Donwload, compile & install files
05. Make binaries availiable to PATH
06. Configure
07. Set logs
08. Integrate into logrotate
09. Set daemon
10. Set firewall
11. Collect garbage
12. Secure the application (if needed)

THERE IS A PLACE FOR EVERYTHING
*******************************
A. Applications are installed in "/opt", i.e. /opt/mysql.
B. Configuration files are stored in "/etc", i.e. /etc/nginx/nginx.conf.
C. Log files are stored in "/var/log", i.e. /var/log/httpd/error.log.
D. State files, such as PID files, are stored in "/var/run", i.e. /var/run/mysql/mysql.pid.
E. Lock files are stored in "/var/lock", i.e. /var/run/mysql/mysql.lock.
F. Init.d scripts are stored in "/etc/init.d", i.e. /etc/init.d/sshd.
G. Profile.d scripts are stored in "/etc/profile.d", i.e. /etc/profile.d/mysql.sh.
H. Logrotate.d scripts are stored in "/etc/logrotate.d", i.e. /etc/logrotate.d/mysql.

About

A collection of bash functions that composes an API for administrating CentOS Server linux boxes, i.e. provisioning websites, installing services, hardening daemons, etc.

Resources

License

LGPL-3.0, GPL-3.0 licenses found

Licenses found

LGPL-3.0
COPYING.LESSER
GPL-3.0
COPYING

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages