Configure node js and npm under Ubuntu 14.04

  1. Manual installation method ===================================

1 Download node-v0.10.24.tar.gz https://nodejs.org/dist/v4.2.1/

2 Unzip to /home/johnny/tools/nodejs/

3 sudo vim /etc/profile join

export PATH=/home/johnny/tools/nodejs/bin/:$PATH

export NODE_PATH=/home/johnny/tools/nodejs:/home/johnny/tools/nodejs/lib/node_modules

4 Through npm config ls -l

Modify the file pointed to by userconfig, add prefix and cache to point to a custom directory

Such as modifying /home/johnny/.npmrc

prefix=/home/johnny/tools/nodejs/

cache=/home/johnny/tools/nodejs/lib/cache/

test

npm i -g grunt-cli

grunt

  1. Use apt-get===================================

Now that Node.js is chosen, it is necessary to build a development environment. The following is to build a Node.js development environment with Ubuntu 14.04 as the development platform:

Install Node.js:

The version of Node.js that comes with Ubuntu 14.04 is too old, and I tried the installation and it was not successful, so I need to add the Node.js PPA to install the latest version of Node.js, and execute it in the terminal:

sudo add-apt-repository ppa:chris-lea/node.js

sudo apt-get update

sudo apt-get install nodejs

After the installation is complete, execute the node -v command to see if Node.js is installed successfully.

sudo apt-get install g++ curl libssl-dev apache2-utils

sudo apt-get install python-software-properties

sudo add-apt-repository ppa:chris-lea/node.js (press enter again and then Ctrl+c)

sudo apt-get update

sudo apt-get install nodejs

Through npm config ls -l

Modify the file pointed to by userconfig, add prefix and cache to point to a custom directory

Recommended Posts

Configure node js and npm under Ubuntu 14.04
Install nodejs and npm under Ubuntu 16.04
[python] python2 and python3 under ubuntu
ubuntu install and configure GitLab
Install and configure keepalived under CentOS 5.9
Install and configure MySQL on Ubuntu
ubuntu modify and configure ip address
Install and deploy Gerrit under Ubuntu
Redis installation under ubuntu and windows
Compile and install QEMU under Ubuntu
51 MCU program development and download under Ubuntu
Installation and uninstallation of CUDA under Ubuntu 16.04
Configure android debugging tool adb under ubuntu16.04
DLNA/UPnP Server installation and configuration under Ubuntu 12.04
Configure Nginx + PHP 7.0 + MySQL environment under Ubuntu 16.04
How to install and configure NATS on Ubuntu 16.04
Install JDK and configure environment variables on Ubuntu 16.04
How to install and configure Gogs on Ubuntu 18.04
How to install and configure Cyberpanel on Ubuntu 18.04
How to install and configure ownCloud on Ubuntu 16.04
Installation of pulseaudio and API usage under Ubuntu 12.04
How to install and configure GitLab on Ubuntu 18.04
How to install and configure Ansible on Ubuntu 18.04
Ubuntu configure Tomcat
How to install and configure PostGIS on Ubuntu 14.04
How to install and configure VNC on Ubuntu 18.04
How to install and configure Sphinx on Ubuntu 16.04
How to install and configure OrientDB on Ubuntu 14.04
Kaldi installation and configuration graphic tutorials under Ubuntu
Ubuntu configure Apache
Audio and video editing tool stack under ubuntu
How to install and configure AppScale on Ubuntu 12.04
How to install and configure PostGIS on Ubuntu 14.04
How to repackage Deb files under Debian and Ubuntu
Ubuntu16.04 mirror complete installation and configuration tutorial under VMware
Install win7 and archlinux on hard disk under ubuntu
Embedded Linux development environment to build and configure Ubuntu
Add new users under ubuntu and kick out online users
Installation and use of GDAL in Python under Ubuntu
Compile and install OpenJDK8 from source code under Ubuntu 18.04.1
Cpp web (1) Install and use Crow service under Ubuntu
Detailed steps to configure Ubuntu 16.04 and Apache virtual host
Installation and usage instructions of rz/sz command under ubuntu
Install and configure Mono production environment on Ubuntu Server
Install apache+PHP under Ubuntu
Install node.js under Ubuntu
Summary: Ubuntu Python2.x and
Install python3.6 under Ubuntu 16.04
Install mysql under Ubuntu 16.04
Install Thrift under ubuntu 14.10
Install OpenJDK10 under Ubuntu
Install Caffe under Ubuntu 14.04
Python MySQLd under Ubuntu
Start working under ubuntu
Ubuntu20.04 experience and beautification
Ubuntu introduction and installation
Use iptables under ubuntu
ubuntu 14.04 configure 3-wire 3IP
Ubuntu configure network commands
ubuntu16.04 install node.js, npm
Configure lamp under centos6.8