Wget http://nodejs.org/dist/v0.8.7/node-v0.8.7.tar.gz (Stable version)
Wget http://nodejs.org/dist/v0.10.22/node-v0.10.22.tar.gz (Latest version)
2. Decompression
TAR-XVF node-v0.10.22-linux-x64.tar.gz
CD node_xxx
3. Installation
Yum Install gcc-c++ (if has no C compiler)
./configure
4, Installation Nodejs
Make install
If the Python version is too low, you may get an error, please upgrade http://gavinshaw.blog.51cto.com/385947/610585 first
This must be useful: http://www.cyberciti.biz/faq/wget-example-download-from-https-web-sites/
5, the installation is complete, then you can use the node command to start the service.
cd/$app _path/
Node/nodejs/app.js
There are many ways to install MongoDB, you can install the source code, and you can use the Yum source installation method in CentOS. Since MongoDB is updated more quickly, I prefer to use the Yum source installation method. The installation steps under 64-bit CentOS are as follows:
1. Preparatory work
run the Yum command to view MongoDB package information [root@localhost ~]# Yum info mongo-10gen
(hint that there is no matching information) that the Yum source in your CentOS system does not contain MONGODB-related resources, so you need to increase the Yum source before installing MongoDB with the Yum command, that is, add * in the/etc/yum.repos.d/directory. Repo Yum Source configuration file
2, Vi/etc/yum.repos.d/10gen.repo, enter the following statement:
[10gen]
Name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
after you have configured the Yum source, you can query MongoDB-related information if the configuration correctly executes the following command:
View information for a MONGODB server package
[Root@localhost geffzhang]# Yum Info mongo-10gen-server
* base:centos.ustc.edu.cn
* extras:centos.ustc.edu.cn
* updates:centos.ustc.edu.cn
Installed Packages
Name:mongo-10gen-server
Arch:x86_64
version:2.0.6
Release:mongodb_1
Size:13 M
Repo:installed
From Repo:10gen
Summary:mongo server, sharding server, and support scripts
url:http://www.mongodb.org
LICENSE:AGPL 3.0
Description:mongo (from "humongous") is a schema-free document-oriented
: Database.
:
: This package provides the MONGO server software, MONGO sharding
: Server Softwware, default configuration files, and INIT.D scripts.
To view client installation conditions
[Root@localhost geffzhang]#
* base:centos.ustc.edu.cn
* extras:centos.ustc.edu.cn
* updates:centos.ustc.edu.cn
Installed Packages
Name:mongo-10gen
Arch:x86_64
version:2.0.6
Release:mongodb_1
size:69 M
Repo:installed
From Repo:10gen
Summary:mongo Client shell and tools
url:http://www.mongodb.org
LICENSE:AGPL 3.0
Description:mongo (from "humongous") is a schema-free document-oriented
: Database. IT features dynamic profileable queries, full indexing,
: Replication and fail-over support, efficient storage of large
: Binary Data Objects, and auto-sharding.
:
: This package provides the MONGO shell, import/export tools, and
: Other client utilities.
3.installing MongoDB server-side and client Tools
[root@localhost geffzhang]# yum install mongo-10gen-server
[root@localhost geffzhang]# yum install Mongo-10gen
4. Start MongoDB
Service Mongod Start
Updated later, stop MongoDB, execute yum update mongo-10gen mongo-10gen-server .
5, server configuration:/etc/mongod.conf
- # mongo.conf
- #where to log
- Logpath=/var/log/mongo/mongod.log
- Logappend=true #以追加方式写入日志
- # fork and run in background
- Fork = True
- #port = 27017 #端口
- Dbpath=/var/lib/mongo #数据库文件保存位置
- Directoryperdb=true
- # Enables periodic logging of CPU utilization and I/O wait
- #启用定期记录CPU利用率和 I/O waits
- #cpu = True
- # Turn on/off security. OFF is currently the default
- # whether to run in secure authentication mode, default is non-secure way of authentication
- #noauth = True
- #auth = True
- # Verbose logging output.
- # Verbose record output
- #verbose = True
- # Inspect all client data for validity in receipt (useful for
- # Developing drivers) Check the validity of the client receiving data when developing the driver
- #objcheck = True
- # Enable DB quota management enables database quota management, with a default of 8 files per db, which can be set with the Quotafiles parameter
- #quota = True
- # Set Oplog record level
- # Set oplogging level where n is
- # 0=off (default)
- # 1=w
- # 2=r
- # 3=both
- # 7=w+some Reads
- #oplog = 0
- # diagnostic/debugging option Dynamic Debug Item
- #nocursors = True
- # Ignore Query hints ignore queries hint
- #nohints = True
- # Disable HTTP interface, default to localhost:28017
- # Disable The HTTP interface (Defaults to localhost:27018). This port number is wrong.
- #nohttpinterface = True
- # Close the server-side script, which will greatly limit the functionality
- # Turns off server-side scripting. This would result in greatly limited
- # functionality
- #noscripting = True
- # Close Scan table, any query will be scan failed
- # Turns off table scans. Any query this would do a table scan fails.
- #notablescan = True
- # Close data file pre-allocation
- # Disable data File preallocation.
- #noprealloc = True
- # Specify the size of the. ns file for the new database, in MB
- # specify. ns file size for new databases.
- # nssize = <size>
- # Accout token for Mongo monitoring server.
- #mms-token = <token>
- # MONGO the name of the monitoring server
- # server name for Mongo monitoring server.
- #mms-name = <server-name>
- # MONGO The ping interval of the monitoring server
- # Ping interval for Mongo monitoring server.
- #mms-interval = <seconds>
- # Replication Options Copy option
- # in replicated MONGO databases, specify here whether the is a slave or master in replication, specifies that the current is a dependency
- #slave = True
- #source = master.example.com
- # Slave only:specify A single database to replicate
- #only = master.example.com
- # or
- #master = True
- #source = slave.example.com
CentOS 6 Nodejs MongoDB Installation