Posts Tagged ‘Fpm’

php-fpm /nGINX on CentOS-5.6-RELEASE

Friday, June 17th, 2011

We’ve skeeet enterprise baby … Want to be on your way to a load balanced lightning fast cached-up wordpress server with very little resources? Check up on this!

We dig RedHat, package names are standard and not as confusing as Debian/Ubuntu. This new standard world is new to us. Ridin` with the King!

yum install openssl-devel curl-devel curl libjpeg-devel libjpeg libpng libmcrypt mysql++-devel freetype-devel freetype t1lib-devel t1lib t1utils libc-client-devel libc-client bzip2-devel bzip2-libs libevent-devel libevent gd-devel gd-progs gd libxml2-devel libxml2 expat-devel expat sqlite-devel sqlite libjpeg-devel libpng-devel libmcrypt-devel
mysql-devel gcc pcre-devel redhat-lsb-graphics libexif ImageMagick

Now follow rest of directions here: . You will need to build libmemcached from source, however. I will post further instructions later for all inquiring minds.

But for sho` , if you are running x_86_64 you will need to use the –with-libdir=lib64 when you configure php, other-wise you haz problems with libmysqlclient (script won’t know where to find mySQL)

Optimizing Webservers for PHP / WordPress: Wordcamp 2010

Saturday, October 2nd, 2010

aid to presentation:

if fresh debian install make sure you’ve before anything, as root;

apt-get install build-essential openssl-server sudo postfix

sudo apt-get install libssl-dev libcurl4-gnutls-dev libjpeg62-dev libpng12-dev libmcrypt-dev libmysql++-dev libfreetype6-dev libt1-dev libc-client-dev libbz2-dev mysql-client libevent-dev libxml2-dev mysql-server libmysqlclient15-dev libgd2-xpm-dev libeventdb-dev libexpat1-dev libsqlite3-dev

php 5.3.3 from source

wget http://tw2.php.net/distributions/php-5.3.3.tar.bz2
tar xjvf php-5.3.3.tar.bz2
./configure –enable-fpm –with-mcrypt –enable-mbstring –with-openssl –with-mysql –with-mysql-sock –with-gd –with-jpeg-dir=/usr/lib –enable-gd-native-ttf –with-pdo-mysql –with-libxml-dir=/usr/lib –with-mysqli=/usr/bin/mysql_config –with-curl –enable-zip –enable-sockets –with-zlib –enable-exif –enable-ftp –with-iconv –with-gettext –enable-gd-native-ttf –with-t1lib=/usr –with-freetype-dir=/usr –prefix=/usr/local/php –with-fpm-user=www-data –with-fpm-group=www-data –with-pear
make
sudo make install
make clean

libevent 1.4.13
wget http://www.monkey.org/~provos/libevent-1.4.13-stable.tar.gz
./configure && make
sudo make install
make clean

nginx 0.7.67

wget http://nginx.org/download/nginx-0.7.67.tar.gz
tar xzvf nginx-0.7.67.tar.gz
./configure –sbin-path=/usr/local/sbin –with-http_ssl_module –without-mail_pop3_module –without-mail_imap_module –without-mail_smtp_module –with-http_stub_status_module
make
sudo make install
make clean

sudo mkdir -p /usr/local/nginx/{sites-available,sites-enabled}

memcached
wget http://launchpad.net/libmemcached/1.0/0.44/+download/libmemcached-0.44.tar.gz
tar xzfv libmemcached-0.44.tar.gz
./configure && make
sudo make install
make clean
sudo apt-get install sqlite3 memcached
sudo pecl install memcache

configuration files

fastcgi_params
nginx.conf
php-fpm.conf
php.ini
sample_vhost_nginx.conf
wordpress_params.regular
wordpress_params_cache

init.d scripts
nginx
php-fpm

if any of this is unclear, please contact me so that we can make it easier for anyone who searches for it. let’s take down the notion that apache is the only webserver good enough for production.