Skip to content

Commit bce9d1f

Browse files
committed
nits
Signed-off-by: Jack Cherng <[email protected]>
1 parent bcfc7e1 commit bce9d1f

File tree

2 files changed

+91
-85
lines changed

2 files changed

+91
-85
lines changed

general/web_server/compile_php56.sh

+50-45
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ MEMSIZE_MB=$(free -m | awk '/^Mem:/{print $2}')
1515
# configurations #
1616
#----------------#
1717

18-
bison_version="2.7.1"
1918
php_version="latest"
19+
bison_version="2.7.1"
2020

2121
# get the exact latest 5.6 version number
2222
if [ "${php_version,,}" = 'latest' ]; then
@@ -69,8 +69,8 @@ yum install -y \
6969
# fix lib linking #
7070
#-----------------#
7171

72-
ln -sf /usr/lib64/libldap* /usr/lib/
73-
ln -sf /usr/lib64/liblber* /usr/lib/
72+
ln -sfn /usr/lib64/libldap* /usr/lib/
73+
ln -sfn /usr/lib64/liblber* /usr/lib/
7474

7575
ldconfig
7676

@@ -113,7 +113,7 @@ fi
113113

114114
# prefer using older bison
115115
if ! bison --version | grep -F -q "${bison_version}"; then
116-
echo "* temporarily set bison executable into PATH"
116+
echo "[*] temporarily set bison executable into PATH"
117117
PATH="${bison_bin_dir}:$PATH"
118118
fi
119119

@@ -163,51 +163,54 @@ pushd "${php_src_dir}" || exit
163163

164164
./buildconf --force
165165

166-
./configure --prefix="${php_install_dir}" \
167-
--disable-debug \
168-
--disable-rpath \
169-
--enable-bcmath \
170-
--enable-calendar \
171-
--enable-exif \
172-
--enable-fpm \
173-
--enable-ftp \
174-
--enable-inline-optimization \
175-
--enable-intl \
176-
--enable-mbregex --enable-mbstring \
177-
--enable-pcntl \
178-
--enable-shmop \
179-
--enable-soap \
180-
--enable-sockets \
181-
--enable-sysvmsg --enable-sysvsem --enable-sysvshm \
182-
--enable-wddx \
183-
--enable-xml \
184-
--enable-zip \
185-
--with-bz2 \
186-
--with-config-file-path="${php_install_dir}/etc" \
187-
--with-config-file-scan-dir="${php_install_dir}/etc/php.d" \
188-
--with-curl="/usr/local" \
189-
--with-fpm-group="${php_run_user}" \
190-
--with-fpm-user="${php_run_user}" \
191-
--with-gd --with-freetype-dir --with-jpeg-dir --with-png-dir --enable-gd-native-ttf \
192-
--with-gettext \
193-
--with-gmp \
194-
--with-iconv-dir="/usr/local" \
195-
--with-libxml-dir="/usr" \
196-
--with-libzip \
197-
--with-mhash \
198-
--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd \
199-
--with-openssl \
200-
--with-pspell \
201-
--with-readline \
202-
--with-xmlrpc \
203-
--with-xsl \
204-
--with-zlib \
205-
${LOW_MEMORY_FLAGS[*]}
166+
./configure \
167+
--prefix="${php_install_dir}" \
168+
--disable-debug \
169+
--disable-rpath \
170+
--enable-bcmath \
171+
--enable-calendar \
172+
--enable-exif \
173+
--enable-fpm \
174+
--enable-ftp \
175+
--enable-inline-optimization \
176+
--enable-intl \
177+
--enable-mbregex --enable-mbstring \
178+
--enable-pcntl \
179+
--enable-shmop \
180+
--enable-soap \
181+
--enable-sockets \
182+
--enable-sysvmsg --enable-sysvsem --enable-sysvshm \
183+
--enable-wddx \
184+
--enable-xml \
185+
--enable-zip \
186+
--with-bz2 \
187+
--with-config-file-path="${php_install_dir}/etc" \
188+
--with-config-file-scan-dir="${php_install_dir}/etc/php.d" \
189+
--with-curl="/usr/local" \
190+
--with-fpm-group="${php_run_user}" \
191+
--with-fpm-user="${php_run_user}" \
192+
--with-gd --with-freetype-dir --with-jpeg-dir --with-png-dir --enable-gd-native-ttf \
193+
--with-gettext \
194+
--with-gmp \
195+
--with-iconv-dir="/usr/local" \
196+
--with-libxml-dir="/usr" \
197+
--with-libzip \
198+
--with-mhash \
199+
--with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd \
200+
--with-openssl \
201+
--with-pspell \
202+
--with-readline \
203+
--with-xmlrpc \
204+
--with-xsl \
205+
--with-zlib \
206+
${LOW_MEMORY_FLAGS[*]}
206207

