Linux centos 安装php5.4和pthreads

原文章:https://blog.csdn.net/weixin_42135441/article/details/82743893

1.下载php5.4和pthreads并解压。

# wget http://www.php.net/distributions/php-5.4.36.tar.gz

# wget http://pecl.php.net/get/pthreads-1.0.0.tgz

# tar zxvf php-5.4.36.tar.gz

# tar zxvf  pthreads-1.0.0.tgz

2. 将 解压的 pthreads-1.0.0放入php-5.4.36下的ext目录下

# mv pthreads-1.0.0 php-5.4.36/ext

3.重新配置资源

# cd php-5.4.36

# ./buildconf --force

查看一下是否已经有pthreads

# ./configure --help | grep pthreads

如果没有,执行下面命令重新配置

# rm -rf aclocal.m4

# rm -rf autom4te.cache/

# ./configure --help | grep pthreads

4.配置需要一起安装的拓展

# ./configure --enable-debug --enable-maintainer-zts --enable-pthreads --prefix=/usr --with-config-file-path=/etc --enable-fpm --with-mysql  --with-mysql-sock=/var/lib/mysql/mysql.sock --with-pdo-mysql --with-gd --with-libxml-dir=/usr/local/libxml2 --with-png-dir=/usr/local/libpng  --with-jpeg-dir=/usr/local/jpeg9 --with-vpx-dir=/usr/local/vpx --with-mcrypt=/usr/local/libmcrypt  --with-mysqli  --with-freetype-dir=/usr/local/freetype --with-iconv --with-zlib --enable-xml --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --enable-mbregex --enable-mbstring --enable-ftp --enable-gd-native-ttf --with-openssl --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --enable-session --with-curl --enable-ctype

5.安装

# make

# make install

6.配置php-fpm配置为服务

# cp /root/php-5.4.36/sapi/fpm/init.d.php-fpm /etc/init.d/php-fpm

# cp /usr/etc/php-fpm.conf.default /usr/etc/php-fpm.conf

# chmod 755 /etc/init.d/php-fpm

# chkconfig –add php-fpm

最后,php-fpm以服务的方式启动、停止和重启:
# service php-fpm start
# service php-fpm stop

# service php-fpm reload

至此php+pthreads安装成功

第4步遇见的错误

1.configure: error: no acceptable C compiler found in $PATH

解决方式

#yum install gcc-c++

2.configure: error: xml2-config not found. Please check your libxml2 installation.

解决方式

# yum install libxml2

# yum install libxml2-devel -y

3.configure: error: jpeglib.h not found.

解决方式

# yum -y install libjpeg-devel

4. configure: error: vpx_codec.h not found.

解决方式

# yum -y install libvpx-devel

5.configure: error: png.h not found.

解决方式

# yum -y install libpng-devel

6.configure: Cannot find OpenSSL‘s <evp.h>

解决方式

# yum install openssl openssl-devel

7.configure:Please reinstall the libcurl distribution -

easy.h should be in <curl-dir>/include/curl/

解决方式

# yum -y install curl-devel

8.configure:freetype.h not found.

解决方式

# yum install freetype-devel

9.configure: error: mcrypt.h not found. Please reinstall libmcrypt.

解决方式:

# yum install libmcrypt libmcrypt-devel

参考文章:

http://php.net/manual/en/pthreads.installation.php

https://blog.csdn.net/zyz511919766/article/details/14002497/

https://blog.csdn.net/dabao1989/article/details/22898857

https://www.cnblogs.com/beyang/p/6972412.html

https://blog.csdn.net/qq_36180117/article/details/80813093

原文地址:https://www.cnblogs.com/liyang6/p/11641927.html

时间: 2024-08-30 02:01:26

Linux centos 安装php5.4和pthreads的相关文章

阿里云服务器Linux CentOS安装配置(四)yum安装tomcat

阿里云服务器Linux CentOS安装配置(四)yum安装tomcat 1.yum -y install tomcat  执行命令后,会帮你把jdk也安装好 2.tomcat安装目录:/var/lib/tomcat/ 3.tomcat配置目录:/etc/tomcat/ 4.启动tomcat:service tomcat start 5.访问下:curl 127.0.0.1:8080(安装目录里是个空文件夹,所以访问时,没有任何内容返回,这是正常的) 远程访问地址:http://ip:8080(

