installation Execute each of the following commands. Create folder Mkdir/usr/local/node cd/usr/local/node wget http://nodejs.org/dist/v0.6.14/node-v0.6.14.tar.gz tar zxvf node-v0.6.14.tar.gz CD node-v0.6.14./configure (see less of this step, the newly installed CENTOS6 will be less gcc-c++ OpenSSL, perform the following two lines of command to install these) yum install Gcc-c + + Yum Install openssl-devel make (this command may also need to be installed first: yum-y install gcc automake autoconf libtool make) make install
TestCd/usr/local/node/code Vim Hello_node.js Enter the following code: var http = require (' http '); Http.createserver (function (req, res) {res.writehead ({' Content-type ': ' Text/plain '}); Res.end (' Hello World! Nodejs success '); }). Listen (8088); Console.log (' Server running at http://127.0.0.1:8088/'); Running: node hello_node.js access: http://127.0.0.1:8088/output: Hello world! Nodejs success
Outside: memcached problem found in Nodejs node_modules install folder in its top level directory execute command NPM install connect-memcached Express Restler Winston Set memcached server-side autostart [Root@crm ~]# chkconfig--add memcached
[Root@crm ~]# chkconfig--level 235 memcached on
[Root@crm ~]# chkconfig--list | grep mem
memcached 0:off 1:off 2:on 3:on 4:off 5:on 6:off
Next, you can start and stop memcached with the following command
/etc/rc.d/init.d/memcached start
/etc/rc.d/init.d/memcached stop
/etc/rc.d/init.d/memcached Restart can refer to: http://www.cnblogs.com/technet/archive/2011/09/11/2173485.html
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