207208
# PEAR is no longer maintained, ignore errors about PEAR
208209
sed -i"" -E "s/^(install-pear):/.IGNORE: \1\n\1:/g" ./Makefile
209210

210-
make -j"${THREAD_CNT}" ZEND_EXTRA_LIBS="${ZEND_EXTRA_LIBS[*]}" && make install && make clean
211+
make -j"${THREAD_CNT}" ZEND_EXTRA_LIBS="${ZEND_EXTRA_LIBS[*]}" || exit
212+
make install || exit
213+
make clean
211214

212215
popd || exit
213216

@@ -216,4 +219,6 @@ popd || exit
216219
# end #
217220
#-----#
218221

222+
"${php_install_dir}/bin/php" -v
223+
219224
popd || exit

general/web_server/compile_php7.sh

+41-40
Original file line numberDiff line numberDiff line change
@@ -263,46 +263,47 @@ sed -i"" -E "s/-dev/-dev.$(git rev-parse --short HEAD)/g" ./configure.ac
263263

264264
./buildconf --force
265265

266-
./configure --prefix="${php_install_dir}" \
267-
--disable-debug \
268-
--disable-rpath \
269-
--enable-bcmath \
270-
--enable-calendar \
271-
--enable-exif \
272-
--enable-fpm \
273-
--enable-ftp \
274-
--enable-inline-optimization \
275-
--enable-intl \
276-
--enable-mbregex --enable-mbstring \
277-
--enable-pcntl \
278-
--enable-shmop \
279-
--enable-soap \
280-
--enable-sockets \
281-
--enable-sysvmsg --enable-sysvsem --enable-sysvshm \
282-
--enable-wddx \
283-
--enable-xml \
284-
--enable-zip \
285-
--with-bz2 \
286-
--with-config-file-path="${php_install_dir}/etc" \
287-
--with-config-file-scan-dir="${php_install_dir}/etc/php.d" \
288-
--with-curl="/usr/local" \
289-
--with-fpm-group="${php_run_user}" \
290-
--with-fpm-user="${php_run_user}" \
291-
--with-gd --with-freetype-dir --with-jpeg-dir --with-png-dir --with-webp-dir --enable-gd-native-ttf \
292-
--with-gettext \
293-
--with-gmp \
294-
--with-iconv-dir="/usr/local" \
295-
--with-libxml-dir="/usr" \
296-
--with-libzip \
297-
--with-mhash \
298-
--with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd \
299-
--with-openssl \
300-
--with-pspell \
301-
--with-readline \
302-
--with-xmlrpc \
303-
--with-xsl \
304-
--with-zlib \
305-
${LOW_MEMORY_FLAGS[*]}
266+
./configure \
267+
--prefix="${php_install_dir}" \
268+
--disable-debug \
269+
--disable-rpath \
270+
--enable-bcmath \
271+
--enable-calendar \
272+
--enable-exif \
273+
--enable-fpm \
274+
--enable-ftp \
275+
--enable-inline-optimization \
276+
--enable-intl \
277+
--enable-mbregex --enable-mbstring \
278+
--enable-pcntl \
279+
--enable-shmop \
280+
--enable-soap \
281+
--enable-sockets \
282+
--enable-sysvmsg --enable-sysvsem --enable-sysvshm \
283+
--enable-wddx \
284+
--enable-xml \
285+
--enable-zip \
286+
--with-bz2 \
287+
--with-config-file-path="${php_install_dir}/etc" \
288+
--with-config-file-scan-dir="${php_install_dir}/etc/php.d" \
289+
--with-curl="/usr/local" \
290+
--with-fpm-group="${php_run_user}" \
291+
--with-fpm-user="${php_run_user}" \
292+
--with-gd --with-freetype-dir --with-jpeg-dir --with-png-dir --with-webp-dir --enable-gd-native-ttf \
293+
--with-gettext \
294+
--with-gmp \
295+
--with-iconv-dir="/usr/local" \
296+
--with-libxml-dir="/usr" \
297+
--with-libzip \
298+
--with-mhash \
299+
--with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd \
300+
--with-openssl \
301+
--with-pspell \
302+
--with-readline \
303+
--with-xmlrpc \
304+
--with-xsl \
305+
--with-zlib \
306+
${LOW_MEMORY_FLAGS[*]}
306307

307308
# PEAR is no longer maintained, ignore errors about PEAR
308309
sed -i"" -E "s/^(install-pear):/.IGNORE: \1\n\1:/g" ./Makefile

0 commit comments

Comments
 (0)