[will be done for free] install Node.js, NPM and Ourjs blogs on Amazon's one-year free server _node.js

Source: Internet
Author: User
Tags curl mkdir tar xz install node

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

Sudo-i

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

$node--version
v0.10.30

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.