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

php中文网
发布: 2016-07-13 10:42:22
原创
1298人浏览过

一,安装前准备

cd /usr/local/src<br>

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

yum -y install gcc automake autoconf libtoolmake yum -y install gcc gcc-c++ glibc yum -y installlibmcrypt-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<br><br> 1、编译安装PHP 5.2.13所需的支持库:<br> tar zxvf libiconv-1.14.tar.gz<br> cd libiconv-1.13/<br> ./configure --prefix=/usr/local<br> make<br> make install<br> cd ../<br><br> tar zxvf libmcrypt-2.5.8.tar.gz<br> cd libmcrypt-2.5.8/<br> ./configure<br> make<br> make install<br> /sbin/ldconfig<br> cd libltdl/<br> ./configure --enable-ltdl-install<br> make<br> make install<br> cd ../../<br><br> tar zxvf mhash-0.9.9.9.tar.gz<br> cd mhash-0.9.9.9/<br> ./configure<br> make<br> make install<br> cd ../<br><br> tar zxvf mcrypt-2.6.8.tar.gz<br> cd mcrypt-2.6.8/<br> /sbin/ldconfig<br> ./configure<br> make<br> make install<br> cd ../<br>

二。开始安装

tar zvxf php-5.5.7.tar.gz cd php-5.5.7<br> ./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<br> make ZEND_EXTRA_LIBS='-liconv' (记得这个,否则变异不过去)<br> make install<br><br> 如果找不到php.ini ,把当前目录php.ini-product 复制到 /usr/local/php/lib 下,然后配置php.ini<br> 然后配置你得php-fpm.conf. 在/usr/local/etc/下,<br> mv php-fpm.conf.default php-fpm.conf<br><br> 三 安装pdo mysql<br><br> tar zxvf PDO_MYSQL-1.0.2.tgz<br> cd PDO_MYSQL-1.0.2/<br> /usr/local/php/bin/phpize<br> ./configure --with-php-config=/usr/local/php/bin/php-config --with-pdo-mysql=/usr/local/mysql<br> make<br> make install<br> cd ../<br><br> 如果报错.ln -s /usr/local/mysql/include /usr/local/include<br><br> 这是因为找不到到mysql的头文件<br><br> 四,安装xcache<br><br> wget http://xcache.lighttpd.net/wiki/Release-3.1.0<br> tar zxvf xcache-3.1.0<br> /usr/local/php/bin/phpize<br> ./configure --with-php-config=/usr/local/php/bin/php-config --enable-xcache --enable-xcache-optimizer

make <br>

make install

乾坤圈新媒体矩阵管家
乾坤圈新媒体矩阵管家

新媒体账号、门店矩阵智能管理系统

乾坤圈新媒体矩阵管家 17
查看详情 乾坤圈新媒体矩阵管家

立即学习PHP免费学习笔记(深入)”;

五 配置xcache

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

<pre class="code">echo -n"12345"|md5sum

替换成你想要得用户名,和上面生成密码
<pre class="code">xcache.admin.user = "mOo"
xcache.admin.pass = "5f4dcc3b5aa765d61d8327deb882cf99"

安装后台管理
<pre class="code">cp -a ~/src/xcache/htdocs /var/www/example.com/htdocs/xcache-admin

<pre class="code"><pre class="code"><pre class="code"><pre class="code">/var/www/example.com/htdocs为你的网站目录

登录后复制
<br><br><br><br>

www.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...
PHP速学教程(入门到精通)
PHP速学教程(入门到精通)

PHP怎么学习?PHP怎么入门?PHP在哪学?PHP怎么学才快?不用担心,这里为大家提供了PHP速学教程(入门到精通),有需要的小伙伴保存下载就能学习啦!

下载
来源:php中文网
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
最新问题
开源免费商场系统广告
热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责申明 意见反馈 讲师合作 广告合作 最新更新 English
php中文网:公益在线php培训,帮助PHP学习者快速成长!
关注服务号 技术交流群
PHP中文网订阅号
每天精选资源文章推送
PHP中文网APP
随时随地碎片化学习

Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号