Ubuntu11.10 install PHP, PHP-FPM, eAccelerator ##### preliminary work ###### sudoapt-getupdate # First Update # sudoapt-getinstall & nbsp; makebisonflexgccpatchautoconfgitzipsudoapt-getinsta Ubuntu 11.10 install PHP, PHP-FPM, eAccelerator
###### Preliminary work ######
Sudo apt-get update # update first #
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
###### Install Ming ######
# If the previous step is successful, 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
###### Install the 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 parameters:
-D: start a daemon process,
-M: the amount of memory allocated to Memcache. the unit is MB. the default value is 64 MB,
-U: The user who runs Memcache
-L: IP address of the listener server
-P: Set the Memcache listening port. the default value is 11211. note:-p (p is in lower case)
-C: set the maximum number of concurrent connections. the default value is 1024.
-P: Set the pid file for saving Memcache. note:-P (P is capital)
-H Show Help
###### Install 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 -- -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] lele_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
You may want to add:/usr/local/lib/php to your php. ini include_path
###### Modify the 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. ini
Sudo ln-s/usr/local/etc/php-fpm.conf/etc/php/php-fpm.conf
####### Install the php extension ######
Sudo pecl install memcache
Sudo pecl install pdo_mysql
###### Install 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
###### Install 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
##### Install 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
##### Create www users and groups ######
Sudo groupadd www
Sudo useradd-g www
Chmod + w/var/www
Chown-R www: www/var/www