阿里云服务器Linux CentOS安装配置(七)域名解析

阿里云服务器Linux CentOS安装配置(七)域名解析 1.购买域名 登录阿里云,左侧菜单点击[域名],然后[域名注册],完成域名购买.(一般首年45元) 2.添加域名解析 在域名列表里点击你的域名,进入域名控制台 如上图,点击[域名解析] 然后点击[添加解析],添加下面两项(有提示,很简单的) 3.ping测试 ping www.域名 ping 域名(没有www) 可能会两几分钟延迟,ping不通的话等两分钟再试试 4.下一章,使用nginx为云服务器上不同端口的服务配置不同的子域名

阿里云服务器Linux CentOS安装配置(五)jetty配置、部署

阿里云服务器Linux CentOS安装配置(五)jetty配置.部署 1.官网下载jetty:wget http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/9.2.17.v20160517/jetty-distribution-9.2.17.v20160517.zip 我用上面的命令下载速度太慢了,于是先下载到本地,再传到服务器的 2.解压:unzip jetty-distribution-9.2.17.v201

阿里云服务器Linux CentOS安装配置(一/九)购买阿里云服务器

阿里云服务器Linux CentOS安装配置(一/九)购买阿里云服务器 我在阿里云购买的服务器配置 CPU:1核 内存:2G 系统盘:40G 公共镜像:CentOS 6.5 64位 公网带宽:1Mbps 价格:108元/月 系统运行参考 1个svn 1个mysql 1个tomcat部署了一个Java Web项目跑14802端口 1个jetty部署了一个Java Web项目跑14808端口 1个resin部署了两个Java Web项目跑了8080.14805两个端口 1个nginx 上面的服务运行

阿里云服务器Linux CentOS安装配置(八)nginx安装、配置、域名绑定

阿里云服务器Linux CentOS安装配置(八)nginx安装.配置.域名绑定 1.安装nginx yum -y install nginx 2.启动nginx service nginx start 3.访问(nginx默认是80端口) curl 127.0.0.1 4.域名子绑定 编辑文件/etc/nginx/conf.d/default.conf,在底部加入下面代码,完成前几章所述4个端口的子域名绑定 server{ listen 80; server_name tomcat.bingz

linux centos安装配置prosody

linux centos安装配置prosody 作者: owoer | 发表于:2014 年 10 月 27 日 | 栏目:其他 | 评论关闭 安装:#yum install prosody 配置:配置文件路径/etc/prosody/prosody.cfg.lua 在prosody.cfg.lua添加主机#vi /etc/prosody/prosody.cfg.lua找到VirtualHost———– Virtual hosts ———–VirtualHost “localhost”Virtu

linux centos安装教程

linux centos安装教程1 CentOS-7-x86_64-DVD-1511.iso 这个是dvd版本 2 CentOS-7-x86_64-Minimal-1511.iso 这个迷你版 是没有图形界面的 安装centos 必须要借助 光盘或者u盘 安装 因为没有exe..不能从硬盘上安装 1 先看看bios支不支持U盘启动 如果不知道哪里看 可以百度下主板型号 然后查找资料 一般不同主板 bios界面不一样 ps:看的时候必须要插入U盘后看 有没有你的U盘型号 作为启动2 如何制作Cen

在CentOS安装PHP5.6

一.配置yum源 1.追加CentOS 6.5的epel及remi源. rpm -Uvh http://ftp.iij.ad.jp/pub/linux/fedora/epel/6/x86_64/epel-release-6-8.noarch.rpm rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm 2.CentOs7.0的源 yum install epel-release rpm -ivh http://r

CentOS安装PHP5.6

配置yum源: centos6.5: # rpm -Uvh  # rpm -Uvh centos7: 1安装EPEL源:EPEL源是centos下一个非常强大的扩展yum源(反正别人都这么说) 2安装REMI源:这个是用来安装和更新PHP的,由于有的东西(比如laravel框架)php的版本是有要求的,而centos默认安装的php版本是比较低的,因此我们通过这个yum源可以安装较新的php. # yum install epel-release # rpm -ivh http://rpms.f