Skip to content

Instantly share code, notes, and snippets.

@tored
Forked from druzn3k/install-node-redis.sh
Last active December 23, 2015 00:58
Show Gist options
  • Save tored/6556891 to your computer and use it in GitHub Desktop.
Save tored/6556891 to your computer and use it in GitHub Desktop.
#!/bin/sh
##############################################################
# Modified bash install script originated from
#
# Rock-Solid Node.js Platform on Ubuntu (http://apptob.org/)
# Auto-config by apptob.org
# Author: Ruslan Khissamov, email: rrkhissamov@gmail.com
# GitHub: https://github.com/rushis
#
##############################################################
version=0.10.18
# Test if package manager is unlocked so we can create a package
if lsof /var/lib/dpkg/lock >> /dev/null; then
echo "FAILED: Package manager locked. Close process and try again."
exit 1
fi
# Update System
echo "System Update"
apt-get -y update
# Install build dependencies
echo "Installing dependencies"
apt-get -y install libssl-dev pkg-config build-essential checkinstall python
# Download & Unpack Node.js
echo "Download Node.js v.$version"
mkdir /tmp/node-install-v$version
cd /tmp/node-install-v$version
wget http://nodejs.org/dist/v$version/node-v$version.tar.gz
tar -zxf node-v$version.tar.gz
echo "Node.js download & unpack completed"
# Install Node.js and register it as a deb package for easy uninstalltion
echo "Install Node.js v.$version"
cd node-v$version
./configure && make && checkinstall --install=yes --pkgname=nodejs --pkgversion "$version" --default
echo "Node.js v.$version install completed"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment