PHP-install

php7.2.7 source compiler and install
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
sudo -i
wget http://hk2.php.net/distributions/php-7.2.7.tar.gz
tar -xvf php-7.2.7
cd php-7.2.7
./configure \
--prefix=/usr/local/php72 \
--with-config-file-path=/usr/local/php72/etc \
--enable-inline-optimization \
--disable-debug \
--disable-rpath \
--enable-shared \
--enable-opcache \
--enable-fpm \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-gettext \
--enable-mbstring \
--with-iconv \
--with-mhash \
--with-openssl \
--enable-bcmath \
--enable-soap \
--with-libxml-dir \
--enable-pcntl \
--enable-shmop \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-sockets \
--with-curl \
--with-zlib \
--enable-zip \
--with-bz2 \
--with-readline
# `make` success
make
# `make test`
make test
# make install
make install
# 检查是否安装成功
/usr/local/php72/bin/php -v
# 加入/usr/bin
ln -s /usr/local/php72/bin/php /usr/bin/php72
ln -s /usr/local/php72/bin/php /usr/bin/php
php -v