Jump to content

Ubuntu/webserver/nginx/gallery3

From MattWiki
noteThis Page was written with Ubuntu 12.04 LTS in mind, and may not work correctly with other versions or distributions.
apt-get update && apt-get -y upgrade && reboot
apt-get -y install git subversion vim multitail gcc make openssl libssl-dev libpcre3 libpcre3-dev \
php5 php5-fpm php5-cgi php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap \
php5-mcrypt php5-ming php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc \
php5-xsl php-apc mysql-client htop ntp default-jre
/home/matt/bin/web/nginx-update.sh

Download and install the /etc/init.d/nginx init script from: http://wiki.nginx.org/Nginx-init-ubuntu Then make sure you set it up.

chmod 755 /etc/init.d/nginx
/usr/sbin/update-rc.d -f nginx defaults
/usr/sbin/update-rc.d -f memcached enable
/usr/sbin/update-rc.d -f php5-fpm enable
sed -i 's/^listen = 127.0.0.1:9000/listen = \/var\/run\/php5-fpm.socket/g' /etc/php5/fpm/pool.d/www.conf
adduser --system --no-create-home --group nginx
service php5-fpm start
service nginx start