Instalar node.js Express y MongoDB en Ubuntu 12.04 LTS
Vamos a realizar los pasos para Instalar Node.JS y MongoDB en nuestro servidor Ubuntu Linux 12.04 LTS donde vamos a desarrollar nuestra aplicación:
Para verificar la version de nuestro Ubuntu:
root@haarp:/home/manager# cat /etc/issue
Ubuntu 12.04.1 LTS \n \l
Buscamos el paquete de NodeJS
root@haarp:/home/manager# apt-cache search nodejs
node-lru-cache - Javascript least-recently-used cache object - NodeJS
node-request - simplified HTTP request client for NodeJS
node-semver - Semantic versioner for NodeJS
nodejs - Node.js event-based server-side javascript engine
nodejs-dbg - Node.js event-based server-side javascript engine (debug)
nodejs-dev - Development files for Node.js
node-underscore - JavaScript's functional programming helper library - NodeJS
root@haarp:/home/manager#
Instalamos el paquete de nodejs
root@haarp:/home/manager# apt-get install nodejs
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho
Los paquetes indicados a continuación se instalaron de forma automática y ya no son necesarios.
squid3-common squid3 squid-langpack
Utilice «apt-get autoremove» para eliminarlos.
Se instalarán los siguientes paquetes extras:
libc-ares2 libev4 libicu48 libv8-3.7.12.22
Se instalarán los siguientes paquetes NUEVOS:
libc-ares2 libev4 libicu48 libv8-3.7.12.22 nodejs
0 actualizados, 5 se instalarán, 0 para eliminar y 44 no actualizados.
Necesito descargar 10,3 MB de archivos.
Se utilizarán 28,6 MB de espacio de disco adicional después de esta operación.
¿Desea continuar [S/n]? s
Des:1 http://us.archive.ubuntu.com/ubuntu/ precise/main libc-ares2 i386 1.7.5-1 [37,6 kB]
Des:2 http://us.archive.ubuntu.com/ubuntu/ precise/main libicu48 i386 4.8.1.1-3 [8.180 kB]
Des:3 http://us.archive.ubuntu.com/ubuntu/ precise/universe libv8-3.7.12.22 i386 3.7.12.22-3 [1.399 kB]
Des:4 http://us.archive.ubuntu.com/ubuntu/ precise/universe libev4 i386 1:4.11-1 [29,5 kB]
Des:5 http://us.archive.ubuntu.com/ubuntu/ precise/universe nodejs i386 0.6.12~dfsg1-1ubuntu1 [680 kB]
Descargados 10,3 MB en 1min. 7seg. (154 kB/s)
Seleccionando paquete libc-ares2 previamente no seleccionado
(Leyendo la base de datos ... 38089 ficheros o directorios instalados actualmente.)
Desempaquetando libc-ares2 (de .../libc-ares2_1.7.5-1_i386.deb) ...
Seleccionando paquete libicu48 previamente no seleccionado
Desempaquetando libicu48 (de .../libicu48_4.8.1.1-3_i386.deb) ...
Seleccionando paquete libv8-3.7.12.22 previamente no seleccionado
Desempaquetando libv8-3.7.12.22 (de .../libv8-3.7.12.22_3.7.12.22-3_i386.deb) ...
Seleccionando paquete libev4 previamente no seleccionado
Desempaquetando libev4 (de .../libev4_1%3a4.11-1_i386.deb) ...
Seleccionando paquete nodejs previamente no seleccionado
Desempaquetando nodejs (de .../nodejs_0.6.12~dfsg1-1ubuntu1_i386.deb) ...
Procesando disparadores para man-db ...
Configurando libc-ares2 (1.7.5-1) ...
Configurando libicu48 (4.8.1.1-3) ...
Configurando libv8-3.7.12.22 (3.7.12.22-3) ...
Configurando libev4 (1:4.11-1) ...
Configurando nodejs (0.6.12~dfsg1-1ubuntu1) ...
update-alternatives: utilizando /usr/bin/node para proveer /usr/bin/js (js) en modo automático.
Procesando disparadores para libc-bin ...
ldconfig deferred processing now taking place
root@haarp:/home/manager#
Instalamos NPM (node package manager)
root@haarp:/home/manager# apt-cache search npm
mricron - magnetic resonance image conversion, viewing and analysis
node-tar - read and write portable tar archives module for Node.js
npm - package manager for Node.js
root@haarp:/home/manager# apt-get install npm
Leyendo lista de paquetes... Hecho
Creando árbol de dependencias
Leyendo la información de estado... Hecho
Los paquetes indicados a continuación se instalaron de forma automática y ya n o son necesarios.
squid3-common squid3 squid-langpack
Utilice «apt-get autoremove» para eliminarlos.
Se instalarán los siguientes paquetes extras:
javascript-common libc-ares-dev libev-dev libssl-dev libssl-doc libv8-dev
node-abbrev node-block-stream node-fstream node-graceful-fs node-inherits
node-ini node-lru-cache node-minimatch node-mkdirp node-node-uuid node-nopt
node-request node-rimraf node-semver node-tar node-which nodejs-dev
wwwconfig-common
Paquetes sugeridos:
postgresql-client
Se instalarán los siguientes paquetes NUEVOS:
javascript-common libc-ares-dev libev-dev libssl-dev libssl-doc libv8-dev
node-abbrev node-block-stream node-fstream node-graceful-fs node-inherits
node-ini node-lru-cache node-minimatch node-mkdirp node-node-uuid node-nopt
node-request node-rimraf node-semver node-tar node-which nodejs-dev npm
wwwconfig-common
0 actualizados, 25 se instalarán, 0 para eliminar y 44 no actualizados.
Necesito descargar 3.381 kB de archivos.
Se utilizarán 10,2 MB de espacio de disco adicional después de esta operación .
¿Desea continuar [S/n]? s
Des:1 http://us.archive.ubuntu.com/ubuntu/ precise/universe wwwconfig-common all 0.2.2 [18,0 kB]
Des:2 http://us.archive.ubuntu.com/ubuntu/ precise/universe javascript-common al l 8 [4.208 B]
Des:3 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libssl-dev i386 1.0.1-4ubuntu5.5 [1.420 kB]
Des:4 http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libssl-doc all 1.0.1-4ubuntu5.5 [1.034 kB]
Des:5 http://us.archive.ubuntu.com/ubuntu/ precise/universe node-node-uuid all 1.2.0~20110510-2 [6.216 B]
Des:6 http://us.archive.ubuntu.com/ubuntu/ precise/main libc-ares-dev i386 1.7.5-1 [96,5 kB]
Des:7 http://us.archive.ubuntu.com/ubuntu/ precise/universe libev-dev i386 1:4.11-1 [119 kB]
Des:8 http://us.archive.ubuntu.com/ubuntu/ precise/universe libv8-dev i386 3.7.12.22-3 [61,5 kB]
Des:9 http://us.archive.ubuntu.com/ubuntu/ precise/universe node-abbrev all 1.0.3-1 [3.430 B]
Des:10 http://us.archive.ubuntu.com/ubuntu/ precise/universe node-inherits all 0.1-1 [2.656 B]
Des:11 http://us.archive.ubuntu.com/ubuntu/ precise/universe node-block-stream all 0.0.5-1 [4.620 B]
Des:12 http://us.archive.ubuntu.com/ubuntu/ precise/universe node-rimraf all 2.0.1-1 [3.802 B]
Des:13 http://us.archive.ubuntu.com/ubuntu/ precise/universe node-mkdirp all 0.3.1-2 [3.716 B]
Des:14 http://us.archive.ubuntu.com/ubuntu/ precise/universe node-graceful-fs all 1.1.8-1 [4.848 B]
Des:15 http://us.archive.ubuntu.com/ubuntu/ precise/universe node-fstream all 0.1.13-1 [31,7 kB]
Des:16 http://us.archive.ubuntu.com/ubuntu/ precise/universe node-ini all 1.0.2-1 [4.058 B]
Des:17 http://us.archive.ubuntu.com/ubuntu/ precise/universe node-lru-cache all 1.0.5-1 [3.240 B]
Des:18 http://us.archive.ubuntu.com/ubuntu/ precise/universe node-minimatch all 0.2.0-1 [14,0 kB]
Des:19 http://us.archive.ubuntu.com/ubuntu/ precise/universe node-nopt all 1.0.10-1 [10,8 kB]
Des:20 http://us.archive.ubuntu.com/ubuntu/ precise/universe node-request all 2.9.153-1 [19,9 kB]
Des:21 http://us.archive.ubuntu.com/ubuntu/ precise/universe node-semver all 1.0.13-1 [9.388 B]
Des:22 http://us.archive.ubuntu.com/ubuntu/ precise/universe node-tar all 0.1.13-1 [18,2 kB]
Des:23 http://us.archive.ubuntu.com/ubuntu/ precise/universe node-which all 1.0.5-1 [3.582 B]
Des:24 http://us.archive.ubuntu.com/ubuntu/ precise/universe nodejs-dev i386 0.6.12~dfsg1-1ubuntu1 [147 kB]
Des:25 http://us.archive.ubuntu.com/ubuntu/ precise/universe npm all 1.1.4~dfsg-1 [337 kB]
Descargados 3.381 kB en 37seg. (91,3 kB/s)
Seleccionando paquete wwwconfig-common previamente no seleccionado
(Leyendo la base de datos ... 38176 ficheros o directorios instalados actualmente.)
Desempaquetando wwwconfig-common (de .../wwwconfig-common_0.2.2_all.deb) ...
Seleccionando paquete javascript-common previamente no seleccionado
Desempaquetando javascript-common (de .../javascript-common_8_all.deb) ...
Seleccionando paquete libssl-dev previamente no seleccionado
Desempaquetando libssl-dev (de .../libssl-dev_1.0.1-4ubuntu5.5_i386.deb) ...
Seleccionando paquete libssl-doc previamente no seleccionado
Desempaquetando libssl-doc (de .../libssl-doc_1.0.1-4ubuntu5.5_all.deb) ...
Seleccionando paquete node-node-uuid previamente no seleccionado
Desempaquetando node-node-uuid (de .../node-node-uuid_1.2.0~20110510-2_all.deb) ...
Seleccionando paquete libc-ares-dev previamente no seleccionado
Desempaquetando libc-ares-dev (de .../libc-ares-dev_1.7.5-1_i386.deb) ...
Seleccionando paquete libev-dev previamente no seleccionado
Desempaquetando libev-dev (de .../libev-dev_1%3a4.11-1_i386.deb) ...
Seleccionando paquete libv8-dev previamente no seleccionado
Desempaquetando libv8-dev (de .../libv8-dev_3.7.12.22-3_i386.deb) ...
Seleccionando paquete node-abbrev previamente no seleccionado
Desempaquetando node-abbrev (de .../node-abbrev_1.0.3-1_all.deb) ...
Seleccionando paquete node-inherits previamente no seleccionado
Desempaquetando node-inherits (de .../node-inherits_0.1-1_all.deb) ...
Seleccionando paquete node-block-stream previamente no seleccionado
Desempaquetando node-block-stream (de .../node-block-stream_0.0.5-1_all.deb) ...
Seleccionando paquete node-rimraf previamente no seleccionado
Desempaquetando node-rimraf (de .../node-rimraf_2.0.1-1_all.deb) ...
Seleccionando paquete node-mkdirp previamente no seleccionado
Desempaquetando node-mkdirp (de .../node-mkdirp_0.3.1-2_all.deb) ...
Seleccionando paquete node-graceful-fs previamente no seleccionado
Desempaquetando node-graceful-fs (de .../node-graceful-fs_1.1.8-1_all.deb) ...
Seleccionando paquete node-fstream previamente no seleccionado
Desempaquetando node-fstream (de .../node-fstream_0.1.13-1_all.deb) ...
Seleccionando paquete node-ini previamente no seleccionado
Desempaquetando node-ini (de .../node-ini_1.0.2-1_all.deb) ...
Seleccionando paquete node-lru-cache previamente no seleccionado
Desempaquetando node-lru-cache (de .../node-lru-cache_1.0.5-1_all.deb) ...
Seleccionando paquete node-minimatch previamente no seleccionado
Desempaquetando node-minimatch (de .../node-minimatch_0.2.0-1_all.deb) ...
Seleccionando paquete node-nopt previamente no seleccionado
Desempaquetando node-nopt (de .../node-nopt_1.0.10-1_all.deb) ...
Seleccionando paquete node-request previamente no seleccionado
Desempaquetando node-request (de .../node-request_2.9.153-1_all.deb) ...
Seleccionando paquete node-semver previamente no seleccionado
Desempaquetando node-semver (de .../node-semver_1.0.13-1_all.deb) ...
Seleccionando paquete node-tar previamente no seleccionado
Desempaquetando node-tar (de .../node-tar_0.1.13-1_all.deb) ...
Seleccionando paquete node-which previamente no seleccionado
Desempaquetando node-which (de .../node-which_1.0.5-1_all.deb) ...
Seleccionando paquete nodejs-dev previamente no seleccionado
Desempaquetando nodejs-dev (de .../nodejs-dev_0.6.12~dfsg1-1ubuntu1_i386.deb) ...
Seleccionando paquete npm previamente no seleccionado
Desempaquetando npm (de .../npm_1.1.4~dfsg-1_all.deb) ...
Procesando disparadores para man-db ...
Configurando wwwconfig-common (0.2.2) ...
Configurando javascript-common (8) ...
Configurando libssl-dev (1.0.1-4ubuntu5.5) ...
Configurando libssl-doc (1.0.1-4ubuntu5.5) ...
Configurando node-node-uuid (1.2.0~20110510-2) ...
Configurando libc-ares-dev (1.7.5-1) ...
Configurando libev-dev (1:4.11-1) ...
Configurando libv8-dev (3.7.12.22-3) ...
Configurando node-abbrev (1.0.3-1) ...
Configurando node-inherits (0.1-1) ...
Configurando node-block-stream (0.0.5-1) ...
Configurando node-rimraf (2.0.1-1) ...
Configurando node-mkdirp (0.3.1-2) ...
Configurando node-graceful-fs (1.1.8-1) ...
Configurando node-fstream (0.1.13-1) ...
Configurando node-ini (1.0.2-1) ...
Configurando node-lru-cache (1.0.5-1) ...
Configurando node-minimatch (0.2.0-1) ...
Configurando node-nopt (1.0.10-1) ...
Configurando node-request (2.9.153-1) ...
Configurando node-semver (1.0.13-1) ...
Configurando node-tar (0.1.13-1) ...
Configurando node-which (1.0.5-1) ...
Configurando nodejs-dev (0.6.12~dfsg1-1ubuntu1) ...
Configurando npm (1.1.4~dfsg-1) ...
root@haarp:/home/manager#
Luego Instalamos Express
npm install express -g
root@haarp:/home/manager# npm install express -g
npm http GET https://registry.npmjs.org/express
npm http 200 https://registry.npmjs.org/express
npm http GET https://registry.npmjs.org/express/-/express-3.0.4.tgz
npm http 200 https://registry.npmjs.org/express/-/express-3.0.4.tgz
npm http GET https://registry.npmjs.org/connect/2.7.1
npm http GET https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/range-parser/0.0.4
npm http GET https://registry.npmjs.org/mkdirp/0.3.3
npm http GET https://registry.npmjs.org/cookie/0.0.5
npm http GET https://registry.npmjs.org/buffer-crc32/0.1.1
npm http GET https://registry.npmjs.org/send/0.1.0
npm http GET https://registry.npmjs.org/cookie-signature/0.0.1
npm http GET https://registry.npmjs.org/fresh/0.1.0
npm http GET https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/methods/0.0.1
npm http 200 https://registry.npmjs.org/range-parser/0.0.4
npm http 200 https://registry.npmjs.org/mkdirp/0.3.3
npm http GET https://registry.npmjs.org/range-parser/-/range-parser-0.0.4.tgz
npm http GET https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.3.tgz
npm http 200 https://registry.npmjs.org/commander/0.6.1
npm http GET https://registry.npmjs.org/commander/-/commander-0.6.1.tgz
npm http 200 https://registry.npmjs.org/connect/2.7.1
npm http GET https://registry.npmjs.org/connect/-/connect-2.7.1.tgz
npm http 200 https://registry.npmjs.org/buffer-crc32/0.1.1
npm http GET https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.1.1.tgz
npm http 200 https://registry.npmjs.org/send/0.1.0
npm http GET https://registry.npmjs.org/send/-/send-0.1.0.tgz
npm http 200 https://registry.npmjs.org/cookie-signature/0.0.1
npm http GET https://registry.npmjs.org/cookie-signature/-/cookie-signature-0.0.1.tgz
npm http 200 https://registry.npmjs.org/fresh/0.1.0
npm http GET https://registry.npmjs.org/fresh/-/fresh-0.1.0.tgz
npm http 200 https://registry.npmjs.org/methods/0.0.1
npm http GET https://registry.npmjs.org/methods/-/methods-0.0.1.tgz
npm http 200 https://registry.npmjs.org/commander/-/commander-0.6.1.tgz
npm http 200 https://registry.npmjs.org/cookie/0.0.5
npm http GET https://registry.npmjs.org/cookie/-/cookie-0.0.5.tgz
npm http 200 https://registry.npmjs.org/connect/-/connect-2.7.1.tgz
npm http 200 https://registry.npmjs.org/debug
npm http GET https://registry.npmjs.org/debug/-/debug-0.7.0.tgz
npm http 200 https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.1.1.tgz
npm http 200 https://registry.npmjs.org/mkdirp/-/mkdirp-0.3.3.tgz
npm http 200 https://registry.npmjs.org/range-parser/-/range-parser-0.0.4.tgz
npm http 200 https://registry.npmjs.org/send/-/send-0.1.0.tgz
npm http 200 https://registry.npmjs.org/cookie-signature/-/cookie-signature-0.0.1.tgz
npm http 200 https://registry.npmjs.org/fresh/-/fresh-0.1.0.tgz
npm http 200 https://registry.npmjs.org/cookie/-/cookie-0.0.5.tgz
npm http 200 https://registry.npmjs.org/debug/-/debug-0.7.0.tgz
npm http 200 https://registry.npmjs.org/methods/-/methods-0.0.1.tgz
npm http GET https://registry.npmjs.org/mime/1.2.6
npm http GET https://registry.npmjs.org/qs/0.5.1
npm http GET https://registry.npmjs.org/formidable/1.0.11
npm http GET https://registry.npmjs.org/crc/0.2.0
npm http GET https://registry.npmjs.org/bytes/0.1.0
npm http GET https://registry.npmjs.org/pause/0.0.1
npm http 200 https://registry.npmjs.org/crc/0.2.0
npm http GET https://registry.npmjs.org/crc/-/crc-0.2.0.tgz
npm http 200 https://registry.npmjs.org/formidable/1.0.11
npm http GET https://registry.npmjs.org/formidable/-/formidable-1.0.11.tgz
npm http 200 https://registry.npmjs.org/qs/0.5.1
npm http GET https://registry.npmjs.org/qs/-/qs-0.5.1.tgz
npm http 200 https://registry.npmjs.org/pause/0.0.1
npm http GET https://registry.npmjs.org/pause/-/pause-0.0.1.tgz
npm http 200 https://registry.npmjs.org/bytes/0.1.0
npm http GET https://registry.npmjs.org/bytes/-/bytes-0.1.0.tgz
npm http 200 https://registry.npmjs.org/crc/-/crc-0.2.0.tgz
npm http 200 https://registry.npmjs.org/formidable/-/formidable-1.0.11.tgz
npm http 200 https://registry.npmjs.org/mime/1.2.6
npm http GET https://registry.npmjs.org/mime/-/mime-1.2.6.tgz
npm http 200 https://registry.npmjs.org/qs/-/qs-0.5.1.tgz
npm http 200 https://registry.npmjs.org/pause/-/pause-0.0.1.tgz
npm http 200 https://registry.npmjs.org/bytes/-/bytes-0.1.0.tgz
npm http 200 https://registry.npmjs.org/mime/-/mime-1.2.6.tgz
/usr/local/bin/express -> /usr/local/lib/node_modules/express/bin/express
express@3.0.4 /usr/local/lib/node_modules/express
âââ methods@0.0.1
âââ fresh@0.1.0
âââ range-parser@0.0.4
âââ cookie-signature@0.0.1
âââ buffer-crc32@0.1.1
âââ cookie@0.0.5
âââ commander@0.6.1
âââ debug@0.7.0
âââ mkdirp@0.3.3
âââ send@0.1.0 (mime@1.2.6)
âââ connect@2.7.1
root@haarp:/home/manager#
Buscamos la base de Datos MongoDB
root@haarp:/home/manager# apt-cache search mongodb
python-bson - Python implementation of BSON for MongoDB
python-gridfs - Python implementation of GridFS for MongoDB
python-pymongo - Python interface to the MongoDB document-oriented database
python-pymongo-doc - Python interface to the MongoDB document-oriented database (documentation)
libmongo-client-dev - Development files for the alternate C driver for MongoDB
libmongo-client-doc - Documentation for the alternate C driver for MongoDB
libmongo-client0 - Alternate C driver for the MongoDB document-oriented datastore
libmongo-client0-dbg - Alternate C driver for MongoDB (debugging symbols)
libmongodb-perl - Mongo Driver for Perl
mongodb - object/document-oriented database (metapackage)
mongodb-clients - object/document-oriented database (client apps)
mongodb-dev - object/document-oriented database (development)
mongodb-server - object/document-oriented database (server package)
python-celery - async task/job queue based on message passing
python-celery-doc - async task/job queue based on message passing (Documentation)
python-mongoengine - Python Document-Object Mapper for working with MongoDB
python-mongoengine-doc - Python Document-Object Mapper for working with MongoDB (documentation)
syslog-ng - Next generation system logging daemon (metapackage)
syslog-ng-core - Next generation system logging daemon (core)
syslog-ng-dbg - Next generation system logging daemon (debug symbols)
syslog-ng-mod-json - Next generation system logging daemon (JSON plugin)
syslog-ng-mod-mongodb - Next generation system logging daemon (MongoDB plugin)
syslog-ng-mod-sql - Next generation system logging daemon (SQL plugin)
ubuntu-orchestra-modules-mongodb - Modules mainly used by orchestra-management-server
root@haarp:/home/manager#
Instalamos MongoDB
- bitfrost's blog
- Login to post comments
- 4151 reads
Comentarios recientes
8 years 26 weeks ago
8 years 50 weeks ago
8 years 50 weeks ago
8 years 50 weeks ago
10 years 13 weeks ago
11 years 21 weeks ago
11 years 21 weeks ago
11 years 22 weeks ago
12 years 18 weeks ago
12 years 25 weeks ago