-
Notifications
You must be signed in to change notification settings - Fork 21
Running notepages on ubuntu
gpolitis edited this page Aug 29, 2011
·
1 revision
Based on the etherpad-lite wiki.
- Install node.js from Chris Lea's repository, he seems to update his repository regularly.
- Install npm with
curl http://npmjs.org/install.sh | sh
- Install mongodb from the mongodb official repository.
- Install the redis server from Rowan's repository, he seems to update his repository regularly.
- Move to a folder where you want to install notepages. Clone the git repository with
git clone 'git://github.com/fivesixty/notepages.git'
. - Install dependencies with
npm install
. - Clone bundled libraries : ace, mdext, quickdiff and store.
- Start notepages with
node server.js
. - Open your web browser and visit http://localhost:8888!
- tailor NPHOME, NPUSER and NPLOGS
- save to /etc/init/notepages.conf
- sudo start notepages
description "notepages" start on network stop on runlevel [!2345] env NPHOME=/srv/www/np.example.com/public_html env NPLOGS=/srv/www/np.example.com/logs/notepages env NPUSER=www-data pre-start script chdir $NPHOME mkdir $NPLOGS ||true chown $NPUSER:admin $NPLOGS ||true chmod 0755 $NPLOGS ||true chown -R $NPUSER:admin $NPHOME/var ||true npm install >> $NPLOGS/app.log 2>> $NPLOGS/error.log || { stop; exit 1; } end script script cd $NPHOME exec su -s /bin/sh -c 'exec "$0" "$@"' $NPUSER node server.js \ >> $NPLOGS/app.log \ 2>> $NPLOGS/error.log end script
server { listen 443; server_name np.example.com; access_log /srv/www/np.example.com/logs/nginx/access.log; error_log /srv/www/np.example.com/logs/nginx/error.log; ssl on; ssl_certificate /srv/www/np.example.com/ssl/np.crt; ssl_certificate_key /srv/www/np.example.com/ssl/np.key; ssl_session_timeout 5m; ssl_protocols SSLv2 SSLv3 TLSv1; ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP; ssl_prefer_server_ciphers on; location / { proxy_pass http://localhost:8888/; proxy_set_header Host $host; proxy_buffering off; } } server { listen 80; server_name np.example.com; rewrite ^(.*) https://$server_name$1 permanent; }