How To Install Node.js on a CentOS 7 server
-node.js를 centos 7에 설치하는 방법
원문 : https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-a-centos-7-server
Introduction
Node.js is a Javascript platform for server-side programming. It allows users to easily create networked applications that
require backend functionality. (Node.js는 서버쪽 프로그래밍을 위한 자스스크립트 플랫폼이다. 이것을 개발자에게 백엔드
기능을 갖춘 네트웍 처리를 하는 어플리케이션을 만들기 쉽게 해준다.)
By using Javascript as both the client and server language, development can be fast and consistent.
(클라이언트와 서버 언어 양쪽을 자바스크립트를 사용하는 것은 개발은 빠르고 일관성있게 해 준다.)
In this guide, we will show you a few different ways of getting Node.js installed on a CentOS 7 server so that you can get started.
(이 가이드에서는, CentOS 7 서버에 Node.js를 얻는 몇가지 방안을 보여주고 시작할 수 있게 해 줄 것이다.)
Most users will want to use the EPEL installation instructions or the NVM installation steps.
(대부분의 사용자는 EPEL 설치 방식과 NVM 설치 절차를 사용하는 것을 원할 것 같다.)
1. Install Node from Source
One way of acquiring Node.js is to obtain the source code and compile it yourself.
To do so, you should grab the source code from the project's website. On the downloads page,
right click on the "Source Code" link and click "Copy link address" or whatever similar option your browser gives you.
>wget http://nodejs.org/dist/v0.10.30/node-v0.10.30.tar.gz
>tar xzvf node-v* && cd node-v*
>sudo yum install gcc gcc-c++
>./configure
>make
>sudo make install
>node --version
2. Install a Package from the Node Site
Another option for installing Node.js on your server is to simply get the pre-built packages
from the Node.js website and install them.
cd ~
wget http://nodejs.org/dist/v0.10.30/node-v0.10.30-linux-x64.tar.gz
3. Install Node from the EPEL Repository
An alternative installation method uses the EPEL (Extra Packages for Enterprise Linux) repository
that is available for CentOS and related distributions.
>sudo yum install epel-release
>sudo yum install nodejs
>node --version
v0.10.30
4. Install Node Using the Node Version Manager
Another way of installing Node.js that is particularly flexible is through NVM, the Node version manager.
This piece of software allows you to install and maintain many different independent versions of Node.js,
and their associated Node packages, at the same time.
>curl https://raw.githubusercontent.com/creationix/nvm/v0.13.1/install.sh
>curl https://raw.githubusercontent.com/creationix/nvm/v0.13.1/install.sh | bash
>nvm list-remote
Conclusion
As you can see, there are quite a few different ways of getting Node.js up and running on your CentOS 7 server.
~
+ MongoDB
1.CentOS에 MongoDB 64bit 설치하기 , http://yakolla.tistory.com/55
yum 저장소 추가
1 2 3 4 5 6 | $ vi /etc/yum .repos.d /mongodb .repo [mongodb] name=MongoDB Repository baseurl=http: //downloads-distro .mongodb.org /repo/redhat/os/x86_64/ gpgcheck=0 enabled=1 |
yum으로 설치
1 | $ yum -y install mongodb-org |
yum -update로 몽고디비가 업데이트되는 것을 방지
1 2 | $ vi /etc/yum .conf exclude=mongodb-org,mongodb-org-server,mongodb-org-shell,mongodb-org-mongos,mongodb-org-tools |
실행시키기
1 2 3 4 5 6 | $ service mongod start $ service mongod restart $ service mongod stop # 부팅시 자동으로 실행하려면 $ chkconfig mongod on |
방화벽 오픈
1 2 3 | $ iptables -I INPUT 1 -p tcp --dport 27017 -j ACCEPT $ service iptables save $ service iptables restart |
2.Install MongoDB on Red Hat Enterprise or CentOS Linux
https://docs.mongodb.org/manual/tutorial/install-mongodb-on-red-hat/
http://zetawiki.com/wiki/%EB%A6%AC%EB%88%85%EC%8A%A4_%EC%95%84%ED%8C%8C%EC%B9%98_%EC%84%A4%EC%B9%98_(yum)
Deprecated command | Replacement command(s) |
---|---|
arp | ip n (ip neighbor) |
ifconfig | ip a (ip addr), ip link, ip -s (ip -stats) |
iptunnel | ip tunnel |
iwconfig | iw |
nameif | ip link, ifrename |
netstat | ss, ip route (for netstat-r), ip -s link (for netstat -i), ip maddr (for netstat-g) |
route | ip r (ip route) |
* [Linux] CentOS 7 / RHEL 7에 redis 설치 하기
http://blog.box.kr/?p=675
* Node.js 에서 Redis 사용하기
1. Redis 모듈 설치하기.
$ npm install connect-redis
$ npm install redis
* node.js 에서 socket.io 사용하기
http://forum.falinux.com/zbxe/index.php?document_srl=573508&mid=lecture_tip
>npm install socket.io
'0.일반개발' 카테고리의 다른 글
좋은자료 - Eclipse에서 Maven을 활용해서 Dynamic Web Project 만들기 (0) | 2016.02.26 |
---|---|
mongoDB (0) | 2015.12.16 |
60초안에 리눅스 성능 분석하기 (0) | 2015.12.03 |
Visual Studio 2010 프로젝트 속성 페이지 (0) | 2015.12.03 |
$LogFile ( NTFS 볼륨 로그 ) (0) | 2015.12.01 |