小贝_php源码安装

PHP安装

 一、本文档相关文件下载

二、php安装

一、本文档相关文件下载

1、php下载地址: http://php.net/downloads.php

(备注:
本文档下载的是php版本为php-5.6.11.tar.gz)

2、本测试机系统为 CentOS release 6.3 (Final)

 

二、php安装

1、安装php

a、解压压缩文件 tar –zxf php-5.6.11.tar.gz

b、进入解压目录后,执行

./configure --prefix=/usr/local/php--with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql--enable-fpm --enable-xml --enable-soap --enable-mbstring --enable-sockets--with-curl  --enable-zip 
--enable-ftp --with-gd --with-bz2--with-openssl --with-zlib --with-mhash --enable-exif --enable-sockets--enable-mbstring --enable-xml --enable-fpm --enable-soap --with-gd --with-curl--with-mcrypt=/usr/local/libmcrypt --with-imap --with-imap-ssl --with-jpeg-dir--with-png-dir
--with-zlib-dir --with-freetype-dir --enable-gd-native-ttf--enable-gd-jis-conv --with-kerberos

c、编译安装 make && make install

2、启动php

a、复制php.ini文件

[[email protected] phpsrc]# cpphp.ini-production /usr/local/php/etc/php.ini

b、启动php-fpm

[[email protected] etc]# cpphp-fpm.conf.default php-fpm.conf

[[email protected] php]# ./sbin/php-fpm

c、检查php-fpm端口

3、测试php

4、常见异常及处理

错误一

checking libxml2 installdir... no

checking for xml2-configpath...

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

解决方案

yum install libxml2

yum install libxml2-devel

错误二

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

解决方案

yum install openssl-devel

错误三

checking for BZip2 in default path...not found

configure: error: Please reinstall theBZip2 distribution

解决方案

yum install bzip2-devel

错误四

checking for cURL in default path...not found

configure: error: Please reinstall thelibcurl distribution -

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

解决方案

yum install libcurl libcurl-devel

错误五

If configure fails try--with-vpx-dir=<DIR>

configure: error: jpeglib.h not found.

解决方案

yum install libjpeg libpng freetypelibjpeg-devel libpng-devel freetype-devel

错误六

configure: error: utf8_mime2text() hasnew signature, but U8T_CANONICAL is missing. This should not happen. Checkconfig.log for additional information

解决方案

yum install libc-client-devel

错误七

configure: error: This c-client libraryis built with Kerberos support.

Add --with-kerberos to your configureline. Check config.log for details.

解决方案

把--with-kerberos加入./configure中

错误八

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

解决方案

yum install libmcrypt 或者

下载libmcrypt包

(编译安装  ./configure --prefix=/usr/local/libmcrypt   make && make install)

版权声明:本文为博主原创文章,未经博主允许不得转载。

时间: 2024-08-11 01:02:33

小贝_php源码安装的相关文章

saltstack源码安装nginx

[首先配置好saltstack基础环境,确保master能远程minion,这里就不列举了]  因为涉及到的目录较多,因此先规划好目录结构 [[email protected] dev]# tree /srv/dev/ /srv/dev/nginx_install │       ├  initpkg.sls │          ├  initall .sls │       ├  nginx_init.sls │          ├  files │           └── nginx

源码安装mysql

创建mysql组:groupadd mysql 创建mysql用户并赋予这个mysq组中,不创建家目录,不允许用户登录.(因为刚刚创建的mysql是虚拟用户,所以不允许登录)useradd mysql -g mysql -M -s /bin/nologin 源码安装mysql 解压后进行编译安装:./configure \--prefix=/application/mysql5.1.72 \--with-unix-socket-path=/application/mysql5.1.72/tmp/

CentOS 7下源码安装MySQL 5.7

网上说linux安装mysql服务分两种安装方法: ①源码安装,优点是安装包比较小,只有几十M左右,缺点是安装依赖的库多,安装编译时间长,安装步骤复杂容易出错: ②使用官方编译好的二进制文件安装,优点是安装速度快,安装步骤简单,缺点是安装包很大,300M左右(5.7版本的是600M左右), 对于第二种方法,我搞了一天,无果,到某个环节实在是无法走通,老大那边也不让搞了,隔了几天老大又吩咐我在生产服务器上安装mysql,这次我就按照第一种方法源码安装方式 下载源码安装包 http://dev.my

在 Linux 系统上源码安装 GTK+ 2.0

在 Linux 系统上源码安装 GTK+ 2.0==================================================Keywords: GTK+, Install, Linux, SourceAuthor:       whyglinux (whyglinux AT hotmail DOT com)Date:          2007-01-07==================================================目录0. 前言1.

ubuntu16.04下源码安装onos1.0.2

由于工作需要,下载安装onos1.0.2的版本,大家看需求可以下载安装更高级的版本 参考链接:http://www.sdnlab.com/14650.html 1.系统环境 Ubuntu16.04 LTS 64bit 下载地址:https://www.ubuntu.com/download/desktop(桌面版) 2.安装依赖(这里的版本选择根据ONOS版本确定的,在上述参考链接中作者有提到----"关于Maven和Karaf版本的说明:此处建议使用推荐的karaf-3.0.3和Maven-3

Centos7源码安装mysql

转子 http://www.linuxidc.com/Linux/2015-06/119354.htm 目录 准备工作 运行环境 确认你的安装版本 下载MySQL 安装MySQL 准备安装环境 编译和安装 配置MySQL 单实例配置 单实例配置方法 添加防火墙 启动MySQL 重启MySQL 多实例配置 什么是多实例 多实例配置方法 创建启动文件 初始化数据库 配置防火墙 启动MySQL 登陆MySQL 重启MySQL 准备工作 运行环境 本文的运行环境如下 系统版本 CentOS7最小化安装:

CentOS 6.5下源码安装MySQL 5.6

mysql分为开发版本和稳定版本(GA),开发版本拥有最新的特性,但是并不稳定,也没有完全经过测试,可能存在严重的bug,而稳定版本是经过了长时间的测试,消除了具有已知的bug,其稳定性和安全性都得到一定的保障. 对于一个mysql的版本号如:mysql-5.6.1-m1,这个版本号意味着什么呢?1.对于5.6.1的解释:第一个数字5代表了文件格式,第二个数字6代表了发行级别,第三个数字1代表了版本号.更新幅度较小时,最后的数字会增加,出现了重大特性更新时,第二个数字会增加,文件格式改变时,第一

开源一个常用的小软件的源码——系统数据库服务管理软件

郝喜路  2014年7月27日22:28:34 GitHub地址:https://github.com/haoxilu/ServiceManager    希望编程爱好者 更改添加...   开发环境:Visual Studio 2012   .Net Framework 4.0 大家在软件开发过程中,是离不开 数据库的,不管你用什么数据库,都会在系统服务上注册一个,当你安装了太多的数据库,是否有感到极大的拖掉了开机时间,影响了计算机的性能.(仅限windows系统).这时有的朋友可能会想到手动

CenOS6.5下源码安装vim-7.4

1.[下载] vim-7.4下载地址: ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2 2.[解压] tar jxvf vim-7.4.tar.bz2 之后,源文件就在这个压缩包下面的src目录里面 最好只在这个目录下进行configure,make和make install,不然会报错 切到src中: 3.[configure配置] sudo ./configure \ --with-features=huge #支持最大特性 \ --enable