首页 > 编程语言 >PHP5.6常用模块安装

PHP5.6常用模块安装

时间:2023-04-02 14:32:03浏览次数:52  
标签:opt php && tar -- make 模块 PHP5.6 安装

1、常用命令

查看编译参数:php -I
查看加载模块:php -m
查看模块详情:php --ri 模块名

2、redis扩展

tar xf redis-4.2.0.tgz \
&& cd redis-4.2.0 \
&& /opt/php/bin/phpize \
&& ./configure --with-php-config=/opt/php/bin/php-config \
&& make -j2 \
&& make install
echo "extension= redis.so" >> /opt/php/etc/php.ini

3、fileinfo扩展

tar xf php-5.6.31.tar.bz2
cd php-5.6.31/ext/fileinfo/
/opt/php/bin/phpize
./configure --with-php-config=/opt/php/bin/php-config
make && make install
echo "extension=fileinfo.so" >>/opt/php/etc/php.ini
systemctl restart php-fpm

4、memcached扩展

wget  https://launchpadlibrarian.net/165454254/libmemcached-1.0.18.tar.gz
tar xf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18
./configure --prefix=/opt/libmemcached --with-memcached
make -j2 &&make install
wget  http://pecl.php.net/get/memcached-2.2.0.tgz
tar xf memcached-2.2.0.tgz
cd memcached-2.2.0
/opt/php/bin/phpize
./configure --with-php-config=/opt/php/bin/php-config --with-libmemcached-dir=/opt/libmemcached/ --disable-memcached-sasl
make -j2 && make install
echo "extension=memcached.so" >> /opt/php/etc/php.ini
systemctl restart php-fpm

5、memcache扩展

wget  http://pecl.php.net/get/memcache-3.0.8.tgz
cd memcache-3.0.8.tgz
cd memcache
/opt/php/bin/phpize
./configure --enable-memcache --with-php-config=/opt/php/bin/php-config --with-zlib-dir
make -j2 && make install

# 配置php
echo "extension=/opt/php/lib/php/extensions/no-debug-non-zts-20131226/ memcache.so" >> /opt/php/etc/php.ini

6、Zend opcache扩展

wget  http://pecl.php.net/get/zendopcache-7.0.5.tgz
tar zxvf zendopcache-7.0.5.tgz
cd zendopcache-7.0.5
/opt/php/bin/phpize
./configure --with-php-config=/opt/php/bin/php-config
make && make install
echo "extension=opcache.so" >> /opt/php/etc/php.ini
systemctl restart php-fpm

7、swoole扩展

wget  http://pecl.php.net/get/swoole-1.9.3.tgz
tar -zvxf swoole-1.9.3.tgz
cd swoole-1.9.3
/opt/php/bin/phpize
./configure --with-php-config=/opt/php/bin/php-config
make && make install
echo "extension=swoole.so" >>/opt/php/etc/php.ini
systemctl restart php-fpm

8、imagick扩展

tar -xzvf ImageMagick.tar.gz
cd ImageMagick-7.0.2-0
./configure --prefix=/opt/imagemagick
make && make install
/opt/php/bin/pecl install imagick
cp -a imagick.so /opt/php/lib/php/extensions/no-debug-non-zts-20131226 文件拷贝到/Data/app/php5.6.26/lib/php/extensions/no-debug-non-zts-20131226下
echo "extension=imagick.so"" >>/opt/php/etc/php.ini
systemctl restart php-fpm

9、mbstring扩展

cd /usr/local/src/php-5.6.24/ext/mbstring
/opt//php/bin/phpize
./configure --with-php-config=/opt/php/bin/php-config
make && make install
echo "mbstring.internal_encoding = UTF-8" >> /opt/php/etc/php.ini
echo "extension=mbstring.so" >>/opt/php/etc/php.ini
systemctl restart php-fpm

10、mysql扩展

