Php5.3 Installation

Source: Internet
Author: User
Sudo apt-get install gcc
Sudo apt-get install g ++
Sudo apt-get install autoconf
Sudo apt-get install libxml2
Sudo apt-get install libxml2-dev
Sudo apt-get install libevent-1.4-2
Sudo apt-get install libevent-dev
Sudo apt-get install bzip2
Sudo apt-get install libbz2-dev
Sudo apt-get install libcurl3-gnutls
Sudo apt-get install libcurl4-gnutls-dev
Sudo apt-get install libpng12-0
Sudo apt-get install libpng12-dev
Sudo apt-get install lib1_62
Sudo apt-get install libjpeg62-dev
Sudo apt-get install libfreetype6
Sudo apt-get install libfreetype6-dev
Sudo apt-get install libmcrypt4
Sudo apt-get install libmcrypt-devsudo apt-get install zlib1g-dev

Sudo apt-get install libtidy-dev

 

Note:

For RH, You need:

Yum-y install curl-devel

Yum install libjpeg-develyum install libpng-devel

Yum install freetype-devel

Yum install-y libmcrypt-devel.x86_64

 

Yum install-y libxml2-devel.x86_64yum install-y bzip2-devel.x86_64

 

Yum install libtool-ltdl-devel (it will appear at make:/usr/bin/ld: cannot find-lltdl) yum install autoconf yum install-y libtidy-devel.x86_64

 

 

Compilation and Installation

. /Configure -- prefix =/usr/local/php-5.3.3 -- with-gettext -- with-mysql = mysqlnd -- with-gd -- with-jpeg-dir -- with-png-dir --- curl -- with-freetype-dir -- enable-gd-native-ttf -- enable-mbstring -- enable-sockets -- with-mcrypt -- with-pdo-mysql = mysqlnd -- enable-fpm -- with-zlib -- enable-zip -- with-bz2 -- enable-bcmath -- with-tidy
Make
Make install

After compilation and installation are complete, you also need to configure php-fpm, because php5.3 does not need to be patched with php-fpm, so the previous control of php-fpm (START and restart) needs to be changed. The procedure is as follows:

Copy from source code package:

Sudo path/to/php-source/folder/sapi/fpm/init. d. php-fpm/etc/init. d/php-fpm

Sudo chmod a + x/etx/init. d/php-fpm

Then you can control it through/etc/init. d/php-fpm (start | stop | force-quit | restart | reload ).

General extension Installation

Memcached:

 

Wget http://pecl.php.net/get/memcache-2.2.5.tgz
Tar-xvf memcache-2.2.5.tgz
Cd memcache-2.2.5
/Usr/local/php-5.3.3/bin/phpize
./Configure -- with-php-config =/usr/local/php-5.3.3/bin/php-config
Make
Make install

 

 

Solr

Wget http://pecl.php.net/get/solr-0.9.11.tgz
Tar-xvf solr-0.9.11.tgz
Cd solr-0.9.11
/Usr/local/php-5.3.3/bin/phpize
./Configure -- with-php-config =/usr/local/php-5.3.3/bin/php-config
Make
Make install

 

Xcache

1 wget http://xcache.lighttpd.net/pub/Releases/1.3.0/xcache-1.3.0.tar.bz2
2 tar-xjvf xcache-1.3.0.tar.bz2
3 cd xcache-1.3.0
4/usr/local/php-5.3.3/bin/phpize
5./configure -- with-php-config =/usr/local/php-5.3.3/bin/php-config
6 make
7 make install

Php_ini

Expose_php = off
Error_reporting = E_ALL
Display_errors = On
Short_open_tag = On
 
Extension = memcache. so
Extension = xcache. so
Extension = solr. so bbs required
 
; Log_errors = on
Error_log = this can be used in syslog linux to output errorlog to syslog.
Date. timezone = Asia/Shanghai

 

 

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.