Last active
August 29, 2015 14:15
-
-
Save am11/6795fb5a8934859346ee to your computer and use it in GitHub Desktop.
Configuring CentOS 5.11 x64 for node-sass
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first select text-mode installation. | |
# secondly when asked chose server to get CLI only install | |
# select software manually and unselect server administration, | |
# mail server etc. However, select the development tools etc. | |
# Update GCC and G++ | |
yum install gcc-c++ gcc44-c++ | |
mv /usr/bin/gcc /usr/bin/gcc41 | |
mv /usr/bin/g++ /usr/bin/g++41 | |
mv /usr/bin/gcc44 /usr/bin/gcc | |
mv /usr/bin/g++44 /usr/bin/g++ | |
export CC=gcc CXX=g++ | |
# tools for i386 | |
yum install glibc-devel.i686 | |
# also try glibc-devel.i386 | |
# Install git | |
rpm -Uvh http://dl.fedoraproject.org/pub/epel/5/x86_64/epel-release-5-4.noarch.rpm | |
yum install git | |
# Install nvm | |
curl https://raw.githubusercontent.com/creationix/nvm/v0.23.3/install.sh | bash | |
# close and reopen shell | |
cd projects/node-sass | |
nvm install v0.10.36 | |
# you will probably get NA error. | |
# patch to NA issue: https://github.com/creationix/nvm/issues/554#issuecomment-70441684 | |
cp /etc/pki/tls/certs/ca-bundle.crt /etc/pki/tls/certs/ca-bundle.crt.bak | |
wget -O /etc/pki/tls/certs/ca-bundle.crt http://curl.haxx.se/ca/cacert.pem | |
# now install all the desired versions. | |
# to get x86 runtimes' versions, see the hack described here: | |
# https://github.com/hakobera/nvmw/issues/40#issuecomment-73972579 | |
# clone node-sass | |
mkdir projects | |
cd projects | |
git clone --recursive https://github.com/am11/node-sass | |
cd node-sass | |
git submodule update --resursive --init | |
npm install | |
rm -r vendor/linux* | |
# now apply the C++11 missing features patch for gcc4.4.7 | |
# like this: | |
# https://github.com/am11/libsass/commit/5138b02d8de139d3b26f7d780fe42ec728419c06 | |
# | |
# nvm use <runtime-selection> | |
# build with command: | |
# <runtime> scripts/build -f | |
# e.g. | |
# nvm use v0.12.0-x86 | |
# node script/build -f | |
# | |
# here is another one: | |
# nvm use iojs-v1.2.0 | |
# iojs script/build -f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment