Node.js in centos 5 üzerinde kurulumu için aşağıdaki adımları gerçekleştirmeniz yeterlidir.
1) Öncelikle configuration hazırlanması için python yükleyelim:
yum -y install python26
2) Node.js i yükleyelim ve tar dan açalım :
cd /usr/local/src wget http://nodejs.org/dist/v0.10.16/node-v0.10.16.tar.gz tar xzf node*gz cd node-v0.10.16
3) Şimdi python ile node.js için build configuration hazırlayalım:
python26 ./configure --prefix=/usr
Bu aşamada Node.js configure error: No acceptable C compiler found! gibi bir hata alırsanız belli ki sistemizinde gcc derleyicisi yok. Yüklemek için aşağıdaki komutu çalıştırın sonra tekrar deneyin:
yum install -y gcc.x86_64 gcc-c++.x86_64
Şöyle bir ekran görürseniz ayarlar hazır hale gelmiş demektir.
{ 'target_defaults': { 'cflags': [],
'default_configuration': 'Release',
'defines': [],
'include_dirs': [],
'libraries': []},
'variables': { 'clang': 0,
'gcc_version': 41,
'host_arch': 'x64',
'node_install_npm': 'true',
'node_prefix': '/usr',
'node_shared_cares': 'false',
'node_shared_http_parser': 'false',
'node_shared_libuv': 'false',
'node_shared_openssl': 'false',
'node_shared_v8': 'false',
'node_shared_zlib': 'false',
'node_tag': '',
'node_unsafe_optimizations': 0,
'node_use_dtrace': 'false',
'node_use_etw': 'false',
'node_use_openssl': 'true',
'node_use_perfctr': 'false',
'node_use_systemtap': 'false',
'python': '/usr/bin/python26',
'target_arch': 'x64',
'v8_enable_gdbjit': 0,
'v8_no_strict_aliasing': 1,
'v8_use_snapshot': 'true'}}
creating ./config.gypi
creating ./config.mk
4) Yeni python u tanıtalım ve “make”, “make install” komutlarını verelim:
export PYTHON=python26 make make install
Hepsi bu kadar.
