Ubuntu 11.10 Assembly PHP, PHP-FPM, Eaccelerator

Source: Internet
Author: User
Tags ming pear php cli
Ubuntu 11.10 Installation PHP, PHP-FPM, Eaccelerator
###### prophase Work ######
sudo apt-get update #先更新下 #
sudo apt-get install make Bison flex gcc patch autoconf git zip
sudo apt-get install Libpng-dev libjpeg-dev libxml2-dev libevent-dev libcurl4-openssl-dev Libmcrypt-dev Libmysqlclient-dev Libming-dev Libfreetype6-dev Libtool

##### #安装Ming ######
#上步成功的话, this step can be omitted #
wget http://jaist.dl.sourceforge.net/project/ming/Releases/ming-0.4.4.tar.gz
Tar zxvf ming-0.4.4.tar.gz
CD ming-0.4.4
sudo./configure
sudo make
sudo make install

###### installing Memcached server and Client ######
sudo apt-get install memcached Libmemcached-dev

Start memcached
sudo memcached-d-M 64-p 11211-l 127.0.0.1-u nobody-c 1024

Memcached Common Startup parameter description:
-D: Start a daemon,
-M: The amount of memory allocated to Memcache, in megabytes, by default is 64MB,
-u: User running Memcache
-L: Listening server IP address
-P: Set memcache listening port, default is 11211 Note:-P (p is lowercase)
-C: Set the maximum number of concurrent connections, default is 1024
-P: Set the PID file to save Memcache:-P (P is uppercase)
-H Display Help

###### Installing PHP ######
wget http://jp.php.net/distributions/php-5.2.17.tar.gz
wget http://php-fpm.org/downloads/php-5.2.17-fpm-0.5.14.diff.gz

Tar zvxf php-5.2.17.tar.gz

GZIP-CD php-5.2.17-fpm-0.5.14.diff.gz | sudo patch-d php-5.2.17-p1
CD php-5.2.17

sudo./configure--enable-fastcgi--enable-fpm--with-mcrypt--with-zlib--enable-mbstring--disable-pdo--with-mysql- -with-mysqli--disable-debug--disable-rpath--enable-inline-optimization--enable-zip--with-zlib-- Enable-force-cgi-redirect-enable-discard-path

##--with-ming--with-curl--enable-sockets--enable-sysvsem--enable-sysvshm--enable-pcntl--enable-mbregex-- With-mhash--enable-xslt--with-pcre-regex--enable-pic##

sudo make
sudo make install
Installing PHP SAPI module:cgi
Installing PHP CGI binary:/usr/local/bin/
Installing FPM config:/usr/local/etc/php-fpm.conf
Installing INIT.D script:/USR/LOCAL/SBIN/PHP-FPM
Installing PHP CLI binary:/usr/local/bin/
Installing PHP CLI man page:/usr/local/man/man1/
Installing Build Environment:/usr/local/lib/php/build/
Installing header files:/usr/local/include/php/
Installing helper Programs:/usr/local/bin/
Program:phpize
Program:php-config
Installing man pages:/usr/local/man/man1/
Page:phpize.1
Page:php-config.1
Installing PEAR Environment:/usr/local/lib/php/
[PEAR] archive_tar-installed:1.3.7
[PEAR] console_getopt-installed:1.2.3
[PEAR] structures_graph-installed:1.0.3
[PEAR] xml_util-installed:1.2.1
[PEAR] pear-installed:1.9.1
Wrote PEAR system config file at:/usr/local/etc/pear.conf
Want to add:/usr/local/lib/php to your php.ini include_path

###### Modifying a configuration file ######
sudo cp/usr/local/src/php-5.2.17/php.ini-recommended/usr/local/lib/php.ini
sudo mkdir/etc/php/
sudo ln-s/usr/local/lib/php.ini/etc/php/php.ini
sudo ln-s/usr/local/etc/php-fpm.conf/etc/php/php-fpm.conf

###### #安装php扩展 ######
sudo pecl install Memcache
sudo pecl install Pdo_mysql

###### Installing Libgif-dev ######
wget Http://ftp.cn.debian.org/debian/pool/main/g/giflib/libgif-dev_4.1.6-9_i386.deb
sudo dpkg-i libgif-dev_4.1.6-9_i386.deb

###### Installing Swfeditor ######
wget http://iij.dl.sourceforge.jp/swfed/54007/swfed-0.51.tar.gz
Tar zvxf swfed-0.51.tar.gz
CD swfed-0.51
sudo phpize
sudo./configure
sudo make

# # # # #安装eAccelerator ######
wget Http://jaist.dl.sourceforge.net/project/eaccelerator/eaccelerator/eAccelerator%200.9.6.1/eaccelerator-0.9.6.1.zip
Unzip Eaccelerator-0.9.6.1.zip
CD eaccelerator-0.9.6.1
sudo phpize
sudo./configure--enable-eaccelerator=shared
sudo make
sudo make install

# # # # #创建www用户和组 ######
sudo groupadd www
sudo useradd-g www www
chmod +w/var/www
Chown-r www:www/var/www
  • Related Article

    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.