Here selected operating system is the community version of Debian,debian and Ubuntu operation instructions are in the same vein, plus before playing a period of time raspberry PI, personal more familiar with, The following installation process also applies to the tree-node.js (Installation of the part of the NPM).
1) Registration and selection
Registering and binding a signal card on AWS allows you to use Amazon's one-year free EC2 host, although the configuration is typically low, typically 0.612Mb (Linux) and 1G (Win) memory.
http://aws.amazon.com/
Here is the community version of Debian version is Debian-squeeze-amd64-pvm-2014-07-21-ebs)
Type T1.micro
Memory (GiB) 0.613
2) Login Cloud Host
Unlike the national wind host, which typically uses a password login, Amazon defaults to using the encryption authorization (OpenSSL generated PEM key certificate) certificate to log in,
A copy is automatically downloaded when the host instance is created. Windows should first convert it to PPK format (verbose), which can take a long time.
The 2nd place to note is that the default logon username for Debian is admin, not root or EC2:
Log in and switch users to root
3 Install Node.js and NPM
The latest version of Nodejs and NPM will need to manually download the source code and compile the installation locally.
The node version installed here is 0.10.30.
Before installing, you need to install some dependencies (compilation tools, checklists), such as Curl, GCC (4.2+), GNU make (3.81+). Python (2.6 or 2.7) or build-essential (contains g++ and make), and so on.
Apt-get Update
apt-get Install Curl
apt-get Install python
apt-get install gcc
apt-get install make
apt-get Install build-essential # (g++ and make included in it, detail) apt-get install Libssl-dev
[optional]
And then run the following installation script, detailed
Echo ' Export path= $HOME/local/bin: $PATH ' >> ~/.bashrc
. ~/.BASHRC
mkdir ~/local mkdir ~/
Node-latest-install
CD ~/node-latest-install
Curl http://nodejs.org/dist/node-latest.tar.gz | tar xz-- Strip-components=1
./configure--prefix=~/local make
install # OK, fine, this step probably takes more than
econds ... Curl Https://www.npmjs.org/install.sh | Sh
Check the version after the run is complete
4) Installation Ourjs
Pick a suitable directory to run the following script (for example, under the/var/www directory)
NPM Install Ourjs
cp-r node_modules/ourjs./
chmod 755./ourjs/ourjs.sh &&/ourjs/ourjs.sh
Presumably the process is to download Ourjs from NPM and then copy the Node_modules directory, ourjs.sh into executable and run the service.
5) Test in http://localhost:8054
If you want to access this service on the public network, you need to add port 8054 to the security group.
To this NODEJS,NPM and Ourjs blog system has been basically available, but Node.js and nginx with the use of more effective, nginx responsible for static files (CSS, JS, pictures), G-zip, cache (301 cache), Can improve performance and save traffic for your server.