小贝_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文件
[root@hadoop phpsrc]# cpphp.ini-production /usr/local/php/etc/php.ini
b、启动php-fpm
[root@hadoop etc]# cpphp-fpm.conf.default php-fpm.conf
[root@hadoop 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
解决方案
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
解决方案
yum install libcurl libcurl-devel
错误五
If configure fails try--with-vpx-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)
版权声明:本文为博主原创文章,未经博主允许不得转载。

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Laravel simplifies handling temporary session data using its intuitive flash methods. This is perfect for displaying brief messages, alerts, or notifications within your application. Data persists only for the subsequent request by default: $request-

The PHP Client URL (cURL) extension is a powerful tool for developers, enabling seamless interaction with remote servers and REST APIs. By leveraging libcurl, a well-respected multi-protocol file transfer library, PHP cURL facilitates efficient execution of various network protocols, including HTTP, HTTPS, and FTP. This extension offers granular control over HTTP requests, supports multiple concurrent operations, and provides built-in security features.

Laravel provides concise HTTP response simulation syntax, simplifying HTTP interaction testing. This approach significantly reduces code redundancy while making your test simulation more intuitive. The basic implementation provides a variety of response type shortcuts: use Illuminate\Support\Facades\Http; Http::fake([ 'google.com' => 'Hello World', 'github.com' => ['foo' => 'bar'], 'forge.laravel.com' =>

Do you want to provide real-time, instant solutions to your customers' most pressing problems? Live chat lets you have real-time conversations with customers and resolve their problems instantly. It allows you to provide faster service to your custom

Article discusses late static binding (LSB) in PHP, introduced in PHP 5.3, allowing runtime resolution of static method calls for more flexible inheritance.Main issue: LSB vs. traditional polymorphism; LSB's practical applications and potential perfo

PHP logging is essential for monitoring and debugging web applications, as well as capturing critical events, errors, and runtime behavior. It provides valuable insights into system performance, helps identify issues, and supports faster troubleshoot

Laravel simplifies HTTP verb handling in incoming requests, streamlining diverse operation management within your applications. The method() and isMethod() methods efficiently identify and validate request types. This feature is crucial for building

The Storage::download method of the Laravel framework provides a concise API for safely handling file downloads while managing abstractions of file storage. Here is an example of using Storage::download() in the example controller:
