请访问我的个人博客 sourcod
- 下载php7
wget http://jp2.php.net/distributions/php-7.1.2.tar.gz
- 解压
tar -zxvf php-7.1.2.tar.gz
- 进入目录
./confirure
报错
我们安装libxml2&libxml2-dev
sudo apt-get install libxml2 libxml2-dev
安装完执行./configure --prefix=/usr/local/php
sudo make & sudo make install
等待安装结束!OK!
添加模块
cd ~/opt/php/php-7.0.7/
cd ./ext/mbstring
/usr/local/php/php-7.0.7/bin/phpize
./configure –with-php-config=/usr/local/php/php-7.0.7/bin/php-config
make
make install
php参数
./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