-
Notifications
You must be signed in to change notification settings - Fork 4
Linux Server
Sergey edited this page May 13, 2013
·
2 revisions
For new linux server you will need php5 with nicolasff/phpredis module and redis.
Here is example for new Debian server.
- Delete Apache
/etc/init.d/apache2 stop && apt-get purge apache2*- Install php5-fpm 5.3.2
apt-get update
apt-get install python-software-properties
add-apt-repository ppa:brianmercer/php
apt-get update
apt-get install php5-cli php5-common php5-suhosin php5-gd php5-dev php5-fpm php5-cgi php-pear php-apc- Install PHP predis
download and extract phpredis from https://github.com/nicolasff/phpredis
phpize
./configure
make
sudo -s make install
add /etc/php5/conf.d/redis.ini with "extension=redis.so"
service php5-fpm restart- Install nginx
nginx=stable # use nginx=development for latest development version
apt-add-repository ppa:nginx/$nginx
apt-get update
apt-get install nginx- Configure nginx + php-fpm
Create /home/www and index.php
At /etc/nginx/sites-available/default change path to www, and add index.php:
root /srv/www;
index index.html index.htm index.php;
Enable php:
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
}
service php5-fpm start
service nginx start- Install redis
/etc/apt/sources.list.d/dotdeb.org.list
deb http://packages.dotdeb.org stable all
deb-src http://packages.dotdeb.org stable all
apt-get update
apt-get install redis-server