tar -zxvf PDO_MYSQL-1.0.2.tgz
/opt/php/bin/phpize
./configure --with-php-config=/optl/php/bin/php-config --with-pdo-mysql=/opt/mysql
ln -s /opt/mysql/include/* /usr/local/include/
make && make install
echo "extension=pdo_mysql.s" >> /opt/php/etc/php.ini
systemctl restart php-fpm

11、ionCube扩展

tar xf ioncube_loaders_lin_x86-64.tar.bz2 \
&& cd ioncube \
&& cp -a  ioncube_loader_lin_5.6.so /opt/php/lib/php/extensions/no-debug-non-zts-20131226 \
&& cat >> /opt/php/etc/php.ini <<EOF
zend_extension = /opt/php/lib/php/extensions/no-debug-non-zts-20131226/ ioncube_loader_lin_5.6.so
EOF

12、ZendGuardLoader扩展

tar xf zend-loader-php5.6-linux-x86_64_update1.tar.gz \
&& cd zend-loader-php5.6-linux-x86_64 \
&& cp -a  ZendGuardLoader.so /opt/php/lib/php/extensions/no-debug-non-zts-20131226/
cat >> /opt/php/etc/php.ini <<EOF
zend_extension=/opt/php/lib/php/extensions/no-debug-non-zts-20131226/ ZendGuardLoader.so
zend_extension=/opt/php/lib/php/extensions/no-debug-non-zts-20131226/ opcache.so
zend_loader.enable=1
zend_loader.disable_licensing=0
zend_loader.obfuscation_level_support=3
zend_loader.license_path=
EOF

11、event扩展

# 安装libevent库
wget  https://github.com/libevent/libevent/releases/download/release-2.1.11-stable/libevent-2.1.11-stable.tar.gz tar -zxvf libevent-2.1.11-stable.tar.gz
cd libevent-2.1.11-stable
./configure --prefix=/usr/local/libevent-2.1.11
make && make install
wget  http://pecl.php.net/get/event-2.5.3.tgz tar -zxvf event-2.5.3.tgz
cd event-2.5.3 /www/server/php/72/bin/phpize
./configure --with-php-config=/usr/local/src/php/bin/php-config --with-event-libevent-dir=/usr/local/libevent-2.1.11
make && make install
echo "extension=event.so" >> /opt/php/etc/php.ini

标签:opt,php,&&,tar,--,make,模块,PHP5.6,安装
From: https://blog.51cto.com/zzzhao/6164752

相关文章

  • Elasticsearch 学习-Linux单机和集群安装
    Elasticsearch学习-Linux单机和集群安装3.3linux集群安装3.3.1软件下载软件下载地址:https://www.elastic.co/cn/downloads/past-releases/elasticsearch-7-8-03.3.2软件安装1)解压软件将下载的软件解压缩#解压缩tar-zxvfelasticsearch-7.8.0-linux-x86_64.tar......
  • pytest自动化框架安装和使用
    1、官网:https://pypi.org/project/pytest/,下载  2、命令窗口执行:pipinstall pytest-7.2.2-py3-none-any.whl(同理删除:pipuninstallpytest-7.2.2-py3-none-any.whl) 3、进入 PyCharm/File->Preference/Settings->Tools->PythonIntegratedTools,点击Defaul......
  • 【Linux Centos】如何卸载自带的python和yum以及卸载后如何重新安装yum
    【LinuxCentos】如何卸载自带的python和yum以及卸载后如何重新安装yum注意如果不是必要情况,请不要卸载服务器自带的python,因为yum等命令都会用到python库,卸载以后可能造成不良后果。如果只是觉得系统python版本不合适,想安装新版本,建议安装anaconda或miniconda,在不同的环境中使......
  • 安装Vmware和Linux系统
    本教程使用的版本如下:特别重要虚拟机:VMware-workstation-full-16.1.2-17966106.exeLinux系统:CentOS-7-x86_64-DVD-2009 一、Vmware安装下载Vmware安装Vmware(下一步下一步就OK)输入对应激活码:~textVM16激活许可证ZF3R0-FHED2-M80TY-8QYGC-NPKYF~如果界面正常打......
  • Bandizip7.30安装教程
    1.开始安装2.选择安装路径3.安装完成4.开始破解5.破解成功......
  • 远程服务器(腾讯云轻量服务器)上安装SQL Server以及SQL Server Management Studio,以及EF
    SQLServer的安装下载地址:https://www.microsoft.com/zh-cn/sql-server/sql-server-downloads安装教程参考:https://blog.csdn.net/qq_51929833/article/details/122625809其中,这一步非常关键,因为在后续SSMS中,选用"SQLServer身份验证"时候的密码,默认用户名都是"sa"SQLServe......
  • centos安装hexo
    之前参照网上教程,但是使用npm不存在,尝试不同的方法,终于测试一个成功解决方案:wgethttps://nodejs.org/dist/v14.17.4/node-v14.17.4-linux-x64.tar.xztar-xvfnode-v14.17.4-linux-x64.tar.xzmvnode-v14.17.4-linux-x64/usr/local/nodejsecho"exportPATH=$PATH:/usr/loc......
  • 安装grafana并且安装插件
      安装:到清华源去下载Indexof/grafana/yum/rpm/Packages/|清华大学开源软件镜像站|TsinghuaOpenSourceMirror  安装:yumlocalinstall grafana-6.3.0-1.x86_64.rpm-yComplete![root@zabbix-server~]#grafana-grafana-cligrafana-server[root@zabbix......
  • 转maven安装和设置变量
    一、下载 Maven访问Maven的下载页面:http://maven.apache.org/download.html。  我是windows10系统,这里选择zip这个压缩包。二、解压 maven压缩包解压下载的zip压缩包,最好是把这些jdk、maven、tomcat归类在一个文件夹,我这里是下载的3.8.1的maven。  三、配置m......
  • ESPRESSIF-pip安装模板超时Read timed out
    一、问题:pip._vendor.urllib3.exceptions.ReadTimeoutError:HTTPSConnectionPool(host='files.pythonhosted.org',port=443):Readtimedout.Commandfailed:"C:\Users\zhang\.espressif\python_env\idf4.4_py3.8_env\Scripts\python.exe"-mp......