Skip to content

Instantly share code, notes, and snippets.

@stolsma
Last active August 29, 2015 14:15
Show Gist options
  • Select an option

  • Save stolsma/1c1bb9be0eae8aeb547e to your computer and use it in GitHub Desktop.

Select an option

Save stolsma/1c1bb9be0eae8aeb547e to your computer and use it in GitHub Desktop.

Revisions

  1. stolsma revised this gist Feb 28, 2015. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions Install iojs.md
    Original file line number Diff line number Diff line change
    @@ -20,19 +20,20 @@ Add `nodejs.sh` script to `/etc/profile.d`

    ````
    # set PATH so it includes iojs bin
    export PATH="/usr/local/node/bin":"${PATH}"
    export PATH="/usr/local/node/bin:/usr/local/iojs/bin":"${PATH}"
    ````

    Link /usr/local/node to correct version:

    ```` bash
    sudo ln -s /usr/local/node0.8.9 /usr/local/node
    sudo ln -s /usr/local/iojs1.3.0 /usr/local/node
    sudo ln -s /usr/local/iojs1.3.0 /usr/local/iojs
    ````

    Adding/changing `/etc/sudoers.d/secure_path`:

    ```` bash
    Defaults secure_path=/usr/local/node/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
    Defaults secure_path=/usr/local/node/bin:/usr/local/iojs/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
    ````

    (BTW users capable to use `sudo` need to have the `sudo` group in their group list!!)
  2. stolsma renamed this gist Feb 23, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  3. stolsma created this gist Feb 23, 2015.
    38 changes: 38 additions & 0 deletions Install iojs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,38 @@
    Install first for ubuntu:
    ```` bash
    sudo apt-get install build-essential libssl-dev curl git-core
    ````

    Compile the required iojs version and put in global reach:

    ```` bash
    # install iojs from Github (replace 1.3.0 with required version)
    git clone https://github.com/iojs/io.js.git iojs
    cd iojs
    git checkout v1.3.0
    ./configure --prefix=/usr/local/iojs1.3.0
    make
    sudo make install
    cd ..
    ````

    Add `nodejs.sh` script to `/etc/profile.d`

    ````
    # set PATH so it includes iojs bin
    export PATH="/usr/local/node/bin":"${PATH}"
    ````

    Link /usr/local/node to correct version:

    ```` bash
    sudo ln -s /usr/local/node0.8.9 /usr/local/node
    ````

    Adding/changing `/etc/sudoers.d/secure_path`:

    ```` bash
    Defaults secure_path=/usr/local/node/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/bin
    ````

    (BTW users capable to use `sudo` need to have the `sudo` group in their group list!!)