centos6.5 gsoap安装过程+ php添加soap扩展

2019-11-16 09:29 来源:未知

参考博客:

机器环境

CentOS release 6.6 kernal 2.6.32-504.23.4.el6.x86_64

CentOS编译安装gSOAP

yum

yum install -y curl libcurl-devel libjpeg-devel libpng-devel libjped-devel freetype-devel libxslt-devel boost-devel gperf libevent-devel libuuid-devel libgearman libgearman-devel

 Linux C实现webservice调用 安装gsoap流程  里面提到make时可能碰到的问题 还没有用到

install php

下载目录: /opt/32450新蒲京网站,安装目录: /Data/apps/php/

cd /optwget http://docs.php.net/distributions/php-7.0.28.tar.gztar xf php-7.0.28.tar.gzcd php-7.0.28./configure --with-libdir=lib64 --prefix=/Data/apps/php --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-gd --with-zlib --with-png-dir --with-jpeg-dir --with-iconv --with-curl --with-mcrypt --with-openssl --with-xsl --enable-opcache --enable-inline-optimization --enable-fpm --enable-mbstring --enable-pcntl --enable-soap --enable-sockets --enable-bcmath --with-libxml --with-freetype-dir=/usr/include/freetype2/ --disable-pharmake && make install

 

php 扩展

下面所有php扩展包的下载目录统一为: /opt/soft/

cd /opt/php-7.0.28/ext/Data/apps/php/bin/phpize./configure --with-php-config=/Data/apps/php/bin/php-configmake && make install

从2.4开始支持php7

下载地址:

wget https://xdebug.org/files/xdebug-2.6.0.tgztar xf xdebug-2.6.0.tgzcd xdebug-2.6.0/Data/apps/php/bin/phpize./configure --with-php-config=/Data/apps/php/bin/php-configmakemake install

最新版本,2.0.1开始支持7.0

详情连接:

wget https://pecl.php.net/get/igbinary-2.0.5.tgztar xf igbinary-2.0.5.tgzcd igbinary-2.0.5/Data/apps/php/bin/phpize./configure --with-php-config=/Data/apps/php/bin/php-configmakemake install

memcached版本要求: php-memcached 3.x Supports PHP 7.0 - 7.2. Requires libmemcached 1.x or higher. Optionally supports igbinary 2.0 or higher. Optionally supports msgpack 2.0 or higher.

安装libmemcached 依赖包wget https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gzctar -zxf libmemcached-1.0.18.tar.gz./configure --prefix=/Data/apps/libmemcached --with-memcachedmake && make install

wget https://pecl.php.net/get/memcached-3.0.0.tgztar xf memcached-3.0.0.tgzcd /opt/soft/memcached-3.0.0/Data/apps/php/bin/phpize./configure --with-php-config=/Data/apps/php/bin/php-config --with-libmemcached-dir=/Data/apps/libmemcached --enable-memcached --enable-memcached-igbinarymake && make install

遇到这样的报错configure: error: no, sasl.h is not available. Run configure with --disable-memcached-sasl to disable this check根据提示加上参数重新编译

./configure --with-php-config=/Data/apps/php/bin/php-config --with-libmemcached-dir=/Data/apps/libmemcached --enable-memcached --enable-memcached-igbinary --disable-memcached-saslmake && make install

下载地址:https://pecl.php.net/package/imagick

安装ImageMagick(ImageMagick-7.0.7-28)wget ftp://mirror.checkdomain.de/imagemagick/ImageMagick-7.0.7-28.tar.gztar xf ImageMagick-7.0.7-28.tar.gzcd ImageMagick-7.0.7-28./configure --prefix=/Data/apps/ImageMagickmake && make install

编译imagickwget http://pecl.php.net/get/imagick-3.4.3.tgztar xf imagick-3.4.3.tgzcd imagick-3.4.3/Data/apps/php/bin/phpize./configure --with-imagick=/Data/apps/ImageMagick --with-php-config=/Data/apps/php/bin/php-configmake && make install

下载地址: https://github.com/phpredis/phpredis (develop版本)

安装redis目录: /Data/app/redis

编译redis扩展wget https://pecl.php.net/get/redis-3.0.0.tgzcd redis-3.0.0/Data/apps/php/bin/phpize./configure --enable-redis-igbinary=/Data/apps/redis/bin/ --with-php-config=/Data/apps/php/bin/php-configmake && make install

安装gearmand服务端 版本:1.1.12

编译gearman客服端扩展git下载最新:https://github.com/wcgallego/pecl-gearman/tree/mastercd pecl-gearman-master/Data/apps/php/bin/phpize./configure --with-php-config=/Data/apps/php/bin/php-configmake && make install

下载链接:

wget http://www.xunsearch.com/scws/down/scws-1.2.3.tar.bz2cd scws-1.2.3/phpext/Data/apps/php/bin/phpize./configure --with-scws=/Data/apps/scws --with-php-config=/Data/apps/php/bin/php-config

下载地址:

安装rabbitmq-c依赖库wget https://github.com/alanxz/rabbitmq-c/releases/download/v0.8.0/rabbitmq-c-0.8.0.tar.gzcd rabbitmq-c-0.8.0./configure --prefix=/usr/local/rabbitmq-c-0.8.0make && make install

编译amqp扩展wget https://pecl.php.net/get/amqp-1.9.3.tgztar -xf amqp-1.9.3.tarcd amqp-1.9.3/Data/apps/php/bin/phpize./configure --with-php-config=/Data/apps/php/bin/php-config --with-amqp --with-librabbitmq-dir=/usr/local/rabbitmq-c-0.8.0make && make install

