forked from Tessares/libconvert
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_lib.sh
executable file
·64 lines (58 loc) · 2.45 KB
/
install_lib.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
#!/bin/bash
FILES="libssl1.1_1.1.1h-1_amd64.deb libssl-dev_1.1.1h-1_amd64.deb pcre-8.44.tar.bz2 expat-2.2.9.tar.bz2 apr-1.7.0.tar.gz apr-util-1.6.1.tar.gz httpd-2.4.46.tar.gz libcbor0_0.5.0+dfsg-2_amd64.deb libfido2-1_1.5.0-2_amd64.deb openssh-client_8.3p1-1_amd64.deb openssh-sftp-server_8.3p1-1_amd64.deb ucf_3.0043_all.deb runit-helper_2.9.0_all.deb openssh-server_8.3p1-1_amd64.deb"
declare -a URL
URL=('http://ftp.de.debian.org/debian/pool/main/o/openssl/' 'http://ftp.de.debian.org/debian/pool/main/o/openssl/' 'https://ftp.pcre.org/pub/pcre/' 'https://github.com/libexpat/libexpat/releases/download/R_2_2_9/' 'https://downloads.apache.org//apr/' 'https://downloads.apache.org//apr/' 'https://downloads.apache.org//httpd/' 'http://ftp.de.debian.org/debian/pool/main/libc/libcbor/' 'http://ftp.de.debian.org/debian/pool/main/libf/libfido2/' 'http://ftp.de.debian.org/debian/pool/main/o/openssh/' 'http://ftp.de.debian.org/debian/pool/main/o/openssh/' 'http://ftp.de.debian.org/debian/pool/main/u/ucf/' 'http://ftp.de.debian.org/debian/pool/main/d/dh-runit/' 'http://ftp.de.debian.org/debian/pool/main/o/openssh/')
url_counter=0
for file in $FILES; do
if [ -f $file ];
then
echo "$file exists";
else
wget ${URL[$url_counter]}$file;
if [ $? -eq 0 ];
then
echo "$file is downloaded";
else
rm $file;
echo "download of $file failed";
exit 1;
fi
fi
url_counter=$((url_counter + 1))
done
dpkg -i libssl1.1_1.1.1h-1_amd64.deb
dpkg -i libssl-dev_1.1.1h-1_amd64.deb
dpkg -i libcbor0_0.5.0+dfsg-2_amd64.deb
dpkg -i libfido2-1_1.5.0-2_amd64.deb
dpkg -i openssh-client_8.3p1-1_amd64.deb
dpkg -i openssh-sftp-server_8.3p1-1_amd64.deb
dpkg -i ucf_3.0043_all.deb
dpkg -i runit-helper_2.9.0_all.deb
dpkg -i openssh-server_8.3p1-1_amd64.deb
tar -xf pcre-8.44.tar.bz2
cd pcre-8.44
./configure
make -j
make install
cd /lc
tar -xf expat-2.2.9.tar.bz2
cd expat-2.2.9
./configure --prefix=/usr/local/bin/
make -j
make install
cd /lc
tar xvf apr-util-1.6.1.tar.gz
tar xvf apr-1.7.0.tar.gz
tar xvf httpd-2.4.46.tar.gz
mkdir -p httpd-2.4.46/srclib/apr-util/
mkdir -p httpd-2.4.46/srclib/apr/
cp -r apr-util-1.6.1/* httpd-2.4.46/srclib/apr-util/
cp -r apr-1.7.0/* httpd-2.4.46/srclib/apr/
cd httpd-2.4.46
./configure --with-pcre=/usr/local/bin/pcre-config --with-expat=/usr/local/bin/
make -j
make install
ldconfig
truncate -s 1M /usr/local/apache2/htdocs/1M
truncate -s 5M /usr/local/apache2/htdocs/5M
truncate -s 10M /usr/local/apache2/htdocs/10M