Install php5.5.7php-fpm and xcache in the source code, as well as the xcache management background.

Source: Internet
Author: User
One, before installation preparation cdusrlocalsrcwgethttp: cn2phpnetdistributionsphp-547targzyum-yinstallgccautomakeautoconflibtoolmakeyum-yinstallgccgcc-c & amp; 43 ;&

I. preparations before installation

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++ glibc yum -y install libmcrypt-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-devel bzip2 bzip2 -devel \ ncurses ncurses-devel curl curl-devel e2fsprogs e2fsprogs-devel \ Krb5 krb5-devel libidn-devel openssl-devel

1. Compile and install the supported libraries required for 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 ../

II. Start Installation

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 --- 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 -- -ldap -- with-ldap-sasl -- with-xmlrpc -- enable-zip -- enable-soap
Make ZEND_EXTRA_LIBS = '-liconv' (remember this, otherwise the variation will not pass)
Make install

If you cannot find php. ini, copy the current directory php. ini-product to/usr/local/php/lib, and configure php. ini.
Then configure your php-fpm.conf. under/usr/local/etc,
Mv php-fpm.conf.default php-fpm.conf

3. install 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 ../

If the error message ". ln-s/usr/local/mysql/include/usr/local/include" is returned

This is because the header file of mysql cannot be found.

4. install 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-optimizer

Make

Make install

5. configure xcache

Cat xcache. ini>/etc/php. ini
Echo-n "12345" | replace md5sum with your desired username and the password generated above
Xcache. admin. user = "mOo" xcache. admin. pass = "5f4dcc3b5aa765d61d8327deb882cf99" installation background management
Cp-~ /Src/xcache/htdocs/var/www/example.com/htdocs/xcache-admin
The website directory of/var/www/example.com/htdocs.pdf




Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.