Chinaunix首页 | 论坛 | 博客
  • 博客访问: 338054
  • 博文数量: 68
  • 博客积分: 405
  • 博客等级: 一等列兵
  • 技术积分: 1288
  • 用 户 组: 普通用户
  • 注册时间: 2013-01-09 15:39
个人简介

本人从事 Linux Nginx Mysql PHP 开发多年,联系v:luhuang2003 ,希望接触到更新的web开发软件,开此博客希望能把自己的经验和接触的东西与大家进行共享。

文章分类

全部博文(68)

文章存档

2024年(1)

2013年(67)

我的朋友

分类: 系统运维

2013-01-09 16:31:32

1、服务器系统: CentOS 系统, 我的系统是最小化安装有的软件包没有需要在安装


2、安装需要软件包:yum install compat-libstdc++ cpp glibc-kernheaders glibc-headers glibc-devel gcc libstdc++-devel gcc-c++ ncurses-devel* e2fsprogs-devel zlib-devel krb5-devel openssl-devel flex bison libidn pkgconfig libidn-devel curl curl-devel libjpeg-devel libjpeg-6b libpng-devel freetype-devel gd gd-devel libxml2 libxml2-devel libpng-devel libmcrypt libmcrypt-devel autoconf -y

3、下载 PHP 源包地址:

4、解压下载文件:tar zxvf php-5.4.10.tar.bz2


5、如果没有 yum install libmcrypt libmcrypt-devel -y 没有安装上如果安装上就不需要操作以下步骤

wget 

tar -zxvf libmcrypt-2.5.7.tar.gz
cd libmcrypt-2.5.7
mkdir -p /usr/local/libmcrytp
./configure
make
make install


6、进入目录: cd php-5.4.10配置文件参数, 此操作把MYSQL 安装到了 /usr/local/php 目录下:

./configure --prefix=/usr/local/php --with-mysql=/usr/local/mysql --with-apxs2=/usr/local/apache/bin/apxs --with-openssl --with-mcrypt --with-openssl-dir=/usr/include/openssl/ --with-kerberos=/usr/include/kerberosIV --with-libxml-dir=/usr/include/libxml2/ --with-freetype-dir=/usr/include/freetype2/freetype/ --with-zlib-dir=/usr/include/ --with-jpeg-dir=/usr/include/ --with-png-dir=/usr/include/libpng/ --enable-shmop --with-curl=/usr/include/curl --enable-gd-native-ttf --enable-gd-jis-conv --enable-bcmath --enable-calendar --with-gettext --enable-exif --with-gettext --with-iconv--enable-sockets --enable-calendar --enable-mbstring --enable-zend-multibyte --enable-magic-quotes --enable-shmop --enable-zend-multibyte -enable-pic --enable-ftp --enable-magic-quotes --enable-ucd-snmp-hack -with-xmlreader --enable-libgcc --enable-sysvmsg --enable-sysvsem --enable-sysvshm --with-jpeg-dir=/usr/lib --with-config-file-path=/usr/local/php/etc  --enable-fpm --with-pdo-mysql=shared


如果提示错误:
configure: error: libjpeg.(a|so) not found.
configure: error: libpng.(a|so) not found.
执行下面语句
cp -frp /usr/lib64/libjpeg.* /usr/lib/
cp -frp /usr/lib64/libpng* /usr/lib/

7、如果没有错误的话执行:
make
make install

8、在安装目录下,拷贝 PHP 配置文件:

cp php.ini-production /usr/local/php/etc/php.ini

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


 配置完毕。。。
阅读(1402) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~