-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnginx_install.sh
179 lines (154 loc) · 28.9 KB
/
nginx_install.sh
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
#!/bin/bash
#exit option
set -e
#check if su
if [[ $EUID -ne 0 ]]; then
echo -e "\033[1;91mPlease use the script with superuser\033[0m"
exit
fi
#gets the OS information as variable
source /etc/os-release
DISTRO_NAME_HUMAN="$(gawk -F'"' '{print $2}' /etc/os-release | head -1)"
#Version check for ubuntu and centos
function if_ubuntu () {
WHICH_OS=ubuntuu
if [[ "$VERSION_ID" != "18.04" ]]; then
echo -e "\033[0;31mVersion of the $DISTRO_NAME_HUMAN should be 18.04!\033[0m"
exit 1
else
echo -e "\033[0;32mStarting installation for $PRETTY_NAME!\033[0m"
fi
}
#Check version of the CentOS
function if_centos () {
WHICH_OS=centoss
if [ "$VERSION_ID" != "7"]; then
echo -e "\033[0;31mVersion of the $DISTRO_NAME_HUMAN should be 7!\033[0m"
exit 1
else
echo -e "\033[0;32mStarting installation for $PRETTY_NAME!\033[0m"
fi
}
#UBUNTU Cheks is nginx installed
function install_nginx_u () {
if [ ! -x "$(command -v nginx)" ]; then
echo -e "\033[0;32mInstalling Nginx\033[0m"
apt install nginx -y
fi
#UBUNTU if nginx is already installed changes listen port to 80 at default .conf
if [ -x "$(command -v nginx)" ]; then
echo -e "\033[0;32mNginx is installed."
sed -i 's/listen 80 d/listen 8000 d/' /etc/nginx/sites-available/default
sed -i 's/:]:80 /:]:8000 /' /etc/nginx/sites-available/default
ufw allow 8000/tcp
echo -e "\033[0;32mChanging listening port from 80 to 8000\033[0m"
echo -e "\033[0;32mAdding Firewall permissions.\033[0m"
fi
}
#CENTOS if nginx is already installed changes listen port to 80 at default .conf
function install_nginx_c () {
if [ ! -x "$(command -v nginx)" ]; then
echo -e "\033[0;32mInstalling Nginx\033[0m"
yum -y install epel-release
yum -y install nginx
fi
if [ -x "$(command -v nginx)" ]; then
echo -e "\033[0;32mNginx is installed, continuing.\033[0m"
sed -i 's/80;/8000;/' /etc/nginx/nginx.conf
sed -i 's/[::]:80;/[::]:8000;/' /etc/nginx/nginx.conf
yum install policycoreutils-python
semanage port -m -t http_port_t -p tcp 8000
firewall-cmd --zone=public --permanent --add-port=8000/tcp
echo -e "\033[0;32mChanging listening port from 80 to 8000\033[0m"
echo -e "\033[0;32mAdding firewall permissions\033[0m"
fi
}
#UBUNTU Ask for system update
function ubuntu_sysupdate(){
while true; do
echo -e -n "\033[0;32mDo you wish to update your Os?: \033[0m"
read -p "" yn
case $yn in
[Yy]* ) apt-get update; break;;
[Nn]* ) break;;
* ) echo -e "\033[0;31mPlease answer yes or no.\033[0m";;
esac
done
}
function centos_sysupdate(){
while true; do
echo -e -n "\033[0;32mDo you wish to update your Os?: \033[0m"
read -p "" yn
case $yn in
[Yy]* ) yum update; break;;
[Nn]* ) break;;
* ) echo -e "\033[0;31mPlease answer yes or no.\033[0m";;
esac
done
}
#gets the default directory for the index.html file
#UBUNTU Cleans and creates example html file at main folder
function default_html_u(){
ROOT_DIR=$(grep root -m1 /etc/nginx/sites-available/default | cut -d " " -f2 | sed 's/;$//')
find $ROOT_DIR -type f -delete
cat > $ROOT_DIR/index.html << EOF
<!DOCTYPE html>
<html lang="en">
<head>
<title>is workin</title>
</head>
<body style="background-color:rgb(255, 255, 255);text-align:center;font-family:'Courier New';">
<h1 style="color:rgb(77, 177, 11);">there is something wrong with the encoding..</h1>
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAcHBwcIBwgJCQgMDAsMDBEQDg4QERoSFBIUEhonGB0YGB0YJyMqIiAiKiM+MSsrMT5IPDk8SFdOTldtaG2Pj8ABBwcHBwgHCAkJCAwMCwwMERAODhARGhIUEhQSGicYHRgYHRgnIyoiICIqIz4xKysxPkg8OTxIV05OV21obY+PwP/CABEIAJMBVwMBIgACEQEDEQH/xAAdAAABBAMBAQAAAAAAAAAAAAAAAgUGBwMECAEJ/9oACAEBAAAAAOkQAAAAAZaSoQ8D0ADz3z22+jXoAAAAAACN1T5dviRQkABOT2j4lec4AwisgYcYK2AwtvlU1t1Vgj8MF+afm9oeOPiJk+7fINr3moOPB4u9RC6hDZ6Szet3OAyy7qGMQnUdcg0Dm2Y3fIY5NKeTLquIDjP31IAChJ76Mcv6EhWpoPngs0YJmn4x5XeZc03LDpLeZQmwzQxOPdsM1yu8ic1iewLF0FC8gIPfasZ8+5augvcmnM+M35/0FzDmxJ3fdBbq15BOXzSdIivoaF5EC2Tx45i6FwxeNXWGzzPaUlYan72gZoM2rtLkoIjTS2vczVWMVv8AhmRKcmFOTmLoUIbXQPFgvwx1L3tULW6ahOs2wCa9p+H2ldjtUEI6DheRi1pMnGnmboUMLOGZ4Bhqbver9V238m9rsoK5tdp/RM+fIm5X/Ck5lKTG6Iut2N+OuYCs7LtsETuozbAeaPvioTCZ0w6mNklV/wBXa8qUJTy30Nm3re4T6AMOhKJlyFfDTWN3mXZ8E6gG7Ga7a7MeoJl6Ahos0Eb/AC30NsadKbl0jBA7BqR8ttqqK1MmfdBLSCnRUa1ou16didCxNo0XrSTv8t9EOBp19PUxeXYIZPNtqo62xQCsfvismNRrpir11MyQmPPBkx03nswwc4WBihE5RBej9WJODWZ90MbeHjmoGsizR0Tcjc0JFBT0Fs3JAF+gLkELlHUnIiBYAAADEiWRdsQhSJJvn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I5sdTC93APBKnxWidFIA4XLHAJ5dm2aVkh9BnYFV4LS1kurIN7W2Nl4sYd/NUOG09EHsY24PNCOL1bOxVuEUlcWmTbKP27LxYw/+XaqHCqaizBouHc908RcGsbe6a4gpkzmOaW7OBuChidZ60rwnV+uK8JVR/ulE38q1+s9LXFvBazk92Z2ZXKa8tWqU55d0XRH9L+5v3A4rrHkf/9k=" alt="nyan" width="1200" height="500">
</body>
</html>
EOF
}
#CENTOS looks and changes default html folder
function default_html_c(){
ROOT_DIR=$(grep root -m1 /etc/nginx/nginx.conf | awk '{print $2}' | sed 's/;$//')
find $ROOT_DIR -type f -delete
cat > $ROOT_DIR/index.html << EOF
<!DOCTYPE html>
<html lang="en">
<head>
<title>is workin</title>
</head>
<body style="background-color:rgb(255, 255, 255);text-align:center;font-family:'Courier New';">
<h1 style="color:rgb(77, 177, 11);">there is something wrong with the encoding..</h1>
<img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAcHBwcIBwgJCQgMDAsMDBEQDg4QERoSFBIUEhonGB0YGB0YJyMqIiAiKiM+MSsrMT5IPDk8SFdOTldtaG2Pj8ABBwcHBwgHCAkJCAwMCwwMERAODhARGhIUEhQSGicYHRgYHRgnIyoiICIqIz4xKysxPkg8OTxIV05OV21obY+PwP/CABEIAJMBVwMBIgACEQEDEQH/xAAdAAABBAMBAQAAAAAAAAAAAAAAAgUGBwMECAEJ/9oACAEBAAAAAOkQAAAAAZaSoQ8D0ADz3z22+jXoAAAAAACN1T5dviRQkABOT2j4lec4AwisgYcYK2AwtvlU1t1Vgj8MF+afm9oeOPiJk+7fINr3moOPB4u9RC6hDZ6Szet3OAyy7qGMQnUdcg0Dm2Y3fIY5NKeTLquIDjP31IAChJ76Mcv6EhWpoPngs0YJmn4x5XeZc03LDpLeZQmwzQxOPdsM1yu8ic1iewLF0FC8gIPfasZ8+5augvcmnM+M35/0FzDmxJ3fdBbq15BOXzSdIivoaF5EC2Tx45i6FwxeNXWGzz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+6q8VpaRzWzygEi4XjDhXrwocTgqYy+mlvY2Kc9xNyd1DMW2a4+aApZo3MIBN1hu9VB8y3texQlIhMWUWJvfoxKpZSU8Eg3MuYEckTuTzPl36Iq+qhYGQzPa0cihiuIe0ydqnqZqizpXlxHAnopq6opfypSLrDMTiq2NjudVrLu26cM/Vw/FCpeIDDYZSgtKTJqZDk5rHjtB8XKOnmlF2RuI9wUsEsVs8bm35jyGtc9zWtFyTYBd5VTWlxhfYDknOAO60J/Uv7CnxOY6zgQeRVymxSSWyscfgLrvaf1T/pKex7CMzCPioKiaB2aKQtNrXBssMxisZI90oknZltbkVS4w6onZEaV7M3WqaV0L2yNtcFYfiUMpj13NDi+xaOsKfR1Lw/hsFqS6ennOTksZgllEJYwuy3vZYNVU8EbxLJa5WNVUFRo6TwbXv5FI5sdTC93APBKnxWidFIA4XLHAJ5dm2aVkh9BnYFV4LS1kurIN7W2Nl4sYd/NUOG09EHsY24PNCOL1bOxVuEUlcWmTbKP27LxYw/+XaqHCqaizBouHc908RcGsbe6a4gpkzmOaW7OBuChidZ60rwnV+uK8JVR/ulE38q1+s9LXFvBazk92Z2ZXKa8tWqU55d0XRH9L+5v3A4rrHkf/9k=" alt="nyan" width="1200" height="500">
</body>
</html>
EOF
}
#UBUNTUChecks which OS is running
if [ "$ID" == "ubuntu" ]; then
ubuntu_sysupdate
if_ubuntu
elif [ "$ID" == "centos" ]; then
centos_sysupdate
if_centos
else
echo -e "\033[0;31mOperating system should be Ubuntu 18.04 or CentOs 7 $PRETTY_NAME is not supported.\033[0m"
exit 1
fi
if [ "$WHICH_OS" == "ubuntuu" ]; then
install_nginx_u
elif [ "$WHICH_OS" == "centoss" ]; then
install_nginx_c
else
echo -e "\033[0;31mAn error occured cannot verify the type of the Operating system.\033[0m"
exit 1
fi
if [ "$WHICH_OS" == "ubuntuu" ]; then
default_html_u
elif [ "$WHICH_OS" == "centoss" ]; then
default_html_c
else
echo -e "\033[0;31mAn error occured cannot verify the type of the Operating system.\033[0m"
fi
echo -e "\033[0;32mInstallation successfull. Creating default page.\033[0m"
systemctl start nginx.service
systemctl restart nginx.service
systemctl status nginx
IMG=