php5 fpm 源,源码安装php5.5.7 php-fpm和xcache,以及xcache管理后台_PHP教程

该博客详细介绍了在Linux系统中安装PHP5.5.7、PDO_MYSQL以及XCACHE的整个过程,包括依赖库的安装、编译配置和安装后的设置。涉及到的命令行操作和配置参数对于系统管理员或开发者来说是必要的知识。
摘要由CSDN通过智能技术生成

一,安装前准备

cd /usr/local/src

wget http://cn2.php.net/distributions/php-5.4.7.tar.gz

yum -yinstallgcc automake autoconf libtoolmake

yum -yinstallgcc gcc-c++ glibc

yum -yinstalllibmcrypt-devel mhash-devel libxslt-devel \

libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel libxml2 libxml2-devel \

zlib zlib-devel glibc glibc-devel glib2 glib2-develbzip2bzip2-devel \

ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel \

krb5 krb5-devel libidn libidn-devel openssl openssl-devel

1、编译安装PHP 5.2.13所需的支持库:

tar zxvf libiconv-1.14.tar.gz

cd libiconv-1.13/

./configure --prefix=/usr/local

make

make install

cd ../

tar zxvf libmcrypt-2.5.8.tar.gz

cd libmcrypt-2.5.8/

./configure

make

make install

/sbin/ldconfig

cd libltdl/

./configure --enable-ltdl-install

make

make install

cd ../../

tar zxvf mhash-0.9.9.9.tar.gz

cd mhash-0.9.9.9/

./configure

make

make install

cd ../

tar zxvf mcrypt-2.6.8.tar.gz

cd mcrypt-2.6.8/

/sbin/ldconfig

./configure

make

make install

cd ../

二。开始安装

tar zvxf php-5.5.7.tar.gz

cd php-5.5.7

./configure --prefix=/usr/local/php --with-config-file-path=/usr/local/php/etc --with-mysql=/usr/local/mysql --with-mysqli=/usr/local/mysql/bin/mysql_config --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr

--enable-xml --disable-rpath --enable-discard-path --enable-safe-mode --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --with-curlwrappers --enable-mbregex --enable-fastcgi --enable-fpm --enable-force-cgi-redirect --enable-mbstring

--with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-ldap --with-ldap-sasl --with-xmlrpc --enable-zip --enable-soap

make ZEND_EXTRA_LIBS='-liconv' (记得这个,否则变异不过去)

make install

如果找不到php.ini ,把当前目录php.ini-product 复制到 /usr/local/php/lib 下,然后配置php.ini

然后配置你得php-fpm.conf. 在/usr/local/etc/下,

mv php-fpm.conf.default php-fpm.conf

三 安装pdo mysql

tar zxvf PDO_MYSQL-1.0.2.tgz

cd PDO_MYSQL-1.0.2/

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/local/mysql

make

make install

cd ../

如果报错.ln -s /usr/local/mysql/include /usr/local/include

这是因为找不到到mysql的头文件

四,安装xcache

wget http://xcache.lighttpd.net/wiki/Release-3.1.0

tar zxvf xcache-3.1.0

/usr/local/php/bin/phpize

./configure --with-php-config=/usr/local/php/bin/php-config --enable-xcache --enable-xcache-optimizer

make

make install

五 配置xcache

cat xcache.ini >> /etc/php.ini

echo -n"12345"|md5sum

替换成你想要得用户名,和上面生成密码

xcache.admin.user = "mOo"

xcache.admin.pass = "5f4dcc3b5aa765d61d8327deb882cf99"

安装后台管理

cp -a ~/src/xcache/htdocs /var/www/example.com/htdocs/xcache-admin

/var/www/example.com/htdocs为你的网站目录

http://www.bkjia.com/PHPjc/635064.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/635064.htmlTechArticle一,安装前准备 cd /usr/local/src wget http: //cn2 .php.net /distributions/php-5 .4.7. tar .gz yum -y install gcc automake autoconf libtool make yum -y install gcc gcc-c glib...

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值