Skip to content

Instantly share code, notes, and snippets.

@dangjlin
Last active February 21, 2017 09:55
Show Gist options
  • Save dangjlin/2dd09f80d114e54b54be89ce8b9c6336 to your computer and use it in GitHub Desktop.
Save dangjlin/2dd09f80d114e54b54be89ce8b9c6336 to your computer and use it in GitHub Desktop.

Revisions

  1. dangjlin revised this gist Feb 21, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion init_install.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #!/usr/bin/env bash

    # usage: curl -L https://gist.github.com/dangjlin/2dd09f80d114e54b54be89ce8b9c6336/raw/d94cfd5eb92905c45899cb41a86c64b9f868efb5/init_install.sh | sh
    # usage: curl -L https://gist.github.com/dangjlin/2dd09f80d114e54b54be89ce8b9c6336/raw/b5eb841f9989609c1c6d19c1b47cdca416435509/init_install.sh | sh
    # Pre-requisites
    sudo apt-get -y update
    sudo timedatectl set-timezone Asia/Taipei
  2. dangjlin revised this gist Feb 21, 2017. 1 changed file with 1 addition and 0 deletions.
    1 change: 1 addition & 0 deletions init_install.sh
    Original file line number Diff line number Diff line change
    @@ -3,6 +3,7 @@
    # usage: curl -L https://gist.github.com/dangjlin/2dd09f80d114e54b54be89ce8b9c6336/raw/d94cfd5eb92905c45899cb41a86c64b9f868efb5/init_install.sh | sh
    # Pre-requisites
    sudo apt-get -y update
    sudo timedatectl set-timezone Asia/Taipei
    sudo apt-get --no-install-recommends -y install git-core zlib1g zlib1g-dev libxml2-dev libxslt-dev libc6-dev ncurses-dev automake libtool subversion pkg-config

    #from digital ocean suggestion
  3. dangjlin revised this gist Feb 16, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion init_install.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #!/usr/bin/env bash

    # usage: curl -L https://gist.github.com/dangjlin/2dd09f80d114e54b54be89ce8b9c6336/raw/d4b4bfec30157e0dfb51fe46d394ed27bb1d8f3c/init_install.sh | sh
    # usage: curl -L https://gist.github.com/dangjlin/2dd09f80d114e54b54be89ce8b9c6336/raw/d94cfd5eb92905c45899cb41a86c64b9f868efb5/init_install.sh | sh
    # Pre-requisites
    sudo apt-get -y update
    sudo apt-get --no-install-recommends -y install git-core zlib1g zlib1g-dev libxml2-dev libxslt-dev libc6-dev ncurses-dev automake libtool subversion pkg-config
  4. dangjlin revised this gist Feb 16, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions init_install.sh
    Original file line number Diff line number Diff line change
    @@ -12,6 +12,8 @@ sudo apt-get --no-install-recommends -y install autoconf bison build-essential l
    sudo apt-get --no-install-recommends -y install htop tree openssl curl vim imagemagick

    curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
    sudo apt-get install -y nodejs

    # install rbenv
    git clone https://github.com/rbenv/rbenv.git ~/.rbenv
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
  5. dangjlin revised this gist Feb 16, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion init_install.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #!/usr/bin/env bash

    # usage: curl -L https://gist.github.com/dangjlin/2dd09f80d114e54b54be89ce8b9c6336/raw/b7dca479969db3c82dddc210a80deb757de32a18/init_install.sh | sh
    # usage: curl -L https://gist.github.com/dangjlin/2dd09f80d114e54b54be89ce8b9c6336/raw/d4b4bfec30157e0dfb51fe46d394ed27bb1d8f3c/init_install.sh | sh
    # Pre-requisites
    sudo apt-get -y update
    sudo apt-get --no-install-recommends -y install git-core zlib1g zlib1g-dev libxml2-dev libxslt-dev libc6-dev ncurses-dev automake libtool subversion pkg-config
  6. dangjlin revised this gist Feb 16, 2017. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion init_install.sh
    Original file line number Diff line number Diff line change
    @@ -39,4 +39,5 @@ curl -L https://www.opscode.com/chef/install.sh |sudo -E bash -

    echo "======================================="
    echo "========= please run source ~/.bashrc manually ========="
    echo "========= then contirnue run sh rbenv_init.sh ============"
    echo "========= then contirnue run sh rbenv_init.sh ============"
    echo "curl -L https://gist.github.com/dangjlin/f57d8713352bfc8b0d35c31327658790/raw/efe262d3c030fa32d479b2eb9d852b41edc736d8/rbenv_init.sh | sh "
  7. dangjlin revised this gist Feb 16, 2017. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion init_install.sh
    Original file line number Diff line number Diff line change
    @@ -35,4 +35,8 @@ cd /tmp
    curl -L https://www.opscode.com/chef/install.sh |sudo -E bash -

    # The rest
    #sudo gem install ruby-shadow --no-ri --no-rdoc
    #sudo gem install ruby-shadow --no-ri --no-rdoc

    echo "======================================="
    echo "========= please run source ~/.bashrc manually ========="
    echo "========= then contirnue run sh rbenv_init.sh ============"
  8. dangjlin revised this gist Feb 16, 2017. 1 changed file with 2 additions and 27 deletions.
    29 changes: 2 additions & 27 deletions init_install.sh
    Original file line number Diff line number Diff line change
    @@ -16,35 +16,10 @@ curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
    git clone https://github.com/rbenv/rbenv.git ~/.rbenv
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
    echo 'eval "$(rbenv init -)"' >> ~/.bashrc
    source ~/.bashrc
    type rbenv


    git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build

    rbenv install 2.3.0
    rbenv global 2.3.0
    ruby -v

    # install rbenv-vars
    git clone https://github.com/rbenv/rbenv-vars.git $(rbenv root)/plugins/rbenv-vars


    echo "gem: --no-document" > ~/.gemrc
    gem install bundler
    gem install rails -v 4.2.7
    rbenv rehash
    rails -v

    #Install JavaScript Runtime
    #cd /tmp
    #\curl -sSL https://deb.nodesource.com/setup_6.x -o nodejs.sh
    #less nodejs.sh
    #cat /tmp/nodejs.sh | sudo -E bash -

    # Updating rbenv
    cd ~/.rbenv
    git pull
    #cd ~/.rbenv
    #git pull

    # Download and compile Ruby 2.0.0-p0
    #cd /tmp
  9. dangjlin revised this gist Feb 16, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion init_install.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    #!/usr/bin/env bash

    # usage: curl -L https://gist.github.com/dangjlin/2dd09f80d114e54b54be89ce8b9c6336/bootstrap-chef-solo.sh | sh
    # usage: curl -L https://gist.githubusercontent.com/dangjlin/2dd09f80d114e54b54be89ce8b9c6336/raw/b7dca479969db3c82dddc210a80deb757de32a18/init_install.sh | sh
    # Pre-requisites
    sudo apt-get -y update
    sudo apt-get --no-install-recommends -y install git-core zlib1g zlib1g-dev libxml2-dev libxslt-dev libc6-dev ncurses-dev automake libtool subversion pkg-config
  10. dangjlin revised this gist Feb 14, 2017. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions init_install.sh
    Original file line number Diff line number Diff line change
    @@ -56,10 +56,8 @@ git pull
    #make install

    # install Chef
    sudo su
    cd /tmp
    curl -L https://www.opscode.com/chef/install.sh | bash
    curl -L https://www.opscode.com/chef/install.sh |sudo -E bash -

    exit
    # The rest
    #sudo gem install ruby-shadow --no-ri --no-rdoc
  11. dangjlin revised this gist Feb 14, 2017. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions init_install.sh
    Original file line number Diff line number Diff line change
    @@ -56,8 +56,10 @@ git pull
    #make install

    # install Chef
    sudo su
    cd /tmp
    curl -L https://www.opscode.com/chef/install.sh | bash

    exit
    # The rest
    #sudo gem install ruby-shadow --no-ri --no-rdoc
  12. dangjlin revised this gist Feb 14, 2017. 1 changed file with 4 additions and 4 deletions.
    8 changes: 4 additions & 4 deletions init_install.sh
    Original file line number Diff line number Diff line change
    @@ -37,10 +37,10 @@ rbenv rehash
    rails -v

    #Install JavaScript Runtime
    cd /tmp
    \curl -sSL https://deb.nodesource.com/setup_6.x -o nodejs.sh
    less nodejs.sh
    cat /tmp/nodejs.sh | sudo -E bash -
    #cd /tmp
    #\curl -sSL https://deb.nodesource.com/setup_6.x -o nodejs.sh
    #less nodejs.sh
    #cat /tmp/nodejs.sh | sudo -E bash -

    # Updating rbenv
    cd ~/.rbenv
  13. dangjlin revised this gist Feb 14, 2017. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions init_install.sh
    Original file line number Diff line number Diff line change
    @@ -9,9 +9,9 @@ sudo apt-get --no-install-recommends -y install git-core zlib1g zlib1g-dev libxm
    sudo apt-get --no-install-recommends -y install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

    #important normal use package
    sudo apt-get --no-install-recommends -y install htop tree openssl curl vim nodejs imagemagick

    sudo apt-get --no-install-recommends -y install htop tree openssl curl vim imagemagick

    curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
    # install rbenv
    git clone https://github.com/rbenv/rbenv.git ~/.rbenv
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
  14. dangjlin revised this gist Feb 14, 2017. 1 changed file with 1 addition and 4 deletions.
    5 changes: 1 addition & 4 deletions init_install.sh
    Original file line number Diff line number Diff line change
    @@ -1,9 +1,6 @@
    #!/usr/bin/env bash

    # usage: sudo su
    # usage: curl -L https://gist.github.com/gogojimmy/5523985/raw/b9d777bc380ee791c2f4534e9261b4b99289ed9f/bootstrap-chef-solo.sh | sh


    # usage: curl -L https://gist.github.com/dangjlin/2dd09f80d114e54b54be89ce8b9c6336/bootstrap-chef-solo.sh | sh
    # Pre-requisites
    sudo apt-get -y update
    sudo apt-get --no-install-recommends -y install git-core zlib1g zlib1g-dev libxml2-dev libxslt-dev libc6-dev ncurses-dev automake libtool subversion pkg-config
  15. dangjlin revised this gist Feb 14, 2017. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion init_install.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,9 @@
    #!/usr/bin/env bash

    # usage: sudo su
    # usage: curl -L https://gist.github.com/gogojimmy/5523985/raw/b9d777bc380ee791c2f4534e9261b4b99289ed9f/bootstrap-chef-solo.sh | sh


    # Pre-requisites
    sudo apt-get -y update
    sudo apt-get --no-install-recommends -y install git-core zlib1g zlib1g-dev libxml2-dev libxslt-dev libc6-dev ncurses-dev automake libtool subversion pkg-config
    @@ -18,6 +22,7 @@ echo 'eval "$(rbenv init -)"' >> ~/.bashrc
    source ~/.bashrc
    type rbenv


    git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build

    rbenv install 2.3.0
    @@ -44,7 +49,6 @@ cat /tmp/nodejs.sh | sudo -E bash -
    cd ~/.rbenv
    git pull


    # Download and compile Ruby 2.0.0-p0
    #cd /tmp
    #wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
  16. dangjlin revised this gist Feb 14, 2017. 1 changed file with 0 additions and 3 deletions.
    3 changes: 0 additions & 3 deletions init_install.sh
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,5 @@
    #!/usr/bin/env bash

    # usage: curl -L https://gist.github.com/dangjlin/2dd09f80d114e54b54be89ce8b9c6336/init_install.sh | sh


    # Pre-requisites
    sudo apt-get -y update
    sudo apt-get --no-install-recommends -y install git-core zlib1g zlib1g-dev libxml2-dev libxslt-dev libc6-dev ncurses-dev automake libtool subversion pkg-config
  17. dangjlin revised this gist Feb 14, 2017. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion init_install.sh
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,5 @@
    #!/usr/bin/env bash

    # usage: sudo su
    # usage: curl -L https://gist.github.com/dangjlin/2dd09f80d114e54b54be89ce8b9c6336/init_install.sh | sh


  18. dangjlin revised this gist Feb 14, 2017. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion init_install.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/usr/bin/env bash

    # usage: sudo su
    # usage: curl -L https://gist.github.com/gogojimmy/5523985/raw/b9d777bc380ee791c2f4534e9261b4b99289ed9f/bootstrap-chef-solo.sh | sh
    # usage: curl -L https://gist.github.com/dangjlin/2dd09f80d114e54b54be89ce8b9c6336/init_install.sh | sh


    # Pre-requisites
  19. dangjlin created this gist Feb 14, 2017.
    66 changes: 66 additions & 0 deletions init_install.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,66 @@
    #!/usr/bin/env bash

    # usage: sudo su
    # usage: curl -L https://gist.github.com/gogojimmy/5523985/raw/b9d777bc380ee791c2f4534e9261b4b99289ed9f/bootstrap-chef-solo.sh | sh


    # Pre-requisites
    sudo apt-get -y update
    sudo apt-get --no-install-recommends -y install git-core zlib1g zlib1g-dev libxml2-dev libxslt-dev libc6-dev ncurses-dev automake libtool subversion pkg-config

    #from digital ocean suggestion
    sudo apt-get --no-install-recommends -y install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev

    #important normal use package
    sudo apt-get --no-install-recommends -y install htop tree openssl curl vim nodejs imagemagick


    # install rbenv
    git clone https://github.com/rbenv/rbenv.git ~/.rbenv
    echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
    echo 'eval "$(rbenv init -)"' >> ~/.bashrc
    source ~/.bashrc
    type rbenv

    git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build

    rbenv install 2.3.0
    rbenv global 2.3.0
    ruby -v

    # install rbenv-vars
    git clone https://github.com/rbenv/rbenv-vars.git $(rbenv root)/plugins/rbenv-vars


    echo "gem: --no-document" > ~/.gemrc
    gem install bundler
    gem install rails -v 4.2.7
    rbenv rehash
    rails -v

    #Install JavaScript Runtime
    cd /tmp
    \curl -sSL https://deb.nodesource.com/setup_6.x -o nodejs.sh
    less nodejs.sh
    cat /tmp/nodejs.sh | sudo -E bash -

    # Updating rbenv
    cd ~/.rbenv
    git pull


    # Download and compile Ruby 2.0.0-p0
    #cd /tmp
    #wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
    #tar -xvzf ruby-2.0.0-p0.tar.gz
    #cd ruby-2.0.0-p0
    #./configure --prefix=/usr/local
    #make
    #make install

    # install Chef
    cd /tmp
    curl -L https://www.opscode.com/chef/install.sh | bash

    # The rest
    #sudo gem install ruby-shadow --no-ri --no-rdoc