wget https://github.com/happyfish100/fastdfs/archive/master.zipunzip master.zipcd fastdfs-master/php_client/Data/apps/php/bin/phpize./configure --with-php-config=/Data/apps/php/bin/php-configmake && make install

安装libiconvwget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gztar xf libiconv-1.14.tar.gzcd libiconv-1.14./configuremakemake install

安装libdatrie解压,进入目录./configure LDFLAGS=-L/usr/local/lib LIBS=-liconv --host=armmakemake install

安装trie_filter.so 拓展git clonde https://github.com/zzjin/php-ext-trie-filtercd php-ext-trie-filter/Data/apps/php/bin/phpize./configure --with-php-config=/Data/apps/php/bin/php-config --with-trie_filter=/usr/local/libdatriemake && make install

1、从官网下载最新的版本: ,目前版本是2.8.23。

php.ini 配置

cd /opt/soft/php-7.0.28cp php.ini-production /Data/apps/php/lib/php.ini

加载的模块配置[opcache]zend_extension="/Data/apps/php/lib/php/extensions/no-debug-non-zts-20151012/opcache.so"opcache.memory_consumption=128opcache.interned_strings_buffer=8opcache.max_accelerated_files=4000opcache.fast_shutdown=1opcache.enable_cli=1opcache.validate_timestamps=1opcache.revalidate_freq=1opcache.error_log="/Data/apps/php/var/log/opcache.log"[memcached]extension=memcached.somemcache.hash_strategy=consistentmemcache.hash_function=crc32session.save_handler = memcachedextension=igbinary.soextension=imagick.soextension=redis.soextension=gearman.soextension=trie_filter.so[scws]extension=scws.soscws.default.charset = utf8scws.default.fpath = /Data/apps/scws/etc[amqp]extension=amqp.so[fastdfs]extension = fastdfs_client.sofastdfs_client.base_path = /tmpfastdfs_client.connect_timeout = 2fastdfs_client.network_timeout = 60fastdfs_client.log_level = infofastdfs_client.http.anti_steal_secret_key =fastdfs_client.tracker_group_count = 1fastdfs_client.tracker_group0 = /etc/fdfs/client.conffastdfs_client.use_connection_pool = falsefastdfs_client.connection_pool_max_idle_time = 3600

2、编译安装:

php-fpm.conf

cp /Data/apps/php/etc/php-fpm.conf.default /Data/apps/php/etc/php-fpm

(1)配置安装路径:#./configure --prefix=/usr/local/gSOAP

php-fpm 启动脚本

cd /opt/soft/php-7.0.28/sapi/fpmcp init.d.php-fpm /etc/init.d/php-fpmchmod +x /etc/init.d/php-fpm

(2)#make 

启动php

/etc/init.d/php-fpm start

         #make install

3、安装中碰到的问题及解决方法:

(1)WARNING: 'aclocal-1.14' is missing on your system

该错误详情:
test@test:/usr/local/src/Mesa_build$ sudo make
CDPATH="${ZSH_VERSION+.}:" && cd /install/Mesa-10.3.5 && /bin/bash /install/Mesa-10.3.5/bin/missing aclocal-1.14 -I m4
/install/Mesa-10.3.5/bin/missing: line 81: aclocal-1.14: command not found
WARNING: 'aclocal-1.14' is missing on your system.
      You should only need it if you modified 'acinclude.m4' or
      'configure.ac' or m4 files included by 'configure.ac'.
      The 'aclocal' program is part of the GNU Automake package:
      <http://www.gnu.org/software/automake>
      It also requires GNU Autoconf, GNU m4 and Perl in order to run:
      <http://www.gnu.org/software/autoconf>
      <http://www.gnu.org/software/m4/>
      <http://www.perl.org/>
make: *** [/install/Mesa-10.3.5/aclocal.m4] Error 127

解决方法如下:

  • 用Synaptic Package Manager搜索安装这些库(显然有些是重复的,当时不清楚用哪个索性全添加了):

   autotools-dev    automake    autoconf2.13    m4    perl    libperl5.14

  • 执行如下命令:

test@test:/usr/local/src/Mesa-10.3.5$sudo autoreconf -ivf         就是这一句解决了问题

其他问题:

make环境问题:

(1)ylwrap: line 176: yacc: command not found。yacc是一个生成语法分析器的工具。

 #yum install yacc

(2)missing: line 81: flex: command not found。

#yum install flex (需重新配置安装路径)

(3)/usr/bin/ld: cannot find -ly。

#yum install yum install bison-devel

(4)../../gsoap/stdsoap2.h:690:19:error:zlib.h:No such file or directory

#yum install zlib-devel

(5)error: openssl/bio.h:  No such file or directory

#yum install openssl-devel

 4、php添加soap扩展 

(1)搜索相关安装项信息

$ yum search php | grep -i soap

[root@yxdlnx webuser]# yum search php | grep -i soap
php-soap.x86_64 : A module for PHP applications that use the SOAP protocol
php54w-soap.x86_64 : A module for PHP applications that use the SOAP protocol
php55w-soap.x86_64 : A module for PHP applications that use the SOAP protocol
php56w-soap.x86_64 : A module for PHP applications that use the SOAP protocol
php70w-soap.x86_64 : A module for PHP applications that use the SOAP protocol

根据php版本选择安装即可  

我的是:yum install php55w-soap.x86_64

重启php

 

TAG标签:
版权声明:本文由32450新蒲京网站发布于葡萄游戏厅_卡牌游戏,转载请注明出处:centos6.5 gsoap安装过程+ php添加soap扩展