Skip to content

Commit 2f1990d

Browse files
author
atcaoyufei
committed
php
1 parent 04abf2e commit 2f1990d

File tree

1 file changed

+24
-14
lines changed

1 file changed

+24
-14
lines changed

php/install.sh

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ Freetype_New_Ver='freetype-2.10.1'
99
MONGODB_VERSION='mongodb-1.19.4'
1010
xlswriter='1.5.8'
1111
ImageMagick_VERSION='7.1.1-40'
12+
Swoole_Ver='4.8.13'
1213

1314
DIR='/tmp'
1415

@@ -34,6 +35,7 @@ wget -c --no-check-certificate https://github.com/alanxz/rabbitmq-c/archive/refs
3435
wget -c --no-check-certificate https://pecl.php.net/get/amqp-${AMQP_VERSION}.tgz
3536
wget -c --no-check-certificate https://pecl.php.net/get/${MONGODB_VERSION}.tgz
3637
wget -c --no-check-certificate http://pecl.php.net/get/${PHPRedis_Ver}.tgz
38+
wget -c --no-check-certificate https://github.com/swoole/swoole-src/archive/refs/tags/v${Swoole_Ver}.tar.gz
3739
wget -c --no-check-certificate https://github.com/ImageMagick/ImageMagick/archive/refs/tags/${ImageMagick_VERSION}.tar.gz
3840
wget -c --no-check-certificate https://pecl.php.net/get/${imagick_VERSION}.tgz
3941
wget -c --no-check-certificate https://download.savannah.gnu.org/releases/freetype/${Freetype_New_Ver}.tar.xz
@@ -51,16 +53,16 @@ ldconfig
5153
ln -sf /usr/local/freetype/include/freetype2/* /usr/include/
5254

5355
# ImageMagick
54-
echo -e "[+] Installing ${ImageMagick_VERSION}\n"
55-
cd ${DIR} && tar -zxf ${DIR}/${ImageMagick_VERSION}.tar.gz
56-
cd ${DIR}/ImageMagick-${ImageMagick_VERSION}
57-
./configure --prefix=/usr/local/imagemagick
58-
make && make install
59-
ldconfig /usr/local/imagemagick/lib
56+
# echo -e "[+] Installing ${ImageMagick_VERSION}\n"
57+
# cd ${DIR} && tar -zxf ${DIR}/${ImageMagick_VERSION}.tar.gz
58+
# cd ${DIR}/ImageMagick-${ImageMagick_VERSION}
59+
# ./configure --prefix=/usr/local/imagemagick
60+
# make && make install
61+
# ldconfig /usr/local/imagemagick/lib
6062

61-
ln -sf /usr/local/imagemagick/bin/convert /usr/bin/convert
62-
ln -sf /usr/local/imagemagick/bin/identify /usr/bin/identify
63-
ln -sf /usr/local/imagemagick/bin/magick /usr/bin/magick
63+
# ln -sf /usr/local/imagemagick/bin/convert /usr/bin/convert
64+
# ln -sf /usr/local/imagemagick/bin/identify /usr/bin/identify
65+
# ln -sf /usr/local/imagemagick/bin/magick /usr/bin/magick
6466

6567
echo -e "[+] Installing ${PHP_VERSION}\n"
6668
cd ${DIR} && tar zxf ${DIR}/${PHP_VERSION}.tar.gz
@@ -175,13 +177,21 @@ git submodule update --init
175177
make && make install
176178
echo 'extension = "xlswriter.so"' > /usr/local/php/conf.d/005-xlswriter.ini
177179

178-
# imagick
179-
cd ${DIR} && tar zxf ${DIR}/${imagick_VERSION}.tgz
180-
cd ${DIR}/${imagick_VERSION}
180+
# Swoole
181+
cd ${DIR} && tar zxf ${DIR}/v${Swoole_Ver}.tar.gz
182+
cd ${DIR}/swoole-src-${Swoole_Ver}
181183
/usr/local/php/bin/phpize
182-
./configure --with-php-config=/usr/local/php/bin/php-config --with-imagick=/usr/local/imagemagick
184+
./configure --with-php-config=/usr/local/php/bin/php-config --enable-openssl --enable-http2 --enable-swoole-json
183185
make && make install
184-
echo 'extension = "imagick.so"' > /usr/local/php/conf.d/006-imagick.ini
186+
echo 'extension = "swoole.so"' > /usr/local/php/conf.d/006-swoole.ini
187+
188+
# imagick
189+
# cd ${DIR} && tar zxf ${DIR}/${imagick_VERSION}.tgz
190+
# cd ${DIR}/${imagick_VERSION}
191+
# /usr/local/php/bin/phpize
192+
# ./configure --with-php-config=/usr/local/php/bin/php-config --with-imagick=/usr/local/imagemagick
193+
# make && make install
194+
# echo 'extension = "imagick.so"' > /usr/local/php/conf.d/006-imagick.ini
185195

186196
# composer
187197
wget --no-check-certificate https://getcomposer.org/download/1.10.18/composer.phar -O /usr/local/bin/composer

0 commit comments

Comments
 (0)