-
Notifications
You must be signed in to change notification settings - Fork 2
/
README
57 lines (52 loc) · 2.01 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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.