xywuyiba6 发表于 2018-12-12 06:21:09

我的PHP编译日志

  build install 按需使用:
  wget http://sourceforge.net/projects/pcre/files/pcre/8.33/pcre-8.33.tar.gz/download
  tar -xzvf pcre-8.33.tar.gz
  cd pcre-8.33
  ./configure
  make
  make install
  PHP 参见 http://docs.php.net/manual/en/pthreads.installation.php
  yum install libxml2
  yum install libxml2-devel -y
  如果编译libxml2,需要先安装zlib(如果没有安装)
  yum install zlib zlib-devel
  PHP 2.9.0编译通过,见G3.5备份目录
  /*不再需要thread
  tar -xzf pthreads-2.0.10.tgz
  mv pthreads-2.0.10 php-5.6.7/ext/pthreads
  ./buildconf --force
  rm -rf autom4te.cache/
  rmaclocal.m4
  ./buildconf --force
  ./configure --help | grep pthreads
  */
  ./configure--prefix=/usr/local/php --enable-fpm --enable-maintainer-zts --with-mysql --with-pdo-mysql
  要用pdo,在php.ini中加入: pdo_mysql.default_socket="/var/lib/mysql/mysql.sock"
  make
  make install
  cp php.ini-production /usr/local/php/etc/php.ini
  #modify /usr/local/php/etc/php-fpm.conf
  cd /usr/local/php/sbin
  ./php-fpm -c ../etc
  编译phalcon
  如果找不到php环境,需要修改install文件,最后一句:
  ./install
  /usr/local/php/bin/phpize && ./configure --enable-phalcon --with-php-config=/usr/local/php/bin/php-config && make && make install && echo -e "\nThanks for compiling Phalcon!\nBuild succeed: Please restart your web server to complete the installation"
  mysql安装
  yum install mysql
  yum install mysql-community-server
  用mysqli和curl的编译命令
  yum install curl curl-devel
  ./configure--prefix=/usr/local/php --enable-fpm --enable-maintainer-zts --with-mysql --with-pdo-mysql --with-mysqli --with-curl
  去掉--enable-maintainer-zts
  ./configure--prefix=/usr/local/php --enable-fpm --with-mysql --with-pdo-mysql --with-mysqli --with-curl
  增加GD
  ./configure--prefix=/usr/local/php --enable-fpm --with-mysql --with-pdo-mysql --with-mysqli --with-curl --with-gd --with-png-dir=../libpng-1.6.29 --with-jpeg-dir=../jpeg-9b
  spec要把libpng libjpeg等库打进去
  /usr/local/lib/libpng*
  增加openssl
  一、按照openssl官网指导编译安装openssl
  二、php方面,在编译时增加: --with-openssl
  然后进入php源码下的 ext/openssl目录下
  /usr/local/php/bin/phpize
  如果提示找不到 config.m4,看看没有config0.m4拷贝成config.m4
  ./configure --with-openssl --with-php-config=/usr/local/php/bin/php-config
  make
  make install
  三、php.ini中增加
  extension=openssl.so



页: [1]
查看完整版本: 我的PHP编译日志