Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Server \ Node.js development environment deployment     - Python type way of comparison (Programming)

- Oracle database, some basic grammatical structures (Database)

- Testing Oracle 11g RMAN replicate database (Database)

- REDO LOG records management (Database)

- Expand an existing RAID arrays and remove the failed disk in a RAID (Linux)

- Verify the character set on MyCAT (Database)

- Linux / BSD firewall M0n0wall Profile (Linux)

- Use smem visual display Linux memory usage (Linux)

- Linux server Php injection prevention (Linux)

- Oracle 11g through SCN do incremental backup repair standby library detailed process (Database)

- To convert into a binary search tree sorted doubly linked list (Programming)

- MySQL server after an unexpected power outage can not start (Database)

- Linux System Getting Started Learning: install software packages on Ubuntu and Fedora (Linux)

- Grading defense against Linux server attacks (Linux)

- CentOS 6.6 x64 Oracle Database 11gR2 RAC automated installation scripts (Database)

- Linux linux system security (Linux)

- Copy files between two Linux hosts (Linux)

- Compression decompression command under Linux (Linux)

- Install Jetty on CentOS / RHEL 6.X (Server)

- Linux, Eclipse flash back and reinstall the JDK methods (Linux)

 
         
  Node.js development environment deployment
     
  Add Date : 2018-11-21      
         
         
         
  Node.js is based on the establishment of a platform for Chrome JavaScript runtime for easily building fast easily scalable network applications. Node.js With event-driven, non-blocking I / O model becomes efficient and lightweight, ideal for data-intensive real-time applications running on distributed devices.

Companies need to do a push messaging service, and then decided to use the development side nodejs to implement basic services, and then use a third party to provide api to implement message push functionality. Then, I need to give them nodejs development environment, and then I'll write a paper to record the next. . .

A, Node.js deployment

[Root @ lh01 src] # wget http://nodejs.org/dist/v0.10.36/node-v0.10.36-linux-x64.tar.gz
--2015-02-06 09: 11: 23-- http://nodejs.org/dist/v0.10.36/node-v0.10.36-linux-x64.tar.gz
Resolving nodejs.org ... 165.225.133.150
Connecting to nodejs.org | 165.225.133.150 |: 80 ... connected.
HTTP request sent, awaiting response ... 200 OK
Length: 5676610 (5.4M) [application / octet-stream]
Saving to: "node-v0.10.36-linux-x64.tar.gz"
  
100% [=============================================== =============>] 5,676,610 65.6K / s in 74s
  
2015-02-06 09:12:37 (74.8 KB / s) - "node-v0.10.36-linux-x64.tar.gz" saved [5676610/5676610]
  
[Root @ lh01 src] # tar zxf node-v0.10.36-linux-x64.tar.gz
[Root @ lh01 src] # mv node-v0.10.36-linux-x64 / usr / local /
[Root @ lh01 src] # cd / usr / local /
[Root @ lh01 local] # ln -s node-v0.10.36-linux-x64 nodejs
[Root @ lh01 local] # echo 'PATH = $ PATH: / usr / local / nodejs / bin' >> / etc / profile
[Root @ lh01 local] # tail -1 / etc / profile
PATH = $ PATH: / usr / local / node / bin
[Root @ lh01 local] # source / etc / profile
[Root @ lh01 local] # echo $ PATH
/ Usr / local / sbin: / usr / local / bin: / sbin: / bin: / usr / sbin: / usr / bin: / root / bin: / usr / local / nodejs / bin
[Root @ lh01 local] # node -v
v0.10.36
[Root @ lh01 local] # npm -v # npm package manager is nodejs
1.4.28

Second, the test

[Root @ lh01 local] # mkdir / data / web -p
[Root @ lh01 local] # cat >> /data/web/index.js << EOF
> Var http = require ( "http");
> Http.createServer (function (request, response) {
> Response.writeHead (200, {
> "Content-Type": "text / plain" // Output Type
>});
> Response.write ( "Hello World \ n"); // page output
> Response.end ();
.>}) Listen (8100); // listening port number
> Console.log ( "nodejs start listen 8100 port!");
> EOF
[Root @ lh01 local] # node /data/web/index.js &
[1] 21454
[Root @ lh01 local] # nodejs start listen 8102 port!
[Root @ lh01 local] # lsof -i tcp: 8100
COMMAND PID USER FD TYPE DEVICE SIZE / OFF NODE NAME
node 21454 root 10u IPv4 1772992 0t0 TCP *: xprint-server (LISTEN)
[Root @ lh01 local] # curl http://120.27.45.109:8100/index.js
Hello World
[Root @ lh01 local] #

OK
     
         
         
         
  More:      
 
- Linux system security configuration (Linux)
- Java polymorphism and exception handling (Programming)
- Ubuntu rights management common commands (Linux)
- How x2go set up Remote Desktop on Linux (Linux)
- Ubuntu users to install the system indicator SysPeek 0.3 (Linux)
- Java Concurrency: synchronized (Programming)
- How to use awk command in Linux (Linux)
- CentOS 6.5 set under Oracle 12c at startup (Database)
- libnet list of functions (Programming)
- Linux firewall settings -DNS server articles (Server)
- Kafka cluster deployment (Server)
- Analytical Ceph: handle network layer (Server)
- Ubuntu 14.04 compile and install Apache (Server)
- Nginx server security configuration (Server)
- Detailed steps - GAMIT solver (Linux)
- Mount and unloading disks under Linux (Linux)
- Nginx Load Balancing (standby) + Keepalived (Server)
- Oracle database with test data insertion speed (Database)
- Nginx introduced Dynamic Module Architecture (Server)
- Install Ubuntu open source drawing program MyPaint 1.2.0 (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.