Last active
April 4, 2018 08:37
-
-
Save wellington1993/fe6b74f5b1409e3d3b814aea28d884ee to your computer and use it in GitHub Desktop.
Ubuntu instructions to install Node.js(+ npm) + AngularJS + YEOMAN + generator-angular + rbenv + Ruby + Rails-api - App Example: https://github.com/wellington1993/astronauta-test1-rails-angular
This file contains hidden or 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
# Before this please install zsh and oh-my-zsh | |
apt-get install curl | |
#curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash - | |
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash - | |
sudo apt-get install -y nodejs vim htop git gitg | |
sudo add-apt-repository ppa:chris-lea/node.js | |
sudo apt-get update | |
sudo apt-get install -y build-essential libssl-dev curl openssl git python phantomjs libreadline-dev | |
sudo apt-get install -y python-software-properties optipng chrpath git-core libssl-dev libfontconfig1-dev | |
# If use mysql | |
# sudo apt-get install mysql-server mysql-client libmysqlclient-dev | |
#From: | |
# https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions | |
# https://www.digitalocean.com/community/tutorials/como-instalar-o-node-js-em-um-servidor-ubuntu-14-04-pt | |
This file contains hidden or 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
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.31.0/install.sh | bash | |
zsh | |
bash | |
nvm --version | |
nvm install stable | |
nvm install stable --reinstall-packages-from=node | |
nvm use stable | |
nvm current | |
#From: | |
# https://www.digitalocean.com/community/tutorials/how-to-install-node-js-with-nvm-node-version-manager-on-a-vps | |
# https://www.digitalocean.com/community/tutorials/como-instalar-o-node-js-em-um-servidor-ubuntu-14-04-pt | |
# https://keymetrics.io/2015/02/03/installing-node-js-and-io-js-with-nvm/ | |
# http://learn.bevry.me/node/install/#-download-install-node-js-http-nodejs-org-download- | |
# http://workshop.botter.ventures/2015/10/23/how-to-install-node-js-using-nvm-on-ubuntu/ | |
# https://richardkall.se/installing-node-js-using-node-version-manager-nvm/ | |
# http://michael-kuehnel.de/node.js/2015/09/08/using-vm-to-switch-node-versions.html | |
# http://garywoodfine.com/install-node-js-via-node-version-manager-on-ubuntu/ |
This file contains hidden or 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
#sudo apt-get install npm | |
sudo npm install npm -g | |
npm -g update | |
#From: | |
# https://docs.npmjs.com/getting-started/installing-node | |
# http://tableless.com.br/yeoman-e-quando-as-coisas-dao-errado/ |
This file contains hidden or 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
#echo "export NODE_PATH=$NODE_PATH:~/.nvm/versions/node/v5.11.0/lib/node_modules" >> ~/.zshrc && source ~/.zshrc | |
#echo "export NODE_PATH=$NODE_PATH:~/.nvm/versions/node/v5.11.0/lib/node_modules" >> ~/.bashrc && source ~/.bashrc | |
echo "export NODE_PATH=$NODE_PATH:~/.nvm/versions/node/v6.0.0/lib/node_modules" >> ~/.zshrc && source ~/.zshrc | |
echo "export NODE_PATH=$NODE_PATH:~/.nvm/versions/node/v6.0.0/lib/node_modules" >> ~/.bashrc && source ~/.bashrc | |
npm install -y -g yo | |
npm update -g yo | |
npm install -g grunt-cli bower | |
yo doctor | |
yo | |
# From: | |
# http://tableless.com.br/yeoman-e-quando-as-coisas-dao-errado/ | |
# https://candidosalesg.wordpress.com/2012/11/19/instalando-yeoman-no-ubuntu-12-10/ |
This file contains hidden or 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
# As root "sudo su -" | |
cd /var | |
touch swap.img | |
chmod 600 swap.img | |
dd if=/dev/zero of=/var/swap.img bs=1MB count=512 | |
mkswap /var/swap.img | |
swapon /var/swap.img | |
echo "/var/swap.img none swap sw 0 0" >> /etc/fstab | |
# else continue | |
#From: | |
# https://github.com/christopher5106/swap-simple/blob/master/recipes/default.rb | |
# https://www.digitalocean.com/community/tutorials/how-to-configure-virtual-memory-swap-file-on-a-vps |
This file contains hidden or 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
npm install -g typescript typings | |
npm i -g istanbul mocha babel gulp-cli grunt-cli | |
npm install -g gulp bower | |
bower install | |
grunt server | |
#npm install -g generator-ng-fullstack | |
#npm install -g generator-karma generator-angular | |
npm install -g generator-gulp-angular | |
mkdir my-new-project && cd $_ | |
mkdir frontend && cd $_ | |
yo gulp-angular | |
# Use/Select this options: | |
# ? Which version of Angular do you want? 1.5.x (stable) | |
# ? What Angular modules would you like to have? (ngRoute and ngResource will be addressed after) | |
# ? Do you need jQuery or perhaps Zepto? jQuery 2.x (new version, lighter, IE9+) | |
# ? Would you like to use a REST resource library? Restangular, an alternative service to handle RESTful requests | |
# ? Would you like to use a router? UI Router, flexible routing with nested views | |
# ? Which UI framework do you want? Angular Material, the reference implementation of the Google's Material Design specification | |
# ? Which CSS preprocessor do you want? Sass (Node), Node.js binding to libsass, the C version of the popular stylesheet preprocessor, Sass. | |
# ? Which JS preprocessor do you want? CoffeeScript, "a little language that compiles into JavaScript". | |
# ? Which HTML template engine would you want? Jade (*.jade) | |
# If npm install killed | |
bower install | |
npm install | |
gulp test | |
gulp | |
gulp serve |
This file contains hidden or 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
git clone https://github.com/rbenv/rbenv.git ~/.rbenv | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bash_profile | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc | |
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.zshrc | |
echo 'eval "$(rbenv init -)"' >> ~/.zshrc | |
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build | |
#From: | |
# https://github.com/rbenv/rbenv | |
# https://gist.github.com/MicahElliott/2407918 | |
This file contains hidden or 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
sudo apt-get install -y libxslt-dev libxml2-dev libsqlite3-dev | |
aptitude install git zsh libssl-dev zlib1g-dev libreadline-dev libyaml-dev | |
sudo apt-get install -y aptitude | |
sudo aptitude install -y autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev apt-get install libruby | |
zsh | |
bash | |
# Sometimes work whitout 2.3.0 | |
rbenv install 2.3.0 | |
rbenv local 2.3.0 | |
rbenv global 2.3.0 | |
rbenv rehash | |
#Create gemrc | |
# Form https://gist.github.com/wellington1993/86e7351dcea76b07c8daf3f73f50b77c | |
#If gem command not found add the path od ruby version to user .bashrc in $PATH | |
gem install bundle | |
gem install rails | |
gem install rails-api | |
gem install foreman | |
rails -v | |
gem install compass | |
#From: | |
# https://gorails.com/setup/ubuntu/16.04 |
This file contains hidden or 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
rails-api new your-project-name | |
rails s |
Author
wellington1993
commented
Apr 27, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment