-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_software_web_server_with_db_postgresql_centos8.sh
473 lines (447 loc) · 34.6 KB
/
install_software_web_server_with_db_postgresql_centos8.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
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
#!/bin/bash
#====================#
# For AWS CentOS 8.0 #
#====================#
######## CONFIG ########################################################################
# setting user & home dir
declare -r user="www"
declare -r password="$(openssl rand -base64 15)"
declare -r serverRoot="/home/$user/web/public"
declare -r router="index.php"
# setting webserver
declare -r HOSTNAME="webserver"
declare -r webserver="nginx"
declare -r php="8.2" # php-fpm 8.2
declare -r domain="localhost"
declare -r timezone="UTC"
# setting pgsql
declare -r pgsql="15"
declare -r postgresql="postgresql-$pgsql"
declare -r DB_NAME="dev_db"
declare -r DB_USER="developer"
declare -r DB_PWD="$(openssl rand -base64 15)" #$(openssl rand -base64 15)
#########################################################################################
echo
clear
echo
echo
echo
echo -e " \033[32m ***** Start Installation *****\033[0m"
sleep 5
echo
# Adding user
/usr/sbin/useradd "$user" -s "/usr/bin/bash" -m -d "/home/$user"
# Adding user & password
echo "$user:$password" | /usr/sbin/chpasswd
usermod -a -G wheel $user
mkdir /home/$user/web /home/$user/web/public /home/$user/.ssh
# Add SSH Authorized KEY
cat << EOF >/home/$user/.ssh/authorized_keys
EOF
# Add user SSH Authorized KEY
cat << EOF >/etc/sudoers.d/Init-users
# User SSH Authorized KEY
$user ALL=(ALL) NOPASSWD: ALL
EOF
# Permissions
chown -R $user:$user /home/$user
chmod -R 755 /home/$user
chcon -Rt httpd_sys_content_t /home/$user/web
chmod 600 /home/$user/.ssh/authorized_keys
echo
echo
echo
echo
echo
echo
echo -e "User\tLogin\tPassword\tDatabase" >> /root/account_data.csv
echo -e "user_add_sudo\t$user\t$password" >> /root/account_data.csv
echo
clear
echo
echo
echo
echo -e " \033[32m ***** Add Repos Creation & Install software *****\033[0m"
sleep 5
echo
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm -y
dnf install https://download.postgresql.org/pub/repos/yum/reporpms/EL-8-x86_64/pgdg-redhat-repo-latest.noarch.rpm -y
dnf install https://repo.mysql.com/mysql80-community-release-el8-3.noarch.rpm -y
dnf repolist enabled | grep "mysql.*-community.*"
dnf install dnf-utils -y
cat << EOF > /etc/yum.repos.d/nginx.repo
[nginx-stable]
name=nginx stable repo
baseurl=http://nginx.org/packages/centos/\$releasever/\$basearch/
gpgcheck=1
enabled=1
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
[nginx-mainline]
name=nginx mainline repo
baseurl=http://nginx.org/packages/mainline/centos/\$releasever/\$basearch/
gpgcheck=1
enabled=0
gpgkey=https://nginx.org/keys/nginx_signing.key
module_hotfixes=true
EOF
clear
# Installation2
dnf module reset php
dnf module install php:remi-$php -y
dnf module enable postgresql:$pgsql -y
dnf install nginx postgresql-server wget python3 snapd unzip zip mc bzip2 traceroute atop htop iftop util-linux-user -y
echo
echo
echo
echo -e " \033[32m ----- postgresql$pgsql-server, $webserver INSTALL ACCESS -----\033[0m"
echo
clear
echo
echo
echo
echo -e " \033[32m ***** Configuration POSTGRESQL server & ADD USER & CREATE DB *****\033[0m"
sleep 5
echo
#Configuration
postgresql-setup --initdb
systemctl enable postgresql
systemctl start postgresql
echo
cd /tmp
su - postgres -s /bin/bash -c "psql -c \"CREATE DATABASE $DB_NAME;\""
su - postgres -s /bin/bash -c "psql -c \"CREATE USER $DB_USER WITH password '$DB_PWD';\""
su - postgres -s /bin/bash -c "psql -c \"ALTER USER $DB_USER LOGIN SUPERUSER CREATEDB CREATEROLE;\""
su - postgres -s /bin/bash -c "psql -c \"GRANT ALL privileges ON DATABASE $DB_NAME TO $DB_USER;\""
echo
sed -i 's/^\([^#]*\)trust/\1md5/g' /var/lib/pgsql/data/pg_hba.conf
echo
echo -e "pgsql\t$DB_USER\t$DB_PWD\t$DB_NAME" >> /root/account_data.csv
echo
echo "DB NAME: $DB_NAME"
echo "USER NAME DB: $DB_USER"
echo "PASSWORD: $DB_PWD"
echo
echo
echo
echo -e " \033[32m -//- END DATABASE POSTGRESQL ACCESS -\\- \033[0m"
echo
echo
clear
echo
echo
echo
echo -e " \033[32m ***** Configuration WEB SERVER *****\033[0m"
sleep 5
#php-fpm configuration
sed -i "s@;date.timezone [email protected] = $timezone@g" /etc/php.ini
sed -i "s@display_errors = Off@display_errors = On@g" /etc/php.ini
sed -i "s@html_errors = On@html_errors = Off@g" /etc/php.ini
sed -i "s@memory_limit = 128M@memory_limit = 512M@g" /etc/php.ini
sed -i "s@max_execution_time = 30@max_execution_time = 300@g" /etc/php.ini
sed -i "s@max_input_time = 60@max_input_time = 300@g" /etc/php.ini
sed -i "s@;catch_workers_output =@catch_workers_output =@g" /etc/php-fpm.d/www.conf
sed -i "s@;php_flag\[display_errors\] = off@php_flag\[display_errors\] = on@" /etc/php-fpm.d/www.conf
# permissions
sed -i "s@user nginx@user $webserver@g" /etc/nginx/nginx.conf
sed -i "s@user = apache@user = $webserver@g" /etc/php-fpm.d/www.conf
sed -i "s@group = nginx@group = $webserver@g" /etc/php-fpm.d/www.conf
sed -i "s@group = apache@group = $webserver@g" /etc/php-fpm.d/www.conf
sed -i "s@;listen.group = [email protected] = $webserver@g" /etc/php-fpm.d/www.conf
sed -i "s@;listen.owner = [email protected] = $webserver@g" /etc/php-fpm.d/www.conf
sed -i "s@listen = 127.0.0.1:9000@;listen = 127.0.0.1:9000@g" /etc/php-fpm.d/www.conf
sed -i "s@listen = /run/php-fpm/www.sock@listen = /var/run/php-fpm/php-fpm.sock@g" /etc/php-fpm.d/www.conf
sed -i "s@;php_value[opcache.file_cache] = /var/lib/php/opcache@php_value[opcache.file_cache] = /var/lib/php/opcache@g" /etc/php-fpm.d/www.conf
sed -i "s@;listen.mode = [email protected] = 0660@g" /etc/php-fpm.d/www.conf
sed -i "s@SELINUX=enforcing@SELINUX=disabled@g" /etc/sysconfig/selinux
sed -i "s@SELINUX=enforcing@SELINUX=disabled@g" /etc/selinux/config
setenforce 0
cat << EOF > $serverRoot/$router
<!DOCTYPE html>
<html>
<head>
<meta name='robots' content='noindex,nofollow'>
<style type='text/css'>
html, body {
width: 100vw;
height: 100vh;
background-color: white;
}
.box {
width: 100vw;
height: 100vh;
background-color: white;
}
.box:after {
content: ' ';
border-bottom: 100vh solid #F3F7FC;
border-left: 100vw solid transparent;
width: 0;
position: absolute;
}
.image {
z-index: 1;
border-radius: 15px;
width: 700px;
left: 50%;
margin-left: -400px;
position: absolute;
top: 50%;
transform: translateY(-50%);
}
#hostname {
position: absolute;
left: 27%;
top: 35%;
font-family: 'Roboto';
font-style: normal;
font-weight: 400;
font-size: 24px;
line-height: 30px;
color: #FFFFFF;
}
h5 {
left: 14%;
top: 40%;
position: absolute;
font-size: 0.83em;
margin-block-start: 1.67em;
margin-block-end: 1.67em;
margin-inline-start: 80px;
margin-inline-end: 190px;
font-weight: bold;
color: #535353;
transform: translateY(0%);
}
</style>
</head>
<body>
<div class='box'>
<div class='image'>
<span><center><h2><p>Server configured successfully!</p></h2></br></center><h5> <p> Server : <?php \$info_OS = shell_exec('cat /etc/system-release'); echo "\$info_OS"; ?></p><p> Web-Server : <?php \$info_web = \$_SERVER['SERVER_SOFTWARE']; echo "\$info_web"; ?> PHP-FPM : version <?php \$info_php = phpversion(); echo "\$info_php"; ?> </p><p> DB PostgreSQL : <?php \$info_db = shell_exec('psql --version'); echo "\$info_db"; ?></p><p> DB MySQL : <?php \$info_db2 = shell_exec('mysql --version'); echo "\$info_db2"; ?></p><p> Time Server : <?php \$date = date('d.m.Y l H:i:s'); \$time_zone = date_default_timezone_get(); echo "\$date \$time_zone"; ?></p><p> Your Public IP : <a id="yip"></a></p><p> Your Local IP: <?php \$user_ip = \$_SERVER['REMOTE_ADDR']; echo "\$user_ip"; ?></p></h5></span>
<div id='hostname'>...</div>
<img src='data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPCEtLSBHZW5lcmF0b3I6IEFkb2JlIElsbHVzdHJhdG9yIDI2LjMuMSwgU1ZHIEV4cG9ydCBQbHVnLUluIC4gU1ZHIFZlcnNpb246IDYuMDAgQn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LjgtNy44aC04TDU3Ny45LDEzOC44eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDExIiBkPSJNNTkyLjEsMTM4LjhoOGw1LjgtNy44aC04TDU5Mi4xLDEzOC44eiIvPgoJCTxwYXRoIGNsYXNzPSJzdDExIiBkPSJNNjA2LjIsMTM4LjhoNy40YzEuMS0xLjQsMS43LTIuOSwxLjctNC41VjEzMUg2MTJMNjA2LjIsMTM4Ljh6Ii8+CgkJPHBhdGggY2xhc3M9InN0MTEiIGQ9Ik00NjcuNCwxMzQuOWMwLjEsMS40LDAuNywyLjcsMS42LDMuOGgzLjVsNS44LTcuOGgtOEw0NjcuNCwxMzQuOXoiLz4KCTwvZz4KPC9nPgo8L3N2Zz4K'
/>
</div>
</div>
<script src='https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js'>
</script>
<script type='text/javascript'>
var element = document.getElementById('hostname');
element.textContent = document.location.hostname;
\$.getJSON("https://api.ipify.org?format=json", function(data) {
\$("#yip").html(data.ip);
})
</script>
</body>
</html>
EOF
echo "<?php phpinfo(); ?>" > $serverRoot/info.php
rm -f /etc/nginx/conf.d/*
rm -f /etc/nginx/default.d/*
cat << EOF > /etc/nginx/conf.d/site-$domain.conf
server {
listen 80;
server_name $domain;
root /home/$user/web/public;
index index.php index.html index.htm;
location / {
try_files \$uri \$uri/ /index.php?\$args;
}
location = /50x.html {
root /usr/share/nginx/html;
error_page 404 /404.html;
error_page 500 502 503 504 /50x.html;
}
location ~ \.php$ {
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME \$document_root\$fastcgi_script_name;
include fastcgi_params;
}
}
EOF
clear
echo
echo
echo -e " \033[32m ----- END CONFIGURATION WEB SERVER ACCESS -----\033[0m"
clear
echo
echo
echo
echo -e " \033[32m ***** RUN & Configuration CERTBOT SSL *****\033[0m"
echo
systemctl enable --now snapd.socket
ln -fs /var/lib/snapd/snap /snap
systemctl start --now snapd.socket
snap wait system seed
cat << EOF > snap_permissions.te
module snap_permissions 1.0;
require {
type systemd_unit_file_t;
type init_t;
type snappy_t;
type syslogd_var_run_t;
type journalctl_t;
type snappy_cli_t;
class dbus send_msg;
class service start;
class system status;
class dir search;
class capability sys_resource;
class file map;
}
allow init_t snappy_cli_t:dbus send_msg;
allow journalctl_t init_t:dir search;
allow journalctl_t self:capability sys_resource;
allow journalctl_t syslogd_var_run_t:file map;
allow snappy_cli_t init_t:dbus send_msg;
allow snappy_cli_t init_t:service start;
allow snappy_cli_t systemd_unit_file_t:service start;
allow snappy_t init_t:system status;
EOF
checkmodule -M -m -o snap_permissions.mod snap_permissions.te && rm snap_permissions.te
semodule_package -o snap_permissions.pp -m snap_permissions.mod && rm snap_permissions.mod
semodule -i snap_permissions.pp && rm snap_permissions.pp
snap install --classic certbot
if ! command -v certbot &> /dev/null; then
ln -s /snap/bin/certbot /usr/bin/certbot
fi
clear
echo
echo
echo
echo -e " \033[32m ----- END CONFIGURATION WEB SERVER ACCESS -----\033[0m"
echo
sleep 5
echo
echo
echo
echo -e " \033[32m ***** ADD OPEN PORT 22, 80, 443 *****\033[0m"
sleep 5
echo
#firewall
systemctl start firewalld
firewall-cmd --permanent --zone=public --add-port=22/tcp
firewall-cmd --permanent --zone=public --add-port=80/tcp
firewall-cmd --permanent --zone=public --add-port=443/tcp
firewall-cmd --reload
systemctl stop firewalld
systemctl disable firewalld
echo
clear
echo
echo
echo
echo -e " \033[32m ***** Start, resatr systems *****\033[0m"
sleep 5
echo
# start at boot
systemctl enable php-fpm
systemctl enable nginx
# Permissions
chmod o+x /home/$user/
chown -R $user:$user /home/$user/
chmod 777 -R /var/lib/php/session
chcon -Rt httpd_sys_content_t /home/$user/web
setfacl -R -m u:nginx:rwx /home/$user/web #permissions for user nginx read/write in dir /home/user/web without add nginx in group user
# run them
systemctl start php-fpm
systemctl restart postgresql
systemctl start nginx
cat << EOF > /etc/profile.d/login-ssh.sh
#!/usr/bin/env bash
# Basic info
source /etc/os-release
if [[ -z "\$PRETTY_NAME" ]]; then
HOSTNAME="Not available"
else
HOSTNAME="\$PRETTY_NAME"
fi
# Check which web servers are installed
WEB="Not installed"
WEB2="Not installed"
WEB_COMMANDS=("nginx" "httpd")
for cmd in "\${WEB_COMMANDS[@]}"; do
if command -v "\$cmd" &>/dev/null; then
version="\$(\$cmd -v 2>&1 | awk -F/ '{print \$2}')"
case "\$cmd" in
"nginx") WEB="\$version" ;;
"httpd") WEB2="\$version" ;;
esac
fi
done
# Check which PHP versions are installed
PHP="Not installed"
PHP_COMMANDS=("php")
for cmd in "\${PHP_COMMANDS[@]}"; do
if command -v "\$cmd" &>/dev/null; then
PHP="\$(\$cmd -r 'echo PHP_VERSION;')"
break
fi
done
# Check which databases are installed
DB_PGSQL="Not installed"
DB_MYSQL="Not installed"
DB_COMMANDS=("psql" "mysql")
for cmd in "\${DB_COMMANDS[@]}"; do
if command -v "\$cmd" &>/dev/null; then
version="\$(\$cmd -V 2>&1 | awk -F/ '{print \$1}')"
case "\$cmd" in
"psql") DB_PGSQL="\$version" ;;
"mysql") DB_MYSQL="\$version" ;;
esac
fi
done
# Get system info
TIME=\$(date -u)
UPTIME=\$(uptime -p)
MEMORY=\$(awk '/MemTotal/{total=\$2}/MemFree/{free=\$2}END{printf "%.2f/%.2f G", (total-free)/1024/1024, total/1024/1024}' /proc/meminfo 2>/dev/null || echo "Not available")
# Print banner after successful SSH login
echo " ┬┌┐┌┌─┐┌─┐ ┌─┐┌─┐┬─┐┬ ┬┌─┐┬─┐"
echo " ││││├┤ │ │ └─┐├┤ ├┬┘└┐┌┘├┤ ├┬┘"
echo " ┴┘└┘└ └─┘ └─┘└─┘┴└─ └┘ └─┘┴└─"
echo -e " \033[32m "- Version OS ...........: " "\$HOSTNAME"\033[0m"
echo -e " \033[35m "- Nginx WEB Server .....: " "\$WEB"\033[0m"
echo -e " \033[35m "- Apache WEB Server ....: " "\$WEB2"\033[0m"
echo -e " \033[34m "- PHP Version ..........: " "\$PHP"\033[0m"
echo -e " \033[33m "- PostgreSQL Version ...: " "\$DB_PGSQL"\033[0m"
echo -e " \033[33m "- MySQL Version ........: " "\$DB_MYSQL"\033[0m"
echo -e " \033[32m "- Date/Time ............: " "\$TIME"\033[0m"
echo -e " \033[31m "- Uptime ...............: " "\$UPTIME"\033[0m"
echo -e " \033[31m "- Memory Used/Total ....: " "\$MEMORY"\033[0m"
export PS1='[\u@\h \W]\\$ '
EOF
echo
hostnamectl set-hostname $HOSTNAME
clear
echo
echo
echo
echo -e "\033[34m ***** Exiting from install web apps and REBOOT *****\033[0m"
sleep 5
clear
echo
echo
echo
echo -e " \033[32m ▓█████▄ ▒█████ ███▄ █ ▓█████ "
echo -e " \033[32m ▒██▀ ██▌▒██▒ ██▒ ██ ▀█ █ ▓█ ▀ "
echo -e " \033[32m ░██ █▌▒██░ ██▒▓██ ▀█ ██▒▒███ "
echo -e " \033[32m ░▓█▄ ▌▒██ ██░▓██▒ ▐▌██▒▒▓█ ▄ "
echo -e " \033[32m ░▒████▓ ░ ████▓▒░▒██░ ▓██░░▒████▒ "
echo -e " \033[32m ▒▒▓ ▒ ░ ▒░▒░▒░ ░ ▒░ ▒ ▒ ░░ ▒░ ░ "
echo -e " \033[32m ░ ▒ ▒ ░ ▒ ▒░ ░ ░░ ░ ▒░ ░ ░ ░ "
echo -e " \033[32m ░ ░ ░ ░ ░ ░ ▒ ░ ░ ░ ░ "
echo -e " \033[32m ░ ░ ░ ░ ░ ░ "
echo -e " \033[32m ░ \033[0m"
sleep 5
clear
echo
echo
echo
echo -e "\033[31m ***** Please note! The system will be rebooted! ***** \033[0m"
sleep 10
rm -f ./install_software_web_server_with_db_postgresql_centos8.sh
echo
reboot