Thursday 24 February 2011

nsd3+nginx+php-fpm+drupal

Install nsd3 and nginx

touch /etc/nsd3/nsd.conf
apt-get install nsd3
apt-get install nginx
Check these to figure out how to set up php5-fpm : (in case the instructions in the first link not works, install fpm from source, as describe in howtoforge )

http://gerardmcgarry.com/blog/how-install-php-fpm-nginx-ubuntu-1004-server
http://www.howtoforge.com/installing-php-5.3-nginx-and-php-fpm-on-ubuntu-debian

add an owner user
mkdir -p /srv/mysite
adduser rootuser
usermod -G www-data rootuser


apt-get install mysql-client mysql-server php5-mysql php5-imagick php5-gd


Create database and set permissions

mysql -u root -p

CREATE DATABASE mysitedb;
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON mysitedb.* TO 'mysiteuser'@'localhost' IDENTIFIED BY 'password#';
GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER ON mysitedb.* TO 'mysiteuser'@'localhost.localdomain' IDENTIFIED BY 'password';
FLUSH PRIVILEGES;
quit;


Install drupal
cd /srv/mysite
wget http://ftp.drupal.org/files/projects/drupal-6.20.tar.gz
tar zxvf drupal-6.20.tar.gz
mv drupal-6.20/* .
rm -r drupal-6.20 drupal-6.20.tar.gz


set up permissions
cd sites/default/
cp default.settings.php settings.php
chown www-data:www-data settings.php
chmod 775 settings.php
mkdir files
chown www-data:www-data files
chmod 775 files

No comments:

Post a Comment