Node Versioning manager NVM (server project related)

Source: Internet
Author: User
Tags install redis

Git project

Https://github.com/creationix/nvm

1. Download and install the NVM script

Curl Https://raw.githubusercontent.com/creationix/nvm/v0.13.1/install.sh | Bash
SOURCE ~/.bash_profile

2. List the required versions

NVM list-remote

The returned results are as follows

... v0.10.29v0.10.30 v0.11.0 v0.11.1 v0.11.2 v0.11.3 v0.11.4 v0.11.5 v0.11.6 v0.11.7 v0.11.8 v0.11.9v0.11.10v0.11.11v0.11.12v0.11.13

3. Install the appropriate version

NVM Install v0.10.30

4. View the installed version

NVM List
-  v0.10.30      System

5. Switch versions

NVM use v0.10.30

6. Set the default version

NVM alias Default v0.10.30



=====================================================================

"1. View System Information "
--System version--
Cat/etc/redhat-release
CentOS Release 6.5 (Final)

--View CPU--
$ more/proc/cpuinfo | grep "model name"
Model Name:intel (R) Xeon (r) CPU e5-2650 v2 @ 2.60GHz
Model Name:intel (R) Xeon (r) CPU e5-2650 v2 @ 2.60GHz

--View memory--
$ grep memtotal/proc/meminfo
memtotal:3921112 KB


"1 Install git"
[[email protected] ~]# yum install git

"2 NVM"
[[email protected] ~]# git clone https://github.com/creationix/nvm.git ~/.NVM
[Email protected] ~]# source ~/.nvm/nvm.sh
[Email protected] ~]# NVM install v0.12.7
[Email protected] ~]# node-v
v0.12.7

"3 Forever (Nodejs daemon Management)"
[[email protected] ~]# NPM install Forever-g

Forever stop-to-start
Forever stopall-> Stop
Forever restart-> Restart

"4 MongoDB"
[Email protected] ~]# Vi/etc/yum.repos.d/mongodb-org-3.0.repo
[mongodb-org-3.0]
Name=mongodb Repository
baseurl=https://repo.mongodb.org/yum/redhat/$releasever/mongodb-org/3.0/x86_64/
Gpgcheck=0
Enabled=1
[email protected] ~]# sudo yum install-y mongodb-org
[[email protected] ~]# sudo chkconfig mongod on (Set auto-start)
[Email protected] ~]# vi/etc/mongod.conf
-------Modify the configuration file to set the log file and data save path to/var/www/mongodb-------
Systemlog:
Destination:file
Logappend:true
Path:/var/www/mongodb/mongod.log

# Where and how to store data.
Storage
DbPath:/var/www/mongodb/mongo

# How the process runs
Processmanagement:
Fork:true # Fork and run in background
Pidfilepath:/var/www/mongodb/mongod.pid # Location of Pidfile
-------------------------------------------------------------------
[[email protected] ~]# sudo service mongod start (Stop|restart)

Create user
[Email protected] ~]# MONGO
[Email protected] ~]# >use nodes
Db.createuser ({"User": "admin",
"pwd": "atmestate1541101",
"CustomData": {employeeid:12345},
"Roles": [{role: ' Clusteradmin ', db: ' admin '},
{role: "Readanydatabase", DB: "Admin"},
"ReadWrite"
] },
{w: "Majority", wtimeout:5000})
[Email protected] ~]# mongo-u admin-p atmestate1541101--authenticationdatabase nodes
[Email protected] ~]# MONGO--version
MongoDB Shell version:3.0.7


"5 Redis"
[[email protected] ~]# Yum install Redis

Set Password
[Email protected] ~]# vi/etc/redis.conf
Requirepass atmestate1541101
[[email protected] ~]# sudo service redis start (Stop|restart)
[Email protected] ~]# REDIS-CLI--version
REDIS-CLI 2.4.10

Node Versioning manager NVM (server project related)

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.