-
Notifications
You must be signed in to change notification settings - Fork 10
/
install.sh
104 lines (90 loc) · 1.91 KB
/
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
#!/bin/bash
PREFIX=/usr/local
SUDO=sudo
DL=wget
PROXYCHAINS=
PHP_VERSION=7.3.13
YAML_VERSION=2.0.4
ZIP_VERSION=1.15.5
RUNKIT7_VERSION=3.1.0a1
MONGODB_VERSION=1.6.1
set -e
mkdir -p temp
cd temp
$PROXYCHAINS $DL http://www.php.net/distributions/php-$PHP_VERSION.tar.xz
tar -xJf php-$PHP_VERSION.tar.xz
cd php-$PHP_VERSION
./configure \
--disable-cgi \
--enable-mbstring \
--enable-bcmath \
--enable-pdo \
--with-pdo-mysql \
--with-sodium \
--enable-sockets \
--with-curl \
--with-libedit \
--with-openssl \
--with-zlib \
--with-gmp \
--with-gd \
--with-jpeg-dir \
--with-webp-dir \
--with-png-dir \
--with-freetype-dir \
--enable-pcntl \
--enable-maintainer-zts \
--prefix="$PREFIX"
make -j`nproc`
$SUDO make install
cd ..
$PROXYCHAINS git clone https://github.com/krakjoe/pthreads.git --depth=1
cd pthreads
phpize
./configure
make -j`nproc`
$SUDO make install
cd ..
$PROXYCHAINS $DL https://pecl.php.net/get/mongodb-$MONGODB_VERSION.tgz
tar -zxf mongodb-$MONGODB_VERSION.tgz
cd mongodb-$MONGODB_VERSION
phpize
./configure
make -j`nproc`
$SUDO make install
cd ..
$PROXYCHAINS $DL https://pecl.php.net/get/yaml-$YAML_VERSION.tgz
tar -zxf yaml-$YAML_VERSION.tgz
cd yaml-$YAML_VERSION
phpize
./configure
make -j`nproc`
$SUDO make install
cd ..
$PROXYCHAINS $DL https://pecl.php.net/get/zip-$ZIP_VERSION.tgz
tar -zxf zip-$ZIP_VERSION.tgz
cd zip-$ZIP_VERSION
phpize
./configure
make -j`nproc`
$SUDO make install
cd ..
$PROXYCHAINS $DL https://pecl.php.net/get/runkit7-$RUNKIT7_VERSION.tgz
tar -zxf runkit7-$RUNKIT7_VERSION.tgz
cd runkit7-$RUNKIT7_VERSION
phpize
./configure
make -j`nproc`
$SUDO make install
cd ..
echo "phar.readonly = off
extension = yaml.so
extension = pthreads.so
extension = mongodb.so
extension = runkit7.so
extension = zip.so
zend_extension = opcache.so
zend.assertions = -1
" | $SUDO tee "$PREFIX/lib/php.ini" > /dev/null
cd ..
rm -rf temp