- 下载php7
wget http://jp2.php.net/distributions/php-7.1.2.tar.gz
- 解压
tar -zxvf php-7.1.2.tar.gz
- 进入目录
./confirure
报错
我们安装libxml2&libxml2-devsudo apt-get install libxml2 libxml2-dev
安装完执行./configure --prefix=/usr/local/php
sudo make & sudo make install
等待安装结束!OK! 添加模块
1 | cd ~/opt/php/php-7.0.7/ |
php参数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./configure --prefix=/usr/local/php/php-5.3.5 \
--with-config-file-path=/usr/local/php/php-5.3.5/etc \
--with-config-file-scan-dir=/usr/local/php/php-5.3.5/etc/conf.d \
--with-mcrypt \
--with-mhash \
--with-mysqli=mysqlnd \
--with-pdo-mysql=mysqlnd \
--with-gd \
--with-iconv \
--with-zlib \
--with-curl \
--with-jpeg-dir \
--with-freetype-dir \
--with-apxs2=/usr/local/apache/bin/apxs \
--with-openssl \
--with-xmlrpc \
--with-gettext \
--with-fpm-user=nginx \
--with-fpm-group=nginx \
--enable-fpm \
--enable-cgi \
--enable-xml \
--enable-bcmath \
--enable-inline-optimization \
--enable-mbregex \
--enable-mbstring \
--enable-ftp \
--enable-gd-native-ttf \
--enable-pcntl \
--enable-sockets \
--enable-sysvmsg \
--enable-sysvshm \
--enable-shmop \
--enable-zip \
--enable-soap \
--enable-session \
--enable-opcache \
--enable-cli
make && make install
phpinfo信息不显示解决方法:short_open_tag = On