Drupal + Nginx + Varnish + APC + Memcache + MariaDB

Site do PoliGNU e PoliGen na Digital Ocean (VPS) com Drupal, Nginx, Varnish, APC, Memcache e MariaDB. Tudo isso rodando num Debian Wheezy 7

Nginx atualizado no Debian Wheezy 7

http://oskarhane.com/install-nginx-stable-1-4-1-on-debian-squeeze/

#Start with downloading and installing PGP keys
wget -O key http://nginx.org/keys/nginx_signing.key && sudo apt-key add key && sudo rm -f key

#Add these lines to /etc/apt/sources.list
deb http://nginx.org/packages/debian/ squeeze nginx
deb-src http://nginx.org/packages/debian/ squeeze nginx

#Update apt lists
sudo apt-get update

#Upgrade or install nginx
sudo apt-get upgrade
#or
sudo apt-get install nginx

Instalando PHP-FPM
http://www.ubuntubrsc.com/instalando-nginx-php-fpm-apc-varnish-mysql-ubuntu-server-12-04.html

sudo aptitude install php5-fpm php5-gd php-apc php5-imagick php5-curl php-pear php5-cli php5-common php5-mysql

Instalando o MariaDB (versão 5.5)
https://downloads.mariadb.org/mariadb/repositories/#mirror=jmu

sudo aptitude install python-software-properties
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db sudo add-apt-repository 'deb http://mirror.jmu.edu/pub/mariadb/repo/5.5/debian wheezy main'
sudo aptitude update
sudo aptitude install mariadb-server

Instalando o Varnish

https://www.varnish-cache.org/installation/debian
  1. curl http://repo.varnish-cache.org/debian/GPG-key.txt | apt-key add -
  2. echo "deb http://repo.varnish-cache.org/debian/ wheezy varnish-3.0" >> /etc/apt/sources.list
  3. aptitude update
  4. aptitude install varnish

Configurando e fazendo os serviços se comunicarem


Configuração do /etc/varnish/default.vcl
http://www.lullabot.com/blog/article/configuring-varnish-high-availability-multiple-web-servers

Acertando as configurações/permissões das pastas:
chown -R polignu:www-data <drupal_root_folder>
find <drupal_root_folder> -type d -exec chmod g+s {} \;
MySQL/MariaDB small config
https://raw.github.com/ottok/pkg-mariadb/master/support-files/my-medium.cnf.sh

Outras refs:
http://andrewdunkle.com/how-install-varnish-drupal-7
http://www.danielmiessler.com/blog/handling-redirects-with-varnish-and-nginx

Deixe um comentário

O seu endereço de e-mail não será publicado. Campos obrigatórios são marcados com *