개발자의 노트
반응형

git 설치

 

RHEL/CentOS 6 에는 git 1.7 이 포함되어 있는데. 이 버전이 https를 처리 못하는 버그가 있다고 한다.

따라서 git 버전을 확인해서 1.7이거나 아예 명령어를 인식하지 못한다면.. git 1.9 로 다시 설치하도록 하자.

 

# git version

git version 1.7.1

 

# git version

-bash: git: command not found

 

git 1.9 설치하기

 

# yum -y install curl-devel expat-devel gettext-devel openssl-devel zlib-devel cpio perl perl-ExtUtils-MakeMaker

# cd /util/src

# wget https://www.kernel.org/pub/software/scm/git/git-1.9.4.tar.gz

# tar xzvf git-1.9.4.tar.gz

# cd git-1.9.4

# ./configure

# make prefix=/usr/local all

# make prefix=/usr/local install

  

버전 확인 (서버에 재접속해야 반영됨)

 

# git version

git version 1.9.04

 

 

의존성 패키지 설치

 

# yum -y install gcc gcc-c++ openssl-devel curl curl-devel make bzip2-devel libicu-devel

 

Python 설치 확인 (./configure 에 필요)

 

# python -V

Python 2.6.6


 

node.js 설치 (소스 설치 – v6.11.5)

 

g++ 컴파일러가 4.8 버전이 필요하다. 버전이 4.8 보다 작으면 devtools 이용하여 4.8 설치하자.

 

# g++ -v

gcc  version 4.4.7 20120313 (Red Hat 4.4.7-18) (GCC)

# wget http://people.centos.org/tru/devtools-2/devtools-2.repo -O /util/src/devtools-2.repo

# cp /util/src/devtools-2.repo /etc/yum.repos.d/devtools-2.repo

# echo enabled=1 >> /etc/yum.repos.d/devtools-2.repo

# yum install -y devtoolset-2-gcc devtoolset-2-binutils devtoolset-2-gcc-c++

# ln -s /opt/rh/devtoolset-2/root/usr/bin/* /usr/local/bin/

# hash -r

# g++ -v

gcc version 4.8.2 20140120 (Red Hat 4.8.2-15) (GCC)

 

이제 노드를 설치한다.

 

# cd /util/src

# wget https://nodejs.org/dist/v6.11.5/node-v6.11.5.tar.gz

# tar zxvf node-v6.11.5.tar.gz

# cd ./node-v6.11.5

# ./configure --prefix=/util/node

# make && make install


NODEJS_HOME 셋팅

 

# vi /etc/profile

NODEJS_HOME=/util/node

export NODEJS_HOME

PATH=$PATH:$NODEJS_HOME/bin

export PATH

# source /etc/profile

 

설치 확인

 

# node -v

v6.11.5


npm 모듈 설치

 

npm 모듈은 전역적으로 사용할 것이므로 -g 옵션과 함께 설치한다.

 

# npm install npm -g

  

forever 모듈 설치

 

forever 모듈은 전역적으로 사용할 것이므로 -g 옵션과 함께 설치한다.

 

# npm install forever -g

profile

개발자의 노트

@곽코딩

포스팅이 좋았다면 "좋아요❤️" 또는 "구독👍🏻" 해주세요!