-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMaster_Installer.bsh
More file actions
207 lines (129 loc) · 7.35 KB
/
Master_Installer.bsh
File metadata and controls
207 lines (129 loc) · 7.35 KB
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
#! /bin/bash -w
## 2026-01-29 -- Master_Installer.bsh
## this just might work....!
#
# nohup bash -vx ~/server-migration/Master_Installer.bsh > ~/server-migration/Master_Installer.bsh.log 2>&1 &
#
echo "Start date/time is $(date;)" ;
dnf --assumeyes update ;
dnf --assumeyes upgrade ;
dnf --assumeyes clean all ;
dnf --assumeyes install git ; ## this has probably already been done!
#### git clone https://github.com/edwardsmarkf/server-migration ;
###################
# #
# f f m p e g #
# #
###################
echo 'hopefully you have checked for the latest version...???' ;
bash -vx ~/server-migration/ffmpeg/00-run-master-install.bsh \
> ~/server-migration/ffmpeg/00-run-master-install.bsh.log 2>&1 ;
###################
# #
# m i s c #
# #
###################
bash -vx ~/server-migration/bash-misc/dnf-yum.bsh > ~/server-migration/bash-misc/dnf-yum.bsh.log 2>&1 ;
bash -vx ~/server-migration/bash-misc/root-init.bsh > ~/server-migration/bash-misc/root-init.bsh.log 2>&1 ;
bash -vx ~/server-migration/bash-misc/certbot.bsh > ~/server-migration/bash-misc/certbot.bsh.log 2>&1 ;
bash -vx ~/server-migration/bash-misc/create-log-directory.bsh > ~/server-migration/bash-misc/create-log-directory.bsh.log 2>&1 ;
bash -vx ~/server-migration/bash-misc/wkhtmltopdf.bsh > ~/server-migration/bash-misc/wkhtmltopdf.bsh.log 2>&1 ;
##########################
# #
# m a r i a d b #
# #
##########################
bash -vx ~/server-migration/mariadb/00_mariadb-upgrade.bsh > ~/server-migration/mariadb/00_mariadb-upgrade.bsh.log 2>&1 ;
mariadb --verbose < ~/server-migration/mariadb/05_create_db_test.sql ;
###################
# #
# w e b m i n #
# #
###################
sh -c "$(curl -fsSL https://software.virtualmin.dev/virtualmin-install.sh)" \
-- \
--yes \
--bundle LAMP \
--branch stable \
--hostname host.edwardsmark.info \
;
bash -vx ~/server-migration/webmin/virtualmin.bsh > ~/server-migration/webmin/virtualmin.bsh.log 2>&1 ;
bash -vx ~/server-migration/webmin/csf.bsh > ~/server-migration/webmin/csf.bsh.log 2>&1 ;
bash -vx ~/server-migration/webmin/etc_resolv_conf.bsh > ~/server-migration/webmin/etc_resolv_conf.bsh.log 2>&1 ;
###################
# #
# p h p #
# #
###################
bash -vx ~/server-migration/php/Master_Installer.bsh > ~/server-migration/php/Master_Installer.bsh.log 2>&1 ;
####################
# #
# p e r l #
# #
####################
bash -vx ~/server-migration/perl/Master_Installer.bsh > ~/server-migration/perl/Master_Installer.bsh.log 2>&1 ;
#########################################
# #
# m a r i a d b t e s t i n g #
# #
#########################################
perl ~/server-migration/mariadb/05_test_perl_mariadb_connection.pl ;
php ~/server-migration/mariadb/05_test_php_mariadb_connection.php ;
##########################
# #
# n o d e #
# #
##########################
bash -vx ~/server-migration/node/node-js.bsh > ~/server-migration/node/node-js.bsh.log 2>&1 ;
bash -vx ~/server-migration/node/pm2-install.bsh > ~/server-migration/node/pm2-install.bsh.log 2>&1 ;
##########################
# #
# c l a m a v #
# #
##########################
bash -vx ~/server-migration/clamav/clamav.bsh > ~/server-migration/clamav/clamav.bsh.log 2>&1 ;
##########################
# #
# t e s t i n g #
# #
##########################
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ ;
export LIBPATH=/usr/local/lib/ ;
export LD_LIBRARY_PATH=/usr/local/lib/ ;
which ffmpeg; ## /usr/local/bin/ffmpeg
which ffprobe; ## /usr/local/bin/ffprobe
/usr/local/bin/ffmpeg -version ;
/usr/local/bin/ffprobe -version ;
webmin -version ;
fail2ban-client --version ;
php --version ;
perl -v ;
perl -e 'use Template::Stash::XS ; ' ; ## TEST TEST TEST TEST TEST TEST TEST ! !
su fakeperluser --command "perl -W -e 'use File::Basename ; ' ; " ;
echo 'SELECT VERSION() "Version:" ;' | mariadb && echo $? ;
bash ~/server-migration/mariadb/05_test_perl_mariadb_connection.bsh && echo $? ;
bash ~/server-migration/mariadb/05_test_php_mariadb_connection.bsh && echo $? ;
echo <<END
be sure to run or look at the following:
1) get new gmail-password and run: bash -vx ~/server-migration/bash-misc/s-nail-postfix.bsh; '
2) include new IP ## with stripe: https://www.edwardsmark.com/textpattern/articles/265/associate-stripe-api-key-with-specific-ip-number
END
echo "End date/time is $(date;)" ;
exit;
######################################################################################################################################
######################################################################################################################################
######################################################################################################################################
######################################################################################################################################
######################################################################################################################################
############################
# #
# p m 2 i n i t #
# #
############################
bash -vx ~/server-migration/httpd.conf/pm2-httpd-conf-initialize.bsh > ~/server-migration/httpd.conf/pm2-httpd-conf-initialize.bsh.log 2>&1 ;
########################################
# #
# s - n a i l - p o s t f i x #
# #
########################################
######## bash -vx ~/server-migration/bash-misc/s-nail-postfix.bsh > ~/server-migration/bash-misc/s-nail-postfix.bsh.log 2>&1 ;